geekhack
geekhack Projects => Making Stuff Together! => Topic started by: Ro-76 on Tue, 30 April 2019, 07:37:55
-
I have read this forum and watched numerous videos on the topic of building a custom keyboard, but can't seem to find a simple answer to my problem.
I have built a small custom keypad of 16 keys to control shortcuts on a radiology workstation. I've wired it all up as a matrix of 4 columns and 4 rows wired to a 8 pins on a teensy 2.0 with diodes etc. I've got the teensy communicating properly over usb to teensyduino.
I'm running into a challenge with the firmware build. I don't need any fancy bells or whistles, I just need to program my 16 keys with simple keystrokes like function keys and letters. I may stretch to having 2 keys that do ctrl+c and ctrl+x at most.
Could anyone please suggest a starting point or firmware to begin with. Most firmwares that I have looked at seem much more feature-rich and hence more complicated for a newbie like me.
Many thanks!
-
I can't find a drop-in solution for you but have a look here (https://www.pjrc.com/teensy/td_libs_Keypad.html) to get started.
-
I can't find a drop-in solution for you but have a look here (https://www.pjrc.com/teensy/td_libs_Keypad.html) to get started.
was about to post the same:
KeypadTutorial (https://playground.arduino.cc/Main/KeypadTutorial/)
But thats only one part. What you also want is send the key as a keypress to the computer.
For this you also need this:
Keyboard.print() (https://www.arduino.cc/en/Reference/KeyboardPrint)
If you want to do key combos you might also need Keyboard.press() (https://www.arduino.cc/en/Reference/KeyboardPress) and Keyboard.release() (https://www.arduino.cc/en/Reference/KeyboardRelease)
That should get you started ;)
-
was just playing with this for a project another forum member is working on... try this
(disclaimer.... i've never used the firmware from this site yet, but it's a web configurator for qmk, give it a shot)
go here: https://kbfirmware.com/
dump you layout into the "paste here" spot
[{a:7},"","","",""],
["","","",""],
["","","",""],
["","","",""]
- import
- go through the tabs & set it up how you have it wired & what you want the keys to be in the tabs below the layout (ATmega32U4 for teensy 2.0)
- macros (key combinations) also available on there.
- macro tab, pick a number, record macro, stop recording
- keymap tab, select a key, configure click "KC_SPC", fn tab, click "M()", then select macro number you just recorded
- when all done, go to compile tab & generate the hex file, upload to teensy with teensy loader
all web based, no coding necessary.
your layout from keyboard layout editor (http://www.keyboard-layout-editor.com/##@@_a:7%3B&=&=&=&=%3B&@=&=&=&=%3B&@=&=&=&=%3B&@=&=&=&=)
-
was just playing with this for a project another forum member is working on... try this
(disclaimer.... i've never used the firmware from this site yet, but it's a web configurator for qmk, give it a shot)
go here: https://kbfirmware.com/
dump you layout into the "paste here" spot
[{a:7},"","","",""],
["","","",""],
["","","",""],
["","","",""]
- import
- go through the tabs & set it up how you have it wired & what you want the keys to be in the tabs below the layout (ATmega32U4 for teensy 2.0)
- macros (key combinations) also available on there.
- macro tab, pick a number, record macro, stop recording
- keymap tab, select a key, configure click "KC_SPC", fn tab, click "M()", then select macro number you just recorded
- when all done, go to compile tab & generate the hex file, upload to teensy with teensy loader
all web based, no coding necessary.
your layout from keyboard layout editor (http://www.keyboard-layout-editor.com/##@@_a:7%3B&=&=&=&=%3B&@=&=&=&=%3B&@=&=&=&=%3B&@=&=&=&=)
Thanks for all the help. This worked really well. I'm now up and running. The only thing I can't perfect is combinations like CTRL+C etc, but I'll keep trying.
Thanks again for all the great advice.
-
quick screen grab vid/how-to https://cl.ly/4e15d80bb60c
make sure you set macro key on default layer if you're only using one layer