Fix broken method.
This commit is contained in:
parent
1e6f4b8913
commit
3296e5d571
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user