I've gotten the code more or less in a shareable state. Still not perfect I'm sure, but good enough for now.
The layout for USB keyboarding is defined here:
If you don't need a USB keyboard and are rolling your own hardware project then you can focus on this layout:
There are three layers defined: base, shift, and Fn layers.
USB can be disabled by commenting out define USE_TEENSY_USB_KEYBOARD.
All the keyboardy goodness is handled by the keyboard_update(); function called from inside the standard arduino loop().
If you don't need the keys to behave like a keyboard you can gut most of that example and just use key_matrix.update(); The KeyboardMatrix class handles reading the button states.
An alternative firmware option for a pure USB keyboard would be to run the excellent https://github.com/qmk/qmk_firmware.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.