summaryrefslogtreecommitdiff
path: root/kvmd/keymap.py.mako
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2019-09-26 10:26:21 +0300
committerDevaev Maxim <[email protected]>2019-09-26 10:26:21 +0300
commit31c17bb583717bf99fa5990d6a4507bebe8086ce (patch)
treee774256754a658f471673943ecee59c5e3c31915 /kvmd/keymap.py.mako
parentcbebefc6c97c45b8e7c63c07df8c355077fed657 (diff)
otg keymap
Diffstat (limited to 'kvmd/keymap.py.mako')
-rw-r--r--kvmd/keymap.py.mako14
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
}