From 2eb6d3c7dd10e609bcc5ee4991887d8e837e3089 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Thu, 5 Jun 2025 13:20:27 -0400 Subject: [PATCH] updated keybindings.py --- src/cthulhu/keybindings.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/cthulhu/keybindings.py b/src/cthulhu/keybindings.py index 3819439..3a2dd05 100644 --- a/src/cthulhu/keybindings.py +++ b/src/cthulhu/keybindings.py @@ -251,6 +251,23 @@ class KeyBinding: if not self.keycode: self.keycode = getKeycode(self.keysymstring) + # Debug logging for DisplayVersion plugin specifically + if self.keysymstring == 'v' and self.modifiers == 257: + with open('/tmp/displayversion_matches.log', 'a') as f: + f.write(f"=== DisplayVersion matches() debug ===\n") + f.write(f"Self keycode: {self.keycode}\n") + f.write(f"Self keysymstring: {self.keysymstring}\n") + f.write(f"Self modifiers: {self.modifiers}\n") + f.write(f"Self modifier_mask: {self.modifier_mask}\n") + f.write(f"Input keycode: {keycode}\n") + f.write(f"Input modifiers: {modifiers}\n") + f.write(f"Keycode match: {self.keycode == keycode}\n") + if self.keycode == keycode: + result = modifiers & self.modifier_mask + f.write(f"Modifier calculation: {modifiers} & {self.modifier_mask} = {result}\n") + f.write(f"Modifier match: {result == self.modifiers}\n") + f.write(f"Overall match: {self.keycode == keycode and (modifiers & self.modifier_mask) == self.modifiers}\n") + if self.keycode == keycode: result = modifiers & self.modifier_mask return result == self.modifiers