A while back, I got into the custom keyboard game. It use Arduino Pro Micro as the controller powered by qmk firmware.
This is very potent combination, that allows all manner of customization. Some of the interesting ones are:
Tap Dance
Hit the semicolon key once, send a semicolon. Hit it twice, rapidly – send a colon. Hit it three times, and your keyboard’s LEDs do a wild dance...
MIDI sequencer
This turns it into a MIDI controller, if you don't know what that is, check out this guys video.
To configure this system, you have a very handy Web GUI, That will give you a .hex file that can be uploaded by QMK ToolBox, a Desktop App. This is a very quick 2 min procedure, normally.
My case however, is a bit more advanced use-case. I wanted the ability of modifying the source code and compile those changes along with keymap changes. This is something the above workflow doesn't do, as it doesn't allow uploading custom firmware up. It uses the latest master branch from the github repo as the base for compiling the .hex.
This means I have to do the following steps to get my keyboard layout changed,
- Download the layout json file
- convert it to
keymap.c
usingqmk json2c
- Copy it into a specific directory in the local qmk repo
- Add your custom code to
keymap.c
- Run
qmk compile
- Open QMK Toolbox
- Press Flash
- Press Reset on the board
- Connect the other side of split keyboard, and remove the current one.
- Repeat steps 6 & 7
- Change back the connection.
This is to be repeated for even a single key change... Which is supremely annoying when you want to attain that sweet spot.
After doing this for 12 times, I have all the revisions of the layout, I was fed up and created the below script. This one changes the above flow to.
- Download the layout json file
- Run script
- Press Reset on the board
- Connect the other side of split keyboard, and remove the current one.
- Repeat steps 6 & 7
- Change back the connection.
Which is awesome. Your welcome.
P.S. The custom code should be kept in keymap-pre.h
in the same dir as keymap.c