mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 09:01:54 +08:00
renamed otg key to usb key
This commit is contained in:
@@ -32,7 +32,7 @@ class McuKey:
|
||||
|
||||
|
||||
@dataclasses.dataclass(frozen=True)
|
||||
class OtgKey:
|
||||
class UsbKey:
|
||||
code: int
|
||||
is_modifier: bool
|
||||
|
||||
@@ -40,12 +40,12 @@ class OtgKey:
|
||||
@dataclasses.dataclass(frozen=True)
|
||||
class Key:
|
||||
mcu: McuKey
|
||||
otg: OtgKey
|
||||
usb: UsbKey
|
||||
|
||||
<%! import operator %>
|
||||
KEYMAP: Dict[str, Key] = {
|
||||
% for km in sorted(keymap, key=operator.attrgetter("mcu_code")):
|
||||
"${km.web_name}": Key(mcu=McuKey(code=${km.mcu_code}), otg=OtgKey(code=${km.otg_key.code}, is_modifier=${km.otg_key.is_modifier})),
|
||||
"${km.web_name}": Key(mcu=McuKey(code=${km.mcu_code}), usb=UsbKey(code=${km.usb_key.code}, is_modifier=${km.usb_key.is_modifier})),
|
||||
% endfor
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user