From 596278e625c528d6aa4ee6183809ad5bbf798bae Mon Sep 17 00:00:00 2001 From: Dejvino Date: Thu, 6 Apr 2023 08:11:52 +0200 Subject: [PATCH] Enable USB keyboard support --- terminal_keyboard_emulator.ino | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/terminal_keyboard_emulator.ino b/terminal_keyboard_emulator.ino index 6cabb0d..112ec8f 100644 --- a/terminal_keyboard_emulator.ino +++ b/terminal_keyboard_emulator.ino @@ -2,6 +2,12 @@ // [Consul 262.4 Converter] https://deskthority.net/viewtopic.php?t=26908 // [Consul 262.5 manual in CS] http://www.sapi.cz/prislusenstvi/c262-5.php#odkazp4 +#define KEYBOARD + +#ifdef KEYBOARD +#include +#endif + #include // pinout config @@ -350,9 +356,11 @@ void processKbdByte(int data) { } #ifdef KEYBOARD - Keyboard.press(keyChar); - delay(10); - Keyboard.release(keyChar); + if (!hostOnline) { + Keyboard.press(keyChar); + delay(10); + Keyboard.release(keyChar); + } #endif typeKey(keyChar);