79261642

Date: 2024-12-08 00:14:10
Score: 0.5
Natty:
Report link
window.webContents.on("before-input-event", (event, input) => {
  if (
    (input.control || input.meta) && // Control for Windows/Linux, Command (meta) for macOS
    (input.key === "+" || input.key === "-" || input.key === "0")
  ) {
    event.preventDefault();
    console.log(`Blocked zoom action: ${input.key}`);
  }
});

this blocks keyboard zoom commands and solved it

Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: instantlink