mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 01:00:29 +08:00
using boot keyboard
This commit is contained in:
parent
1e47b50b54
commit
12f504482c
@ -19,7 +19,7 @@ INLINE void cmdResetHid() { // 0 bytes
|
|||||||
CMD_SERIAL.read(); // unused
|
CMD_SERIAL.read(); // unused
|
||||||
CMD_SERIAL.read(); // unused
|
CMD_SERIAL.read(); // unused
|
||||||
CMD_SERIAL.read(); // unused
|
CMD_SERIAL.read(); // unused
|
||||||
Keyboard.releaseAll();
|
BootKeyboard.releaseAll();
|
||||||
AbsoluteMouse.releaseAll();
|
AbsoluteMouse.releaseAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -30,9 +30,9 @@ INLINE void cmdKeyEvent() { // 2 bytes
|
|||||||
CMD_SERIAL.read(); // unused
|
CMD_SERIAL.read(); // unused
|
||||||
if (code != KEY_ERROR_UNDEFINED) {
|
if (code != KEY_ERROR_UNDEFINED) {
|
||||||
if (state) {
|
if (state) {
|
||||||
Keyboard.press(code);
|
BootKeyboard.press(code);
|
||||||
} else {
|
} else {
|
||||||
Keyboard.release(code);
|
BootKeyboard.release(code);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -79,7 +79,7 @@ INLINE void cmdMouseWheelEvent() { // 2 bytes
|
|||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
void setup() {
|
void setup() {
|
||||||
CMD_SERIAL.begin(CMD_SERIAL_SPEED);
|
CMD_SERIAL.begin(CMD_SERIAL_SPEED);
|
||||||
Keyboard.begin();
|
BootKeyboard.begin();
|
||||||
AbsoluteMouse.begin();
|
AbsoluteMouse.begin();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user