Ignore empty key bindings (#3077)

This commit is contained in:
Felix Häusler 2022-02-27 15:06:50 +01:00 committed by GitHub
parent 637395a1f7
commit 220c6b9969
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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