aboutsummaryrefslogtreecommitdiff
path: root/quantum/quantum.c
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/quantum.c')
-rw-r--r--quantum/quantum.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/quantum/quantum.c b/quantum/quantum.c
index 9cd50b11d..36062866e 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -320,8 +320,8 @@ bool process_record_quantum(keyrecord_t *record) {
320 switch (keycode) { 320 switch (keycode) {
321 case GRAVE_ESC: { 321 case GRAVE_ESC: {
322 /* true if the last press of GRAVE_ESC was shifted (i.e. GUI or SHIFT were pressed), false otherwise. 322 /* true if the last press of GRAVE_ESC was shifted (i.e. GUI or SHIFT were pressed), false otherwise.
323 * Used to ensure that the correct keycode is released if the key is released. 323 * Used to ensure that the correct keycode is released if the key is released.
324 */ 324 */
325 static bool grave_esc_was_shifted = false; 325 static bool grave_esc_was_shifted = false;
326 326
327 uint8_t shifted = get_mods() & ((MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT) | MOD_BIT(KC_LGUI) | MOD_BIT(KC_RGUI))); 327 uint8_t shifted = get_mods() & ((MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT) | MOD_BIT(KC_LGUI) | MOD_BIT(KC_RGUI)));
@@ -379,6 +379,7 @@ __attribute__((weak)) const bool ascii_to_altgr_lut[128] PROGMEM = {0, 0, 0, 0,
379 379
380 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; 380 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
381 381
382// clang-format off
382__attribute__((weak)) const uint8_t ascii_to_keycode_lut[128] PROGMEM = {// NUL SOH STX ETX EOT ENQ ACK BEL 383__attribute__((weak)) const uint8_t ascii_to_keycode_lut[128] PROGMEM = {// NUL SOH STX ETX EOT ENQ ACK BEL
383 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, 384 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
384 // BS TAB LF VT FF CR SO SI 385 // BS TAB LF VT FF CR SO SI
@@ -412,6 +413,7 @@ __attribute__((weak)) const uint8_t ascii_to_keycode_lut[128] PROGMEM = {// NUL
412 KC_P, KC_Q, KC_R, KC_S, KC_T, KC_U, KC_V, KC_W, 413 KC_P, KC_Q, KC_R, KC_S, KC_T, KC_U, KC_V, KC_W,
413 // x y z { | } ~ DEL 414 // x y z { | } ~ DEL
414 KC_X, KC_Y, KC_Z, KC_LBRC, KC_BSLS, KC_RBRC, KC_GRV, KC_DEL}; 415 KC_X, KC_Y, KC_Z, KC_LBRC, KC_BSLS, KC_RBRC, KC_GRV, KC_DEL};
416// clang-format on
415 417
416void send_string(const char *str) { send_string_with_delay(str, 0); } 418void send_string(const char *str) { send_string_with_delay(str, 0); }
417 419
@@ -477,7 +479,7 @@ void send_string_with_delay_P(const char *str, uint8_t interval) {
477 479
478void send_char(char ascii_code) { 480void send_char(char ascii_code) {
479#if defined(AUDIO_ENABLE) && defined(SENDSTRING_BELL) 481#if defined(AUDIO_ENABLE) && defined(SENDSTRING_BELL)
480 if (ascii_code == '\a') { // BEL 482 if (ascii_code == '\a') { // BEL
481 PLAY_SONG(bell_song); 483 PLAY_SONG(bell_song);
482 return; 484 return;
483 } 485 }