diff options
author | Drashna Jaelre <drashna@live.com> | 2019-04-11 15:12:26 -0700 |
---|---|---|
committer | skullydazed <skullydazed@users.noreply.github.com> | 2019-04-12 14:07:05 -0700 |
commit | 1d7a06a0a25167ff49702bab39e7e4e60dc6319f (patch) | |
tree | e7b8bca094d42e98ad6f6ed5f9642753077c058a | |
parent | e88530af792ce68ebd4d5fd02a843837396daec9 (diff) |
Cleanup code
-rw-r--r-- | quantum/quantum.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/quantum/quantum.c b/quantum/quantum.c index 3677424bbd..8ac3a57dca 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) { } void send_char(char ascii_code) { - uint8_t keycode; - bool is_shifted = false; - bool is_alted = false; - - keycode = pgm_read_byte(&ascii_to_keycode_lut[(uint8_t)ascii_code]); - if (pgm_read_byte(&ascii_to_shift_lut[(uint8_t)ascii_code])) { - is_shifted = true; - } - if (pgm_read_byte(&ascii_to_alt_lut[(uint8_t)ascii_code])) { - is_alted = true; - } + uint8_t keycode = pgm_read_byte(&ascii_to_keycode_lut[(uint8_t)ascii_code]); + bool is_shifted = pgm_read_byte(&ascii_to_shift_lut[(uint8_t)ascii_code]); + bool is_alted = pgm_read_byte(&ascii_to_alt_lut[(uint8_t)ascii_code]); if (is_shifted) { register_code(KC_LSFT); @@ -969,9 +961,7 @@ void send_char(char ascii_code) { if (is_alted) { register_code(KC_RALT); } - tap_code(keycode); - if (is_alted) { unregister_code(KC_RALT); } |