Hey all,
I've scavenged a cash register keyboard and have turned it into a hotkey board that plugs into my PC (windows) via usb. I'm using a Pro Micro and the Keyboard library to emulate presses.
I've successfully set keys to open tabs (CTRL + t), open explorer (WIN + e), but I haven't been able to get ALT keycodes to work. I use a lot of greek letters for lab reports so would like to have a single key to type the keycode. For example, ALT + 234 is Ω (omega). When testing at https://keytest.ru/en/ , all the keys light up as expected. I just can't get it to create the character!
Here's some of the attempts I've made: (The delays were added while testing to ensure the computer gets each key press)
Keyboard.press(KEY_LEFT_ALT);
delay(100);
Keyboard.print("2");
delay(100);
Keyboard.print("3");
delay(100);
Keyboard.print("4");
Keyboard.releaseAll();
Keyboard.press(KEY_LEFT_ALT);
delay(100);
Keyboard.press('2');
delay(100);
Keyboard.release('2');
Keyboard.press('3');
delay(100);
Keyboard.release('3');
Keyboard.press('4');
delay(100);
Keyboard.releaseAll();
I've made many more attempts but these are my two main ones.
I am wondering if maybe the library has an issue with alt keycodes specifically for some reason. ALT+F4 works fine, and every other shortcut as well. Perhaps since this shortcut requires you to hold ALT while you press and release some numbers?
The entire code can be viewed at: GitHub - fwacer/hotkeyboard: A custom hotkey keyboard made out of an old cash register's keyboard
Any insight would be great!