using boot keyboard

This commit is contained in:
Devaev Maxim 2018-08-02 23:56:45 +03:00
parent 1e47b50b54
commit 12f504482c

View File

@ -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();
} }