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