This is a quick guide to changing the keymap on the GH60 "Satan" or RevCHN. Note that the Satan is NOT a true GH60, and using the GH60 with the normal TMK would not work.
Note that installing dependencies or compiling TMK is not a part of the scope of this document. If you have problems with this part, seek help elsewhere. Note also that these instructions are written for Linux and Mac. If you're using windows, just use the Command Prompt for the git commands, and Windows Explorer to move and delete files. Thirdly, I don't do backlighting or lighting. Whenever I tried to compile this software with support for pwm or any of that stuff, it failed, so I removed those functions. So if you like the lights, you have some debugging to do. Feel free to fork this gist and send me a PR if you can fix it :)
- Download and install GIT: https://git-scm.com/downloads
- Download and install the dependencies for compiling TMK: https://github.com/tmk/tmk_keyboard/blob/core/doc/build.md (Point 1 only)
- Using git, download the TKG toolkit. https://github.com/kairyu/tkg-toolkit
git clone email@example.com:kairyu/tkg-toolkit.git tkg
- Still using git, download Kairyu's fork of TMK. https://github.com/kairyu/tmk_keyboard_custom
firstname.lastname@example.org:kairyu/tmk_keyboard_custom.git tmk(Note that I've renamed the folders and that they're named quite similarly. Take care of which you're working in in order not to get things wrong.)
- Update the submodules for TMK. Do this from inside the tmk folder:
git submodule update
- Compile the keymap
- First, you need to actually write your keymap. This is explained here: https://github.com/tmk/tmk_keyboard/blob/core/doc/keymap.md
- Go to tmk/keyboard/gh60
- Put the keymap file there (should be called keymap_SOMETHING.c, eg, keymap_custom.c)
- Edit the file config.h, and add this line somewhere among the similar
- Edit the file Makefile, and comment out (add a # at the beginning of each line) these lines:
#BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality #KEYMAP_IN_EEPROM_ENABLE = yes # Read keymap from eeprom #KEYMAP_SECTION_ENABLE = yes # Fixed address keymap for keymapeditor #SOFTPWM_LED_ENABLE = yes # Enable SoftPWM to drive backlight #FADING_LED_ENABLE = yes # Enable fading backlight #BREATHING_LED_ENABLE = yes # Enable breathing backlight #LEDMAP_ENABLE = yes # Enable LED mapping #LEDMAP_IN_EEPROM_ENABLE = yes # Read LED mapping from eeprom
- To compile the keymap, run this command, substituting 'custom' with whatever your file is called.
- Wait. At the end there should be lots of new files there. We only need one. Copy the file
gh60_lufa.hexsomewhere safe for now. Keep backups of this, it's your new firmware.
- Flash the firmware
- Now go to the TKG folder. Enter either the tkg/linux or the tkg/windows folder depending on your OS.
- Run the setup script. Use these options: 1. 2 - GH60 RevCHN 2. y - .. Yes... 3. 1 - Default 4. 1 - atmel_dfu (Yes, I know the file says lufa. That doesn't matter!)
- Cheat. 1. Rename tkg/common/firmware/gh60-revchn.hex to gh60-revchn.original.hex 2. Copy your firmware from one of your several backups to the same folder, and rename it gh60-revchn.hex 3. Back in the windows/linux folder, run reflash. Press enter, and when it says "Waiting for bootloader", press the little button on the bottom of the PCB. 4. You are now finished!
- If you aren't happy with the keymap, and want to make a new one, remember to
make cleanbefore you recompile.