Skip to content

Instantly share code, notes, and snippets.

@andrewcchen
Created October 15, 2016 05:14
Show Gist options
  • Save andrewcchen/b257f3351be9686829445ece72fb0f66 to your computer and use it in GitHub Desktop.
Save andrewcchen/b257f3351be9686829445ece72fb0f66 to your computer and use it in GitHub Desktop.
Satan

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 :)

  1. Dependencies.
  2. Download and install GIT: https://git-scm.com/downloads
  3. Download and install the dependencies for compiling TMK: https://github.com/tmk/tmk_keyboard/blob/core/doc/build.md (Point 1 only)
  4. Using git, download the TKG toolkit. https://github.com/kairyu/tkg-toolkit git clone git@github.com:kairyu/tkg-toolkit.git tkg
  5. Still using git, download Kairyu's fork of TMK. https://github.com/kairyu/tmk_keyboard_custom git@github.com: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.)
  6. Update the submodules for TMK. Do this from inside the tmk folder: git submodule update
  7. Compile the keymap
  8. First, you need to actually write your keymap. This is explained here: https://github.com/tmk/tmk_keyboard/blob/core/doc/keymap.md
  9. Go to tmk/keyboard/gh60
  10. Put the keymap file there (should be called keymap_SOMETHING.c, eg, keymap_custom.c)
  11. Edit the file config.h, and add this line somewhere among the similar define lines: #define GH60_REV_CHN
  12. 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
  1. To compile the keymap, run this command, substituting 'custom' with whatever your file is called. make KEYBOARD=custom
  2. Wait. At the end there should be lots of new files there. We only need one. Copy the file gh60_lufa.hex somewhere safe for now. Keep backups of this, it's your new firmware.
  3. Flash the firmware
  4. Now go to the TKG folder. Enter either the tkg/linux or the tkg/windows folder depending on your OS.
  5. 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!)
  6. 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!
  7. Enjoy!!!!
  8. If you aren't happy with the keymap, and want to make a new one, remember to make clean before you recompile.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment