mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-02-03 11:31:53 +08:00
using usb codes instead of arduino cinstants
This commit is contained in:
@@ -28,7 +28,11 @@
|
||||
KeyboardKeycode keymapUsb(uint8_t code) {
|
||||
switch (code) {
|
||||
% for km in sorted(keymap, key=operator.attrgetter("mcu_code")):
|
||||
case ${km.mcu_code}: return ${km.arduino_name};
|
||||
% if km.usb_key.is_modifier:
|
||||
case ${km.mcu_code}: return ${km.usb_key.arduino_modifier_code}; // ${km.web_name}
|
||||
% else:
|
||||
case ${km.mcu_code}: return ${km.usb_key.code}; // ${km.web_name}
|
||||
% endif
|
||||
% endfor
|
||||
default: return KEY_ERROR_UNDEFINED;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user