Hacker News new | past | comments | ask | show | jobs | submit login

This is such a cool hack. I love it. I want to make one, too. This guy is a true hacker.

Now it's time to nitpick. It doesn't seem that there's any way to generate key-codes.

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?

One can make control-key combinations, but that limits one to what's available in ASCII. For instance, there's no way to distinguish Ctrl-j from the Return key.

That last point brings up something related. In ASCII, the Control key modifies the bit representation of the key pressed. That's why Emacs in terminal mode can't tell the difference between Ctrl-j, Ctrl-J, and Return. In modern user interfaces, the Control and Alt keys are specialized shift keys that let the OS and applications tell the difference.

Of course, one could do the same workarounds that terminal emulators perform, like using escape sequences and such. Then, while using this device, one would have to know the proper sequences for xterm, or vt420, or, or, or…

Still, nice hack.

EDIT: By the way. Some poor lost soul should be forced to use Emacs with this keyboard. Any suggestions on who should be condemned?




> 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...




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: