--- /dev/null
+#----------------------------------------------------------------------------\r
+# On command line:\r
+#\r
+# make all = Make software.\r
+#\r
+# make clean = Clean out built project files.\r
+#\r
+# make coff = Convert ELF to AVR COFF.\r
+#\r
+# make extcoff = Convert ELF to AVR Extended COFF.\r
+#\r
+# make program = Download the hex file to the device.\r
+# Please customize your programmer settings(PROGRAM_CMD)\r
+#\r
+# make teensy = Download the hex file to the device, using teensy_loader_cli.\r
+# (must have teensy_loader_cli installed).\r
+#\r
+# make dfu = Download the hex file to the device, using dfu-programmer (must\r
+# have dfu-programmer installed).\r
+#\r
+# make flip = Download the hex file to the device, using Atmel FLIP (must\r
+# have Atmel FLIP installed).\r
+#\r
+# make dfu-ee = Download the eeprom file to the device, using dfu-programmer\r
+# (must have dfu-programmer installed).\r
+#\r
+# make flip-ee = Download the eeprom file to the device, using Atmel FLIP\r
+# (must have Atmel FLIP installed).\r
+#\r
+# make debug = Start either simulavr or avarice as specified for debugging, \r
+# with avr-gdb or avr-insight as the front end for debugging.\r
+#\r
+# make filename.s = Just compile filename.c into the assembler code only.\r
+#\r
+# make filename.i = Create a preprocessed source file for use in submitting\r
+# bug reports to the GCC project.\r
+#\r
+# To rebuild project do "make clean" then "make all".\r
+#----------------------------------------------------------------------------\r
+\r
+# Target file name (without extension).\r
+TARGET = gh60\r
+\r
+\r
+# Directory common source filess exist\r
+TOP_DIR = ../..\r
+TMK_DIR = ../../tmk_core\r
+\r
+# Directory keyboard dependent files exist\r
+TARGET_DIR = .\r
+\r
+# # project specific files\r
+SRC = gh60.c\r
+\r
+ifdef KEYMAP\r
+ SRC := keymaps/$(KEYMAP).c $(SRC)\r
+else\r
+ SRC := keymaps/default.c $(SRC)\r
+endif\r
+\r
+CONFIG_H = config.h\r
+\r
+# MCU name\r
+#MCU = at90usb1287\r
+MCU = atmega32u4\r
+\r
+# Processor frequency.\r
+# This will define a symbol, F_CPU, in all source code files equal to the\r
+# processor frequency in Hz. You can then use this symbol in your source code to\r
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done\r
+# automatically to create a 32-bit value in your source code.\r
+#\r
+# This will be an integer division of F_USB below, as it is sourced by\r
+# F_USB after it has run through any CPU prescalers. Note that this value\r
+# does not *change* the processor frequency - it should merely be updated to\r
+# reflect the processor speed set externally so that the code can use accurate\r
+# software delays.\r
+F_CPU = 16000000\r
+\r
+\r
+#\r
+# LUFA specific\r
+#\r
+# Target architecture (see library "Board Types" documentation).\r
+ARCH = AVR8\r
+\r
+# Input clock frequency.\r
+# This will define a symbol, F_USB, in all source code files equal to the\r
+# input clock frequency (before any prescaling is performed) in Hz. This value may\r
+# differ from F_CPU if prescaling is used on the latter, and is required as the\r
+# raw input clock is fed directly to the PLL sections of the AVR for high speed\r
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'\r
+# at the end, this will be done automatically to create a 32-bit value in your\r
+# source code.\r
+#\r
+# If no clock division is performed on the input clock inside the AVR (via the\r
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
+F_USB = $(F_CPU)\r
+\r
+# Interrupt driven control endpoint task(+60)\r
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT\r
+\r
+\r
+# Boot Section Size in *bytes*\r
+# Teensy halfKay 512\r
+# Teensy++ halfKay 1024\r
+# Atmel DFU loader 4096\r
+# LUFA bootloader 4096\r
+# USBaspLoader 2048\r
+OPT_DEFS += -DBOOTLOADER_SIZE=4096\r
+\r
+\r
+# Build Options\r
+# comment out to disable the options.\r
+#\r
+BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)\r
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)\r
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)\r
+# CONSOLE_ENABLE = yes # Console for debug(+400)\r
+# COMMAND_ENABLE = yes # Commands for debug and configuration\r
+KEYBOARD_LOCK_ENABLE = yes # Allow locking of keyboard via magic key\r
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE\r
+# SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend\r
+NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work\r
+# BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality\r
+# MIDI_ENABLE = YES # MIDI controls\r
+# UNICODE_ENABLE = YES # Unicode\r
+# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID\r
+\r
+\r
+# Optimize size but this may cause error "relocation truncated to fit"\r
+#EXTRALDFLAGS = -Wl,--relax\r
+\r
+# Search Path\r
+VPATH += $(TARGET_DIR)\r
+VPATH += $(TOP_DIR)\r
+VPATH += $(TMK_DIR)\r
+\r
+include $(TOP_DIR)/quantum/quantum.mk\r
+\r
--- /dev/null
+## gh60 Rev C keyboard firmware\r
+\r
+![gh60 Rev C PCB](gh60revc.jpg)\r
+\r
+ /* Column pin configuration\r
+ * col: 0 1 2 3 4 5 6 7 8 9 10 11 12 13\r
+ * pin: F0 F1 E6 C7 C6 B6 D4 B1 B7 B5 B4 D7 D6 B3 (Rev.C)\r
+ */\r
+ \r
+ /* Row pin configuration\r
+ * row: 0 1 2 3 4\r
+ * pin: D0 D1 D2 D3 D5\r
+ */\r
+ \r
+ GPIO pads\r
+ 0 F7 WASD LEDs\r
+ 1 F6 ESC LED\r
+ 2 F5 FN LED\r
+ 3 F4 POKER Arrow LEDs\r
+ \r
+ B2 Capslock LED\r
+ B0 not connected\r
+ \r
+Functions to controls LED clusters\r
+ \r
+ gh60_caps_led_on()\r
+ gh60_poker_leds_on()\r
+ gh60_fn_led_on()\r
+ gh60_esc_led_on()\r
+ gh60_wasd_leds_on()\r
+ \r
+ gh60_caps_led_off()\r
+ gh60_poker_leds_off()\r
+ gh60_fn_led_off()\r
+ gh60_esc_led_off()\r
+ gh60_wasd_leds_off()\r
+ \r
+======================\r
+\r
+## Quantum MK Firmware\r
+\r
+For the full Quantum feature list, see [the parent README.md](/README.md).\r
+\r
+## Building\r
+\r
+Download or clone the whole firmware and navigate to the keyboard/gh60_rev_c folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. \r
+\r
+Depending on which keymap you would like to use, you will have to compile slightly differently.\r
+\r
+### Default\r
+To build with the default keymap, simply run `make`.\r
+\r
+### Other Keymaps\r
+Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `<name>.c` in the keymaps folder, and see keymap document (you can find in top README.md) and existent keymap files.\r
+\r
+To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like:\r
+```\r
+$ make KEYMAP=[default|jack|<name>]\r
+```\r
+Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.\r
--- /dev/null
+/*\r
+Copyright 2012 Jun Wako <wakojun@gmail.com>\r
+\r
+This program is free software: you can redistribute it and/or modify\r
+it under the terms of the GNU General Public License as published by\r
+the Free Software Foundation, either version 2 of the License, or\r
+(at your option) any later version.\r
+\r
+This program is distributed in the hope that it will be useful,\r
+but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+GNU General Public License for more details.\r
+\r
+You should have received a copy of the GNU General Public License\r
+along with this program. If not, see <http://www.gnu.org/licenses/>.\r
+*/\r
+\r
+#ifndef CONFIG_H\r
+#define CONFIG_H\r
+\r
+#include "config_common.h"\r
+\r
+/* USB Device descriptor parameter */\r
+#define VENDOR_ID 0xFEED\r
+#define PRODUCT_ID 0x6060\r
+#define DEVICE_VER 0x0001\r
+#define MANUFACTURER You\r
+#define PRODUCT gh60\r
+#define DESCRIPTION A custom keyboard\r
+\r
+/* key matrix size */\r
+#define MATRIX_ROWS 5\r
+#define MATRIX_COLS 14\r
+\r
+/*\r
+ * Keyboard Matrix Assignments\r
+ *\r
+ * Change this to how you wired your keyboard\r
+ * COLS: AVR pins used for columns, left to right\r
+ * ROWS: AVR pins used for rows, top to bottom\r
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)\r
+ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)\r
+ *\r
+*/ \r
+#define COLS (int []){ F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3 }\r
+#define ROWS (int []){ D0, D1, D2, D3, D5 }\r
+\r
+/* COL2ROW or ROW2COL */\r
+#define DIODE_DIRECTION COL2ROW\r
+\r
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */\r
+#define DEBOUNCE 5\r
+\r
+/* define if matrix has ghost (lacks anti-ghosting diodes) */\r
+//#define MATRIX_HAS_GHOST\r
+\r
+/* number of backlight levels */\r
+#define BACKLIGHT_LEVELS 3\r
+\r
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */\r
+#define LOCKING_SUPPORT_ENABLE\r
+/* Locking resynchronize hack */\r
+#define LOCKING_RESYNC_ENABLE\r
+\r
+/* \r
+ * Force NKRO\r
+ *\r
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved \r
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the\r
+ * makefile for this to work.)\r
+ *\r
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)\r
+ * until the next keyboard reset.\r
+ *\r
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is \r
+ * fully operational during normal computer usage.\r
+ *\r
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)\r
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by\r
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a\r
+ * power-up.\r
+ *\r
+ */\r
+//#define FORCE_NKRO\r
+\r
+/*\r
+ * Magic Key Options\r
+ *\r
+ * Magic keys are hotkey commands that allow control over firmware functions of\r
+ * the keyboard. They are best used in combination with the HID Listen program,\r
+ * found here: https://www.pjrc.com/teensy/hid_listen.html\r
+ *\r
+ * The options below allow the magic key functionality to be changed. This is \r
+ * useful if your keyboard/keypad is missing keys and you want magic key support.\r
+ *\r
+ */\r
+\r
+/* key combination for magic key command */\r
+#define IS_COMMAND() ( \\r
+ keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \\r
+)\r
+\r
+/* control how magic key switches layers */\r
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true\r
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true\r
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false\r
+\r
+/* override magic key keymap */\r
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS\r
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS\r
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM\r
+//#define MAGIC_KEY_HELP1 H\r
+//#define MAGIC_KEY_HELP2 SLASH\r
+//#define MAGIC_KEY_DEBUG D\r
+//#define MAGIC_KEY_DEBUG_MATRIX X\r
+//#define MAGIC_KEY_DEBUG_KBD K\r
+//#define MAGIC_KEY_DEBUG_MOUSE M\r
+//#define MAGIC_KEY_VERSION V\r
+//#define MAGIC_KEY_STATUS S\r
+//#define MAGIC_KEY_CONSOLE C\r
+//#define MAGIC_KEY_LAYER0_ALT1 ESC\r
+//#define MAGIC_KEY_LAYER0_ALT2 GRAVE\r
+//#define MAGIC_KEY_LAYER0 0\r
+//#define MAGIC_KEY_LAYER1 1\r
+//#define MAGIC_KEY_LAYER2 2\r
+//#define MAGIC_KEY_LAYER3 3\r
+//#define MAGIC_KEY_LAYER4 4\r
+//#define MAGIC_KEY_LAYER5 5\r
+//#define MAGIC_KEY_LAYER6 6\r
+//#define MAGIC_KEY_LAYER7 7\r
+//#define MAGIC_KEY_LAYER8 8\r
+//#define MAGIC_KEY_LAYER9 9\r
+//#define MAGIC_KEY_BOOTLOADER PAUSE\r
+//#define MAGIC_KEY_LOCK CAPS\r
+//#define MAGIC_KEY_EEPROM E\r
+//#define MAGIC_KEY_NKRO N\r
+//#define MAGIC_KEY_SLEEP_LED Z\r
+\r
+/*\r
+ * Feature disable options\r
+ * These options are also useful to firmware size reduction.\r
+ */\r
+\r
+/* disable debug print */\r
+//#define NO_DEBUG\r
+\r
+/* disable print */\r
+//#define NO_PRINT\r
+\r
+/* disable action features */\r
+//#define NO_ACTION_LAYER\r
+//#define NO_ACTION_TAPPING\r
+//#define NO_ACTION_ONESHOT\r
+//#define NO_ACTION_MACRO\r
+//#define NO_ACTION_FUNCTION\r
+\r
+#endif\r
--- /dev/null
+#include "gh60.h"\r
+#include "led.h"\r
+\r
+__attribute__ ((weak))\r
+void matrix_init_user(void) {\r
+ // leave this function blank - it can be defined in a keymap file\r
+};\r
+\r
+__attribute__ ((weak))\r
+void matrix_scan_user(void) {\r
+ // leave this function blank - it can be defined in a keymap file\r
+}\r
+\r
+__attribute__ ((weak))\r
+void process_action_user(keyrecord_t *record) {\r
+ // leave this function blank - it can be defined in a keymap file\r
+}\r
+\r
+__attribute__ ((weak))\r
+void led_set_user(uint8_t usb_led) {\r
+ // leave this function blank - it can be defined in a keymap file\r
+}\r
+\r
+void matrix_init_kb(void) {\r
+ // put your keyboard start-up code here\r
+ // runs once when the firmware starts up\r
+\r
+ matrix_init_user();\r
+}\r
+\r
+void matrix_scan_kb(void) {\r
+ // put your looping keyboard code here\r
+ // runs every cycle (a lot)\r
+\r
+ matrix_scan_user();\r
+}\r
+\r
+void process_action_kb(keyrecord_t *record) {\r
+ // put your per-action keyboard code here\r
+ // runs for every action, just before processing by the firmware\r
+\r
+ process_action_user(record);\r
+}\r
+\r
+void led_set_kb(uint8_t usb_led) {\r
+ // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here\r
+ \r
+ if (usb_led & (1<<USB_LED_CAPS_LOCK)) {\r
+ gh60_caps_led_on();\r
+ } else {\r
+ gh60_caps_led_off(); \r
+ }\r
+ \r
+ // if (usb_led & (1<<USB_LED_NUM_LOCK)) {\r
+ // gh60_esc_led_on();\r
+ // } else {\r
+ // gh60_esc_led_off(); \r
+ // }\r
+ \r
+ // if (usb_led & (1<<USB_LED_SCROLL_LOCK)) {\r
+ // gh60_fn_led_on();\r
+ // } else {\r
+ // gh60_fn_led_off(); \r
+ // }\r
+\r
+ led_set_user(usb_led); \r
+}\r
--- /dev/null
+#ifndef GH60_H\r
+#define GH60_H\r
+\r
+#include "matrix.h"\r
+#include "keymap_common.h"\r
+#include "backlight.h"\r
+#include <stddef.h>\r
+\r
+/* GH60 LEDs \r
+ * GPIO pads\r
+ * 0 F7 WASD LEDs\r
+ * 1 F6 ESC LED\r
+ * 2 F5 FN LED\r
+ * 3 F4 POKER Arrow LEDs\r
+ * B2 Capslock LED\r
+ * B0 not connected\r
+ */\r
+inline void gh60_caps_led_on(void) { DDRB |= (1<<2); PORTB &= ~(1<<2); }\r
+inline void gh60_poker_leds_on(void) { DDRF |= (1<<4); PORTF &= ~(1<<4); }\r
+inline void gh60_fn_led_on(void) { DDRF |= (1<<5); PORTF &= ~(1<<5); }\r
+inline void gh60_esc_led_on(void) { DDRF |= (1<<6); PORTF &= ~(1<<6); }\r
+inline void gh60_wasd_leds_on(void) { DDRF |= (1<<7); PORTF &= ~(1<<7); }\r
+\r
+inline void gh60_caps_led_off(void) { DDRB &= ~(1<<2); PORTB &= ~(1<<2); }\r
+inline void gh60_poker_leds_off(void) { DDRF &= ~(1<<4); PORTF &= ~(1<<4); }\r
+inline void gh60_fn_led_off(void) { DDRF &= ~(1<<5); PORTF &= ~(1<<5); }\r
+inline void gh60_esc_led_off(void) { DDRF &= ~(1<<6); PORTF &= ~(1<<6); }\r
+inline void gh60_wasd_leds_off(void) { DDRF &= ~(1<<7); PORTF &= ~(1<<7); }\r
+\r
+/* GH60 keymap definition macro\r
+ * K2C, K31 and K3C are extra keys for ISO\r
+ */\r
+#define KEYMAP( \\r
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \\r
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \\r
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \\r
+ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \\r
+ K40, K41, K42, K45, K49, K4A, K4B, K4C, K4D \\r
+) { \\r
+ { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_##K0A, KC_##K0B, KC_##K0C, KC_##K0D }, \\r
+ { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D }, \\r
+ { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K2A, KC_##K2B, KC_##K2C, KC_##K2D }, \\r
+ { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D }, \\r
+ { KC_##K40, KC_##K41, KC_##K42, KC_NO, KC_NO, KC_##K45, KC_NO, KC_NO, KC_NO, KC_##K49, KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D } \\r
+}\r
+\r
+/* ANSI valiant. No extra keys for ISO */\r
+#define KEYMAP_ANSI( \\r
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \\r
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \\r
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \\r
+ K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \\r
+ K40, K41, K42, K45, K4A, K4B, K4C, K4D \\r
+) KEYMAP( \\r
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \\r
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \\r
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, NO, K2D, \\r
+ K30, NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, NO, K3D, \\r
+ K40, K41, K42, K45, NO, K4A, K4B, K4C, K4D \\r
+)\r
+\r
+#define KEYMAP_HHKB( \\r
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K49,\\r
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \\r
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \\r
+ K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \\r
+ K40, K41, K42, K45, K4A, K4B, K4C, K4D \\r
+) KEYMAP( \\r
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \\r
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \\r
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, NO, K2D, \\r
+ K30, NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \\r
+ K40, K41, K42, K45, K49, K4A, K4B, K4C, K4D \\r
+)\r
+\r
+void matrix_init_user(void);\r
+void matrix_scan_user(void);\r
+void process_action_user(keyrecord_t *record);\r
+void led_set_user(uint8_t usb_led);\r
+\r
+#endif\r
--- /dev/null
+#include "gh60.h"
+#include "action_layer.h"
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* 0: qwerty */
+ KEYMAP(
+ ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, GRV, \
+ TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSPC, \
+ CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT,NO, ENT, \
+ LSFT,FN1, Z, X, C, V, B, N, M, COMM,DOT, SLSH,FN0, RSFT, \
+ LCTL,LGUI,LALT, SPC, BSLS,RALT,RGUI,APP, RCTL),
+ /* 1: fn */
+ KEYMAP(
+ ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, \
+ TRNS,TRNS,UP, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \
+ TRNS,LEFT,DOWN,RGHT,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \
+ TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \
+ TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS,TRNS,TRNS),
+ /* 2: arrows */
+ KEYMAP(
+ TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \
+ TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \
+ TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \
+ TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,UP, \
+ TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,LEFT,DOWN,RGHT),
+};
+
+const uint16_t PROGMEM fn_actions[] = {
+ [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay
+ [1] = ACTION_LAYER_TOGGLE(2), // toggle arrow overlay
+};
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+ // MACRODOWN only works in this function
+ switch(id) {
+ case 0:
+ if (record->event.pressed) {
+ register_code(KC_RSFT);
+ } else {
+ unregister_code(KC_RSFT);
+ }
+ break;
+ }
+ return MACRO_NONE;
+};
+
+void matrix_scan_user(void) {
+
+//Layer LED indicators
+ uint32_t layer = layer_state;
+
+ if (layer & (1<<1)) {
+ gh60_wasd_leds_on();
+ gh60_fn_led_on();
+ } else {
+ gh60_wasd_leds_off();
+ gh60_fn_led_off();
+ }
+
+ if (layer & (1<<2)) {
+ gh60_poker_leds_on();
+ gh60_esc_led_on();
+ } else {
+ gh60_poker_leds_off();
+ gh60_esc_led_off();
+ }
+
+};
--- /dev/null
+ /* Column pin configuration\r
+ * col: 0 1 2 3 4 5 6 7 8 9 10 11 12 13\r
+ * pin: F0 F1 E6 C7 C6 B6 D4 B1 B7 B5 B4 D7 D6 B3 (Rev.C)\r
+ */\r
+ \r
+ /* Row pin configuration\r
+ * row: 0 1 2 3 4\r
+ * pin: D0 D1 D2 D3 D5\r
+ */\r
+ \r
+ GPIO pads\r
+ 0 F7 WASD LEDs\r
+ 1 F6 ESC LED\r
+ 2 F5 FN LED\r
+ 3 F4 POKER Arrow LEDs\r
+ \r
+ B2 Capslock LED\r
+ B0 not connected
\ No newline at end of file