From 65c2580e45f8c8d2e0c637e79a2325aa660ca01b Mon Sep 17 00:00:00 2001 From: June Tate-Gans Date: Mon, 3 May 2021 18:08:11 -0500 Subject: [PATCH] manager: Use the key name, rather than its number This allows us to be a bit more flexible in the way we define bindings. We still have to use the scancodes for the actual bindings (since we're outputting to uinput), but this should be a little easier to digest. ...also it fixed a bug... =op --- g13gui/g13gui/g13/manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/g13gui/g13gui/g13/manager.py b/g13gui/g13gui/g13/manager.py index d88fd0a..b67a0f0 100644 --- a/g13gui/g13gui/g13/manager.py +++ b/g13gui/g13gui/g13/manager.py @@ -254,7 +254,7 @@ class Manager(threading.Thread): def _synthesizeKeys(self, report): for key in G13NormalKeys: - binding = self._prefs.selectedProfile().keyBinding(key) + binding = self._prefs.selectedProfile().keyBinding(key.name) wasPressed = self._lastKeyState.get(key, False) nowPressed = key.testReport(report)