8 #define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
10 // Each layer gets a name for readability, which is then used in the keymap matrix below.
11 // The underscores don't mean anything - you can have a layer called STUFF or any other name.
12 // Layer names don't all need to be of the same length, obviously, and you can also skip them
13 // entirely and just use numbers.
17 #define _______ KC_TRNS
19 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
20 /* Keymap _BL: (Base Layer) Default Layer
21 * ,-------------------.
23 * |----|----|----|----|
25 * |----|----|----|----|
27 * |----|----|----| + |
29 * |----|----|----|----|
31 * |----|----|----| En |
33 * `-------------------'
37 KC_ESC,KC_TAB,KC_BSPC,KC_PEQL, \
38 KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS, \
39 KC_P7, KC_P8, KC_P9, KC_PPLS, \
40 KC_P4, KC_P5, KC_P6, \
41 KC_P1, KC_P2, KC_P3, KC_PENT, \
42 KC_P0, LT(_FL,KC_PDOT)),
44 /* Keymap _FL: Function Layer
45 * ,-------------------.
47 * |----|----|----|----|
49 * |----|----|----|----|
51 * |----|----|----|RST |
53 * |----|----|----|----|
55 * |----|----|----| En |
57 * `-------------------'
61 KC_ESC,KC_TAB,KC_BSPC,KC_PEQL, \
62 KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \
63 KC_P7, KC_P8, KC_P9, RESET, \
64 KC_P4, KC_P5, KC_P6, \
65 KC_P1, KC_P2, KC_P3, KC_PENT, \
66 KC_P0, LT(_FL,KC_PDOT)),
73 const uint16_t PROGMEM fn_actions[] = {
74 [0] = ACTION_FUNCTION(SHIFT_ESC),
77 void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
78 static uint8_t shift_esc_shift_mask;
81 shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
82 if (record->event.pressed) {
83 if (shift_esc_shift_mask) {
85 send_keyboard_report();
88 send_keyboard_report();
91 if (shift_esc_shift_mask) {
93 send_keyboard_report();
96 send_keyboard_report();