Go Down

Topic: Arduino Micro Keyboard (Read 832 times) previous topic - next topic

acecombat

I'm trying to send some keystrokes through a KVM and I tried using the built in keyboard libraries which worked perfect connected directly, but not via the KVM.  Up until now I thought a keyboard press was a keyboard press, but since starting this project I believe the KVM only accepts the Boot Keyboard protocol.  I've installed the HID Project libraries from https://github.com/NicoHood/HID and attempted the process using the BootKeyboard library instead, but again I'm still not having any luck when connected via KVM (Or for further testing I tried a PC in the BIOS screen).  It works fine connected to a Windows 7 or Linux machine, but not at BIOS or via KVM so I'm assuming I'm still doing something wrong.

This is one of the many sample sketches I did to test and try and get it to work:

Code: [Select]
#include "HID-Project.h"

void setup() {
  // put your setup code here, to run once:
  delay(12000);
  BootKeyboard.begin();
}

void loop() {
  // put your main code here, to run repeatedly:
  BootKeyboard.write(KEY_DOWN_ARROW);
  delay(1000);
  BootKeyboard.write(KEY_UP_ARROW);
  delay(1000);
 
}


I also tried BootKeyboard.press/BootKeyboard.release in place of BootKeyboard.write but had the same issue - Working on a running machine but not in BIOS/KVM.
What am I doing wrong?

acecombat

I should add (Just in case it helps diagnose) that when plugged into a running machine, the TX LED pulses every 1000ms when sending the keystroke, when plugged into a machine in BIOS after the initial 12000ms waiting period, the TX pulses only once and no keystroke is sent.

acecombat

It looks like others have had the same issue and have gone the Teensy route (https://forum.pjrc.com/threads/27908-Teensy-3-1-and-keyboard-boot-protocol) but the fact that there has been success from others with Arduino makes me feel like I'm missing something still.
To me it looks like the Arduino is not going into keyboard boot mode as in the example BootKeyboard sketch the LED does not turn on indicating boot mode.  In this instance I know that I need boot mode all the time, is there a way to force it by editing the library?  I had a bit of a fiddle with it but couldn't force it.

Go Up