1 #include QMK_KEYBOARD_H
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] = LAYOUT_ergodox( // 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 macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
65 // MACRODOWN only works in this function
68 if (record->event.pressed) {
69 SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
73 if (record->event.pressed) { // For resetting EEPROM
81 bool process_record_user(uint16_t keycode, keyrecord_t *record) {
83 // dynamically generate these.
85 if (record->event.pressed) {
91 if (record->event.pressed) {
92 SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
97 if (record->event.pressed) {
98 #ifdef RGBLIGHT_ENABLE
108 // Runs just one time when the keyboard initializes.
109 void matrix_init_user(void) {
114 // Runs constantly in the background, in a loop.
115 void matrix_scan_user(void) {
117 uint8_t layer = biton32(layer_state);
119 ergodox_board_led_off();
120 ergodox_right_led_1_off();
121 ergodox_right_led_2_off();
122 ergodox_right_led_3_off();
124 // TODO: Make this relevant to the ErgoDox EZ.
126 ergodox_right_led_1_on();
129 ergodox_right_led_2_on();