From 220c6b9969f1fff0aad7deb052e15692903c1813 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20H=C3=A4usler?= Date: Sun, 27 Feb 2022 15:06:50 +0100 Subject: [PATCH] Ignore empty key bindings (#3077) --- src/main/keyboard/shortcutHandler.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/keyboard/shortcutHandler.js b/src/main/keyboard/shortcutHandler.js index 05e21ff3..c76d59f5 100644 --- a/src/main/keyboard/shortcutHandler.js +++ b/src/main/keyboard/shortcutHandler.js @@ -38,6 +38,9 @@ class Keybindings { registerKeyHandlers (win, acceleratorMap) { for (const item of acceleratorMap) { let { accelerator } = item + if (accelerator == null || accelerator === '') { + continue + } // Regisiter shortcuts on the BrowserWindow instead of using Chromium's native menu. // This makes it possible to receive key down events before Chromium/Electron and we