2016-04-11 23:27:27 +02:00
|
|
|
#include "ergodox_ez.h"
|
|
|
|
#include "debug.h"
|
|
|
|
#include "action_layer.h"
|
|
|
|
#include "keymap_extras/keymap_bepo.h"
|
|
|
|
|
|
|
|
#define BASE 0 // default layer
|
|
|
|
#define FNX 1 // function keys
|
|
|
|
#define NUM 2 // numeric keypad keys
|
|
|
|
#define NAV 3 // navigation keys
|
|
|
|
|
|
|
|
#define KP_00 0
|
|
|
|
|
|
|
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|
|
|
/* Keymap 0: Base layer
|
|
|
|
*
|
|
|
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
2016-04-16 14:53:08 +02:00
|
|
|
* | $ | " | < | > | ( | ) | Esc | |ScroLo| @ | + | - | / | * | = |
|
2016-04-11 23:27:27 +02:00
|
|
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
2016-04-16 14:53:08 +02:00
|
|
|
* | % | B |E_ACUT| P | O |E_GRAV|Backsp| |CapsLo| ^ | V | D | L | J | Z |
|
|
|
|
* |--------+------+------+------+------+------| ace | | |------+------+------+------+------+--------|
|
2016-04-11 23:27:27 +02:00
|
|
|
* | W | A | U | I | E | , |------| |------| C | T | S | R | N | M |
|
2016-04-16 14:53:08 +02:00
|
|
|
* |--------+------+------+------+------+------|Delete| | NumLo|------+------+------+------+------+--------|
|
2016-04-11 23:27:27 +02:00
|
|
|
* | E_CIRC |A_GRAV| Y | X | . | K | | | | ' | Q | G | H | F | C_CEDIL|
|
|
|
|
* `--------+------+------+------+------+-------------,-------------. ,-------------`-------------+------+------+------+------+--------'
|
2016-04-16 14:53:08 +02:00
|
|
|
* | | |LSuper| LCtrl| LAlt| | | | | |Insert| | AltGr| RCtrl|RSuper|PrntSc| Pause|
|
2016-04-11 23:27:27 +02:00
|
|
|
* `----------------------------------' ,------|------|------| |------+------+------. `----------------------------------'
|
2016-04-16 14:53:08 +02:00
|
|
|
* | | | L_Num| | | | |
|
|
|
|
* | Space| Tab |------| |------|RShift|Enter |
|
|
|
|
* | | | L_Nav| | L_Fx | | |
|
2016-04-11 23:27:27 +02:00
|
|
|
* `--------------------' `--------------------'
|
|
|
|
*/
|
|
|
|
[BASE] = KEYMAP(
|
|
|
|
// Left hand
|
2016-04-16 14:53:08 +02:00
|
|
|
BP_DOLLAR, BP_DQOT, BP_LGIL, BP_RGIL, BP_LPRN, BP_RPRN, KC_ESC,
|
|
|
|
BP_PERCENT, BP_B, BP_E_ACUTE, BP_P, BP_O, BP_E_GRAVE, KC_BSPC,
|
2016-04-11 23:27:27 +02:00
|
|
|
BP_W, BP_A, BP_U, BP_I, BP_E, BP_COMMA,
|
2016-04-16 14:53:08 +02:00
|
|
|
BP_ECRC, BP_A_GRAVE, BP_Y, BP_X, BP_DOT, BP_K, KC_DEL,
|
|
|
|
KC_NO, KC_NO, KC_LGUI, KC_LCTL, KC_LALT,
|
|
|
|
KC_NO, KC_NO,
|
|
|
|
MO(NUM),
|
|
|
|
KC_SPC, KC_TAB, MO(NAV),
|
2016-04-11 23:27:27 +02:00
|
|
|
// Right hand
|
|
|
|
KC_SLCK, BP_AT, BP_PLUS, BP_MINUS, BP_SLASH, BP_ASTR, BP_EQUAL,
|
|
|
|
KC_CAPSLOCK, BP_DCRC, BP_V, BP_D, BP_L, BP_J, BP_Z,
|
|
|
|
BP_C, BP_T, BP_S, BP_R, BP_N, BP_M,
|
|
|
|
KC_NUMLOCK, BP_APOS, BP_Q, BP_G, BP_H, BP_F, BP_CCED,
|
2016-04-16 14:53:08 +02:00
|
|
|
BP_ALGR, KC_RCTL, KC_RGUI, KC_PSCREEN, KC_PAUSE,
|
|
|
|
KC_NO, KC_INS,
|
|
|
|
KC_NO,
|
|
|
|
MO(FNX), KC_RSHIFT, KC_ENTER),
|
2016-04-11 23:27:27 +02:00
|
|
|
/* Keymap 1: function layer
|
|
|
|
*
|
|
|
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
|
|
|
* | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
|
|
|
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
|
|
|
* | | | | | | | | | | | | | | | F12 |
|
|
|
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
2016-04-16 14:53:08 +02:00
|
|
|
* | | | | | | |------| |------| | | | | | F13 |
|
2016-04-11 23:27:27 +02:00
|
|
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
2016-04-16 14:53:08 +02:00
|
|
|
* | | | | | | | | | | | | | | | F14 |
|
2016-04-11 23:27:27 +02:00
|
|
|
* `--------+------+------+------+------+-------------,-------------. ,-------------`-------------+------+------+------+------+--------'
|
|
|
|
* | | | | | | | | | | | | | | | | | |
|
|
|
|
* `----------------------------------' ,------|------|------| |------+------+------. `----------------------------------'
|
|
|
|
* | | | | | | | |
|
|
|
|
* | | |------| |------| | |
|
|
|
|
* | | | | | | | |
|
|
|
|
* `--------------------' `--------------------'
|
|
|
|
*/
|
|
|
|
[FNX] = KEYMAP(
|
|
|
|
// Left hand
|
|
|
|
KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_NO,
|
|
|
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
|
|
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
|
|
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
2016-04-16 15:13:02 +02:00
|
|
|
KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS,
|
2016-04-11 23:27:27 +02:00
|
|
|
KC_NO, KC_NO,
|
|
|
|
KC_NO,
|
|
|
|
KC_NO, KC_NO, KC_NO,
|
|
|
|
// Right hand
|
|
|
|
KC_NO, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
|
|
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F12,
|
2016-04-16 14:53:08 +02:00
|
|
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F13,
|
|
|
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F14,
|
2016-04-16 15:13:02 +02:00
|
|
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO,
|
2016-04-11 23:27:27 +02:00
|
|
|
KC_NO, KC_NO,
|
|
|
|
KC_NO,
|
2016-04-16 15:13:02 +02:00
|
|
|
KC_TRNS, KC_TRNS, KC_NO),
|
2016-04-11 23:27:27 +02:00
|
|
|
/* Keymap 2: numeric layer, sends keypad codes
|
|
|
|
*
|
|
|
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
|
|
|
* | | | | | | | | | | | + | - | / | * | |
|
|
|
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
|
|
|
* | | | | | | | | | | | 7 | 8 | 9 | | |
|
|
|
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
|
|
|
* | | | | | | |------| |------| | 4 | 5 | 6 | | |
|
|
|
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
|
|
|
* | | | | | | | | | | | 1 | 2 | 3 | | |
|
|
|
|
* `--------+------+------+------+------+-------------,-------------. ,-------------`-------------+------+------+------+------+--------'
|
|
|
|
* | | | | | | | | | | | | | 0 | 00 | . | | |
|
|
|
|
* `----------------------------------' ,------|------|------| |------+------+------. `----------------------------------'
|
|
|
|
* | | | | | | | |
|
|
|
|
* | | |------| |------| | Enter|
|
|
|
|
* | | | | | | | |
|
|
|
|
* `--------------------' `--------------------'
|
|
|
|
*/
|
|
|
|
[NUM] = KEYMAP(
|
|
|
|
// Left hand
|
|
|
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
|
|
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
|
|
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
|
|
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
2016-04-16 15:13:02 +02:00
|
|
|
KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS,
|
2016-04-11 23:27:27 +02:00
|
|
|
KC_NO, KC_NO,
|
2016-04-16 14:53:08 +02:00
|
|
|
KC_TRNS,
|
2016-04-11 23:27:27 +02:00
|
|
|
KC_NO, KC_NO, KC_NO,
|
|
|
|
// Right hand
|
|
|
|
KC_NO, KC_NO, KC_KP_PLUS, KC_KP_MINUS, KC_KP_SLASH, KC_KP_ASTERISK, KC_NO,
|
|
|
|
KC_NO, KC_NO, KC_KP_7, KC_KP_8, KC_KP_9, KC_NO, KC_NO,
|
|
|
|
KC_NO, KC_KP_4, KC_KP_5, KC_KP_6, KC_NO, KC_NO,
|
|
|
|
KC_NO, KC_NO, KC_KP_1, KC_KP_2, KC_KP_3, KC_NO, KC_NO,
|
|
|
|
KC_KP_0, M(KP_00), KC_KP_COMMA, KC_NO, KC_NO,
|
|
|
|
KC_NO, KC_NO,
|
|
|
|
KC_NO,
|
2016-04-16 15:13:02 +02:00
|
|
|
KC_NO, KC_TRNS, KC_KP_ENTER),
|
2016-04-11 23:27:27 +02:00
|
|
|
/* Keymap 3: navigation layer
|
|
|
|
*
|
|
|
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
|
|
|
* | | | | | | | | | | | | | | | |
|
|
|
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
|
|
|
* | | | | | | | | | | | Home | Up | End | PgUp | |
|
|
|
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
|
|
|
* | | | | | | |------| |------| | Left | Down | Right| PgDn | |
|
|
|
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
|
|
|
* | | | | | | | | | | | | | | | |
|
|
|
|
* `--------+------+------+------+------+-------------,-------------. ,-------------`-------------+------+------+------+------+--------'
|
|
|
|
* | | | | | | | | | | | | | | | | | |
|
|
|
|
* `----------------------------------' ,------|------|------| |------+------+------. `----------------------------------'
|
|
|
|
* | | | | | | | |
|
|
|
|
* | | |------| |------| | |
|
|
|
|
* | | | | | | | |
|
|
|
|
* `--------------------' `--------------------'
|
|
|
|
*/
|
|
|
|
[NAV] = KEYMAP(
|
|
|
|
// Left hand
|
|
|
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
|
|
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
|
|
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
|
|
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
2016-04-16 15:13:02 +02:00
|
|
|
KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS,
|
2016-04-11 23:27:27 +02:00
|
|
|
KC_NO, KC_NO,
|
|
|
|
KC_NO,
|
2016-04-16 14:53:08 +02:00
|
|
|
KC_NO, KC_NO, KC_TRNS,
|
2016-04-11 23:27:27 +02:00
|
|
|
// Right hand
|
|
|
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
|
|
|
KC_NO, KC_NO, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_NO,
|
|
|
|
KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDOWN, KC_NO,
|
|
|
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
2016-04-16 15:13:02 +02:00
|
|
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO,
|
2016-04-11 23:27:27 +02:00
|
|
|
KC_NO, KC_NO,
|
|
|
|
KC_NO,
|
2016-04-16 15:13:02 +02:00
|
|
|
KC_NO, KC_TRNS, KC_NO)
|
2016-04-11 23:27:27 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
const uint16_t PROGMEM fn_actions[] = {
|
|
|
|
};
|
|
|
|
|
|
|
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
|
|
|
{
|
|
|
|
switch(id) {
|
|
|
|
case KP_00:
|
|
|
|
if (record->event.pressed) {
|
2016-04-16 18:06:16 +02:00
|
|
|
return MACRO( D(KP_0), U(KP_0), D(KP_0), END );
|
|
|
|
} else {
|
|
|
|
return MACRO( U(KP_0), END );
|
2016-04-11 23:27:27 +02:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
return MACRO_NONE;
|
|
|
|
};
|
|
|
|
|
|
|
|
// Runs just one time when the keyboard initializes.
|
|
|
|
void matrix_init_user(void) {
|
|
|
|
};
|
|
|
|
|
|
|
|
// Runs constantly in the background, in a loop.
|
|
|
|
void matrix_scan_user(void) {
|
|
|
|
};
|