]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Clean up some of the code
authorDrashna Jaelre <drashna@live.com>
Sun, 17 Feb 2019 16:58:02 +0000 (08:58 -0800)
committerskullydazed <skullydazed@users.noreply.github.com>
Fri, 12 Apr 2019 21:07:05 +0000 (14:07 -0700)
quantum/quantum.c
quantum/quantum.h

index 0fe918b36511250f17d88dacf32a444e78217a02..7038228f739b1b73f4d33d4b368d0563b217a020 100644 (file)
@@ -957,13 +957,12 @@ void send_char(char ascii_code) {
 
   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; } else { is_shifted = false; }
- if (pgm_read_byte(&ascii_to_alt_lut[(uint8_t)ascii_code])) { is_alted = true; } else { is_alted = false; }
 if (pgm_read_byte(&ascii_to_alt_lut[(uint8_t)ascii_code])) { is_alted = true; } else { is_alted = false; }
 
   if (is_shifted) { register_code(KC_LSFT); }
   if (is_alted) { register_code(KC_RALT); }
 
-  register_code(keycode);
-  unregister_code(keycode);
+  tap_code(keycode);
 
   if (is_alted) { unregister_code(KC_RALT); }
   if (is_shifted) { unregister_code(KC_LSFT); }
index c7fce9a0f6099d09c8611999cec22a0b4ed98fdf..f7b278cefd7d480e7fe33ac9bc92f81e6ec6da09 100644 (file)
@@ -206,6 +206,7 @@ extern uint32_t default_layer_state;
 
 #define SEND_STRING(str) send_string_P(PSTR(str))
 extern const bool ascii_to_shift_lut[0x80];
+extern const bool ascii_to_alt_lut[0x80];
 extern const uint8_t ascii_to_keycode_lut[0x80];
 void send_string(const char *str);
 void send_string_with_delay(const char *str, uint8_t interval);