diff options
Diffstat (limited to 'quantum')
| -rw-r--r-- | quantum/keymap_extras/keymap_spanish.h | 6 | ||||
| -rw-r--r-- | quantum/quantum.c | 8 | ||||
| -rw-r--r-- | quantum/quantum_keycodes.h | 3 |
3 files changed, 14 insertions, 3 deletions
diff --git a/quantum/keymap_extras/keymap_spanish.h b/quantum/keymap_extras/keymap_spanish.h index 3a5787e9c..224db7be1 100644 --- a/quantum/keymap_extras/keymap_spanish.h +++ b/quantum/keymap_extras/keymap_spanish.h | |||
| @@ -55,8 +55,8 @@ | |||
| 55 | #define ES_UMLT LSFT(ES_GRV) | 55 | #define ES_UMLT LSFT(ES_GRV) |
| 56 | 56 | ||
| 57 | #define ES_GRTR LSFT(ES_LESS) | 57 | #define ES_GRTR LSFT(ES_LESS) |
| 58 | #define ES_SCLN LSFT(ES_COMM) | 58 | #define ES_SCLN LSFT(KC_COMM) |
| 59 | #define ES_COLN LSFT(ES_DOT) | 59 | #define ES_COLN LSFT(KC_DOT) |
| 60 | #define ES_UNDS LSFT(ES_MINS) | 60 | #define ES_UNDS LSFT(ES_MINS) |
| 61 | 61 | ||
| 62 | // Alt Gr-ed characters | 62 | // Alt Gr-ed characters |
| @@ -72,6 +72,6 @@ | |||
| 72 | #define ES_RBRC ALGR(ES_PLUS) | 72 | #define ES_RBRC ALGR(ES_PLUS) |
| 73 | 73 | ||
| 74 | #define ES_LCBR ALGR(ES_ACUT) | 74 | #define ES_LCBR ALGR(ES_ACUT) |
| 75 | #define ES_RCRB ALGR(ES_CCED) | 75 | #define ES_RCBR ALGR(ES_CCED) |
| 76 | 76 | ||
| 77 | #endif | 77 | #endif |
diff --git a/quantum/quantum.c b/quantum/quantum.c index 4f4cee4e9..f5fb1e35c 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c | |||
| @@ -437,6 +437,14 @@ bool process_record_quantum(keyrecord_t *record) { | |||
| 437 | return false; | 437 | return false; |
| 438 | // break; | 438 | // break; |
| 439 | } | 439 | } |
| 440 | case GRAVE_ESC: { | ||
| 441 | void (*method)(uint8_t) = (record->event.pressed) ? &add_key : &del_key; | ||
| 442 | uint8_t shifted = get_mods() & ((MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT) | ||
| 443 | |MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI))); | ||
| 444 | |||
| 445 | method(shifted ? KC_GRAVE : KC_ESCAPE); | ||
| 446 | send_keyboard_report(); | ||
| 447 | } | ||
| 440 | default: { | 448 | default: { |
| 441 | shift_interrupted[0] = true; | 449 | shift_interrupted[0] = true; |
| 442 | shift_interrupted[1] = true; | 450 | shift_interrupted[1] = true; |
diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 7354ae0da..c34ecafa5 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h | |||
| @@ -104,6 +104,7 @@ enum quantum_keycodes { | |||
| 104 | MAGIC_UNHOST_NKRO, | 104 | MAGIC_UNHOST_NKRO, |
| 105 | MAGIC_UNSWAP_ALT_GUI, | 105 | MAGIC_UNSWAP_ALT_GUI, |
| 106 | MAGIC_TOGGLE_NKRO, | 106 | MAGIC_TOGGLE_NKRO, |
| 107 | GRAVE_ESC, | ||
| 107 | 108 | ||
| 108 | // Leader key | 109 | // Leader key |
| 109 | #ifndef DISABLE_LEADER | 110 | #ifndef DISABLE_LEADER |
| @@ -514,6 +515,8 @@ enum quantum_keycodes { | |||
| 514 | #define MACROTAP(kc) (kc | QK_MACRO | FUNC_TAP<<8) | 515 | #define MACROTAP(kc) (kc | QK_MACRO | FUNC_TAP<<8) |
| 515 | #define MACRODOWN(...) (record->event.pressed ? MACRO(__VA_ARGS__) : MACRO_NONE) | 516 | #define MACRODOWN(...) (record->event.pressed ? MACRO(__VA_ARGS__) : MACRO_NONE) |
| 516 | 517 | ||
| 518 | #define KC_GESC GRAVE_ESC | ||
| 519 | |||
| 517 | 520 | ||
| 518 | // L-ayer, T-ap - 256 keycode max, 16 layer max | 521 | // L-ayer, T-ap - 256 keycode max, 16 layer max |
| 519 | #define LT(layer, kc) (kc | QK_LAYER_TAP | ((layer & 0xF) << 8)) | 522 | #define LT(layer, kc) (kc | QK_LAYER_TAP | ((layer & 0xF) << 8)) |
