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
This commit is contained in:
June Tate-Gans 2021-05-03 18:08:11 -05:00
parent 6ddee4ae88
commit 65c2580e45

View File

@ -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)