3 #include "action_layer.h"
6 #define BASE 0 // default layer
7 #define SYMB 1 // symbols
8 #define MDIA 2 // media keys
10 enum custom_keycodes {
11 PLACEHOLDER = SAFE_RANGE, // can always be here
17 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
18 /* Keymap 0: Basic layer
20 * ,--------------------------------------------------. ,--------------------------------------------------.
21 * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - |
22 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
23 * | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ |
24 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
25 * | BkSp | A | S | D | F | G |------| |------| H | J | K | L |; / L2|' / Cmd |
26 * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
27 * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift |
28 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
29 * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 |
30 * `----------------------------------' `----------------------------------'
31 * ,-------------. ,-------------.
32 * | App | LGui | | Alt |Ctrl/Esc|
33 * ,------|------|------| |------+--------+------.
34 * | | | Home | | PgUp | | |
35 * | Space|Backsp|------| |------| Tab |Enter |
36 * | |ace | End | | PgDn | | |
37 * `--------------------' `----------------------'
39 // If it accepts an argument (i.e, is a function), it doesn't need KC_.
40 // Otherwise, it needs KC_*
41 [BASE] = KEYMAP( // layer 0 : default
43 EPRM, EPRM, EPRM, EPRM, EPRM, EPRM, EPRM,
44 EPRM, EPRM, EPRM, EPRM, EPRM, EPRM, EPRM,
45 EPRM, EPRM, EPRM, EPRM, EPRM, EPRM,
46 EPRM, EPRM, EPRM, EPRM, EPRM, EPRM, EPRM,
47 EPRM, EPRM, EPRM, EPRM,EPRM,
52 EPRM, EPRM, EPRM, EPRM, EPRM, EPRM, EPRM,
53 EPRM, EPRM, EPRM, EPRM, EPRM, EPRM, EPRM,
54 EPRM, EPRM, EPRM, EPRM, EPRM,EPRM,
55 EPRM,EPRM, EPRM, EPRM,EPRM, EPRM, EPRM,
56 EPRM, EPRM,EPRM,EPRM, EPRM,
63 const uint16_t PROGMEM fn_actions[] = {
64 [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols)
67 const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
69 // MACRODOWN only works in this function
72 if (record->event.pressed) {
73 SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
77 if (record->event.pressed) { // For resetting EEPROM
85 bool process_record_user(uint16_t keycode, keyrecord_t *record) {
87 // dynamically generate these.
89 if (record->event.pressed) {
95 if (record->event.pressed) {
96 SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
101 if (record->event.pressed) {
102 #ifdef RGBLIGHT_ENABLE
112 // Runs just one time when the keyboard initializes.
113 void matrix_init_user(void) {
118 // Runs constantly in the background, in a loop.
119 void matrix_scan_user(void) {
121 uint8_t layer = biton32(layer_state);
123 ergodox_board_led_off();
124 ergodox_right_led_1_off();
125 ergodox_right_led_2_off();
126 ergodox_right_led_3_off();
128 // TODO: Make this relevant to the ErgoDox EZ.
130 ergodox_right_led_1_on();
133 ergodox_right_led_2_on();