Fixed an issue when indefined keystrokes

This commit is contained in:
Manuel Cortez 2021-07-13 17:53:01 -05:00
parent 582be54dea
commit b2b9cd810f

View File

@ -1272,8 +1272,10 @@ class Controller(object):
def register_invisible_keyboard_shorcuts(self, keymap):
if config.changed_keymap:
commonMessageDialogs.changed_keymap()
# Make sure we pass a keymap without undefined keystrokes.
new_keymap = {key: keymap[key] for key in keymap.keys() if keymap[key] != ""}
self.keyboard_handler = WXKeyboardHandler(self.view)
self.keyboard_handler.register_keys(keymap)
self.keyboard_handler.register_keys(new_keymap)
def unregister_invisible_keyboard_shorcuts(self, keymap):
try: