Hacker News new | ask | show | jobs
by brokenmachine 3353 days ago
> Entering text is nice, of course, but that's not all that a keyboard does. How about cursor control (arrow keys, PageUp, etc.), function keys, or scroll lock?

That's easy to add.

In BinaryKeyboard.ino, the SendVal function [1] uses keyboard.write to send the keys. You can see a list of special keys you can send at https://www.arduino.cc/en/Reference/KeyboardModifiers but you'll need to use keyboard.press to hold down two keys at once. See https://www.arduino.cc/en/Reference/KeyboardPress which even has some example code.

[1] https://github.com/Chris-Johnston/BinaryKeyboard/blob/master...