aboutsummaryrefslogtreecommitdiff
path: root/quantum/quantum.c
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/quantum.c')
-rw-r--r--quantum/quantum.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/quantum/quantum.c b/quantum/quantum.c
index 3677424bb..8ac3a57dc 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -951,17 +951,9 @@ void send_string_with_delay_P(const char *str, uint8_t interval) {
951} 951}
952 952
953void send_char(char ascii_code) { 953void send_char(char ascii_code) {
954 uint8_t keycode; 954 uint8_t keycode = pgm_read_byte(&ascii_to_keycode_lut[(uint8_t)ascii_code]);
955 bool is_shifted = false; 955 bool is_shifted = pgm_read_byte(&ascii_to_shift_lut[(uint8_t)ascii_code]);
956 bool is_alted = false; 956 bool is_alted = pgm_read_byte(&ascii_to_alt_lut[(uint8_t)ascii_code]);
957
958 keycode = pgm_read_byte(&ascii_to_keycode_lut[(uint8_t)ascii_code]);
959 if (pgm_read_byte(&ascii_to_shift_lut[(uint8_t)ascii_code])) {
960 is_shifted = true;
961 }
962 if (pgm_read_byte(&ascii_to_alt_lut[(uint8_t)ascii_code])) {
963 is_alted = true;
964 }
965 957
966 if (is_shifted) { 958 if (is_shifted) {
967 register_code(KC_LSFT); 959 register_code(KC_LSFT);
@@ -969,9 +961,7 @@ void send_char(char ascii_code) {
969 if (is_alted) { 961 if (is_alted) {
970 register_code(KC_RALT); 962 register_code(KC_RALT);
971 } 963 }
972
973 tap_code(keycode); 964 tap_code(keycode);
974
975 if (is_alted) { 965 if (is_alted) {
976 unregister_code(KC_RALT); 966 unregister_code(KC_RALT);
977 } 967 }