diff options
Diffstat (limited to 'kvmd/keymap.py.mako')
-rw-r--r-- | kvmd/keymap.py.mako | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/kvmd/keymap.py.mako b/kvmd/keymap.py.mako index 06b0c7d9..219cb186 100644 --- a/kvmd/keymap.py.mako +++ b/kvmd/keymap.py.mako @@ -32,13 +32,23 @@ class SerialKey: @dataclasses.dataclass(frozen=True) +class OtgKey: + code: int + is_modifier: bool + + [email protected](frozen=True) class Key: serial: SerialKey + otg: OtgKey <%! import operator %> # ===== KEYMAP: Dict[str, Key] = { -% for km in sorted(keymap, key=operator.attrgetter("web_key")): - "${km.web_key}": Key(serial=SerialKey(code=${km.serial_hid_code})), +% for km in sorted(keymap, key=operator.attrgetter("serial_code")): + "${km.web_key}": Key( + serial=SerialKey(code=${km.serial_code}), + otg=OtgKey(code=${km.otg_code}, is_modifier=${km.otg_is_modifier}), + ), % endfor } |