mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 00:51:53 +08:00
refactoring
This commit is contained in:
@@ -29,8 +29,8 @@
|
||||
<%! import operator %>
|
||||
INLINE KeyboardKeycode keymap(uint8_t code) {
|
||||
switch(code) {
|
||||
% for km in sorted(keymap, key=operator.attrgetter("arduino_hid_key")):
|
||||
case ${km.arduino_hid_code}: return ${km.arduino_hid_key};
|
||||
% for km in sorted(keymap, key=operator.attrgetter("serial_hid_key")):
|
||||
case ${km.serial_hid_code}: return ${km.serial_hid_key};
|
||||
% endfor
|
||||
default: return KEY_ERROR_UNDEFINED;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user