What is SpaceFN and why you should give it a try
The SpaceFN concept - setting up your space key as a layer switch when held - is probably one of the most useful tweaks in the keyboard hobby. Let me explain how it works. My SpaceFN article on kbd.news made some rounds recently - quite surprisingly given the age of this concept. This piece you're reading is a condensed version of the full post. If you're left with unanswered questions, you'll most likely find the info you're looking for in the original write-up. On my imaginary top list of the most useful keyboard features, tweaks and hacks, SpaceFN would deserve a podium finish for sure. But what makes it so special? In short: SpaceFN is easy to implement, easy to learn, costs nothing, can be used with any keyboard, and can improve your productivity instantly. I will list its benefits below, but can state right at this point that the SpaceFN concept, setting up your space key as a layer switch when held, is clearly one of the most useful tweaks in the keyboard hobby....
Apr 30, 2024
It took me a while to figure out programming with TMK. I wasn't able to get the code from https://github.com/jichuntao/tmk_keyboard to compile, but using the main TMK source for the GH60 with the matrix file for the KC60 seemed to work. I'm still playing around with layouts, but I love the programming ability on this thing and spacefn works much better in hardware than with software.
I made a basic Ubuntu VM with VirtualBox. I started with a command line only server install but quickly realized that I like having a graphical interface so I installed LUbuntu. I'm not sure what all I installed. Maybe just git dfu-util and dfu-programmer? `sudo apt-get install -y git dfu-util dfu-programmer`
I think the url's will get moved to the bottom of the message, so this will probably be pretty ugly.
You should be able to run `git clone ` and then the tmk url below to clone the main tmk source locally. I replaced the /tmk_keyboard/keyboard/gh60/matrix.c file with the matrix.c file linked below. You can use or modify any of the existing keymap_ files in that /gh60 folder to start with or create your own. The keymap_kc60.c file below is what I'm using. It's a work in progress and pretty ugly but it works.
To program the board push the button on the bottom to put it into programming mode. It should show up with the Atmel controller name in this mode. Right click the USB icon at the bottom of the VirtualBox window and click the Atmel device to pass it through to the VM.
In your terminal you'll want to go to the tmk_keyboard/keyboard/gh60/ folder and use the following:
sudo make KEYMAP=keymapfile clean sudo make KEYMAP=keymapfile dfu
Where keymapfile is the name of the keymap file you want to use. In this case I'd use `kc60` If all goes well it should build the firmware, flash it, and reset the keyboard so it's ready to use.
I can't stress enough that I'm learning this as I go. I'm a complete novice with both linux and programming so the above is probably worth what you paid for it. :)
https://github.com/tmk/tmk_keyboard https://github.com/jichuntao/tmk_keyboard/blob/master/keyboard/kc60/matrix.c https://github.com/GorillaDiapers/tmk_keyboard/blob/master/keyboard/gh60/keymap_kc60.c