mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 01:00:29 +08:00
type fix
This commit is contained in:
parent
f277160396
commit
e46229e1d1
@ -98,7 +98,7 @@ class UsbKeyboard : public DRIVERS::Keyboard {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void sendKey(uint8_t code, bool state) override {
|
void sendKey(uint8_t code, bool state) override {
|
||||||
KeyboardKeycode usb_code = keymapUsb(code);
|
uint8_t usb_code = keymapUsb(code);
|
||||||
if (usb_code != KEY_ERROR_UNDEFINED) {
|
if (usb_code != KEY_ERROR_UNDEFINED) {
|
||||||
if (state ? _kbd.add(usb_code) : _kbd.remove(usb_code)) {
|
if (state ? _kbd.add(usb_code) : _kbd.remove(usb_code)) {
|
||||||
_sendCurrent();
|
_sendCurrent();
|
||||||
|
|||||||
@ -25,7 +25,7 @@
|
|||||||
#include <HID-Project.h>
|
#include <HID-Project.h>
|
||||||
|
|
||||||
|
|
||||||
KeyboardKeycode keymapUsb(uint8_t code) {
|
uint8_t keymapUsb(uint8_t code) {
|
||||||
switch (code) {
|
switch (code) {
|
||||||
case 1: return 4; // KeyA
|
case 1: return 4; // KeyA
|
||||||
case 2: return 5; // KeyB
|
case 2: return 5; // KeyB
|
||||||
|
|||||||
@ -25,7 +25,7 @@
|
|||||||
#include <HID-Project.h>
|
#include <HID-Project.h>
|
||||||
|
|
||||||
<%! import operator %>
|
<%! import operator %>
|
||||||
KeyboardKeycode keymapUsb(uint8_t code) {
|
uint8_t keymapUsb(uint8_t code) {
|
||||||
switch (code) {
|
switch (code) {
|
||||||
% for km in sorted(keymap, key=operator.attrgetter("mcu_code")):
|
% for km in sorted(keymap, key=operator.attrgetter("mcu_code")):
|
||||||
% if km.usb_key.is_modifier:
|
% if km.usb_key.is_modifier:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user