Instantly share code, notes, and snippets.

Embed
What would you like to do?
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.
@nathanrosspowell

This comment has been minimized.

nathanrosspowell commented Jan 19, 2016

Point 2 iv: make KEYMAP=custom is what worked for me.

@jtmchorse

This comment has been minimized.

jtmchorse commented Apr 13, 2016

Point 1 iv: needs to have this as well it would seem. https://github.com/kairyu/tmk_keyboard_custom#updates

@nearlyepic

This comment has been minimized.

nearlyepic commented Dec 9, 2016

Hey, thanks for the awesome guide. Something I noticed though:

Point 2 v: The GH60 I had, has "Breathing LED" support. I was able to only comment out KEYMAP_IN_EEPROM_ENABLE and have the rest of the firmware compile fine. Adding backlight control keys to the keymap allowed me to use my backlights! Should have been something I noticed, but hopefully this can assist anyone else :)

Also, on Windows I find that it's a lot easier to compile the firmware on linux, then flash the .hex file using Atmel FLIP. Just my two cents.

@gregflynn

This comment has been minimized.

gregflynn commented Feb 7, 2017

Hey looks like the keyboard.md got moved, searched in the TMK repo and found it here: https://github.com/tmk/tmk_keyboard/blob/master/tmk_core/doc/keymap.md

@zfjagann

This comment has been minimized.

zfjagann commented Feb 11, 2017

These instructions are awesome! I was really worried I had made a mistake and shorted something until I found this! 😄

I put together a Makefile that follows these instructions here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment