summaryrefslogtreecommitdiff
path: root/kvmd/apps/otg/hid/keyboard.py
diff options
context:
space:
mode:
Diffstat (limited to 'kvmd/apps/otg/hid/keyboard.py')
-rw-r--r--kvmd/apps/otg/hid/keyboard.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/kvmd/apps/otg/hid/keyboard.py b/kvmd/apps/otg/hid/keyboard.py
index c38a2bfb..a098c6de 100644
--- a/kvmd/apps/otg/hid/keyboard.py
+++ b/kvmd/apps/otg/hid/keyboard.py
@@ -20,11 +20,13 @@
# ========================================================================== #
+from typing import Optional
+
from . import Hid
# =====
-def make_keyboard_hid() -> Hid:
+def make_keyboard_hid(report_id: Optional[int]=None) -> Hid:
return Hid(
protocol=1, # Keyboard protocol
subclass=1, # Boot interface subclass
@@ -40,6 +42,9 @@ def make_keyboard_hid() -> Hid:
0x09, 0x06, # USAGE (Keyboard)
0xA1, 0x01, # COLLECTION (Application)
+ # Report ID
+ *([0x85, report_id] if report_id is not None else []),
+
# Modifiers
0x05, 0x07, # USAGE_PAGE (Keyboard)
0x19, 0xE0, # USAGE_MINIMUM (Keyboard LeftControl)