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 bool process_record_user(uint16_t keycode, keyrecord_t *record) {
65 // dynamically generate these.
67 if (record->event.pressed) {
73 if (record->event.pressed) {
74 SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
79 if (record->event.pressed) {
80 #ifdef RGBLIGHT_ENABLE
90 // Runs just one time when the keyboard initializes.
91 void matrix_init_user(void) {
96 // Runs constantly in the background, in a loop.
97 void matrix_scan_user(void) {
99 uint8_t layer = biton32(layer_state);
101 ergodox_board_led_off();
102 ergodox_right_led_1_off();
103 ergodox_right_led_2_off();
104 ergodox_right_led_3_off();
106 // TODO: Make this relevant to the ErgoDox EZ.
108 ergodox_right_led_1_on();
111 ergodox_right_led_2_on();