diff --git a/src/cthulhu/keybindings.py b/src/cthulhu/keybindings.py index fdb709c..b8fae42 100644 --- a/src/cthulhu/keybindings.py +++ b/src/cthulhu/keybindings.py @@ -45,8 +45,6 @@ from . import settings from . import cthulhu_state from .cthulhu_i18n import _ -import logging -logger = logging.getLogger(__name__) _keysymsCache = {} _keycodeCache = {} @@ -472,15 +470,17 @@ class KeyBindings: given keycode and modifiers, or None if no match exists. """ + import logging + logger = logging.getLogger(__name__) logger.info(f"Looking for handler for key: {keyboardEvent.hw_code} with modifiers {keyboardEvent.modifiers}") - return binding + matches = [] candidates = [] clickCount = keyboardEvent.getClickCount() for keyBinding in self.keyBindings: if keyBinding.matches(keyboardEvent.hw_code, keyboardEvent.modifiers): if keyBinding.modifier_mask == keyboardEvent.modifiers and \ - keyBinding.click_count == clickCount: + keyBinding.click_count == clickCount: matches.append(keyBinding) # If there's no keysymstring, it's unbound and cannot be # a match.