From 3296e5d57168143590e06a7708423d89f4caef28 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Sat, 19 Apr 2025 14:15:30 -0400 Subject: [PATCH] Fix broken method. --- src/cthulhu/keybindings.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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.