summaryrefslogtreecommitdiff
path: root/quantum
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2019-02-17 08:58:02 -0800
committerskullydazed <skullydazed@users.noreply.github.com>2019-04-12 14:07:05 -0700
commit7148c0b10c298af12172231e79c0cda1c1f76f04 (patch)
tree4d09f1dc3c1f6652317f9983493fba4dd24b2221 /quantum
parenta2090d5e863a580d71e29de104844d5fc4fbe036 (diff)
downloadqmk_firmware-7148c0b10c298af12172231e79c0cda1c1f76f04.tar.gz
qmk_firmware-7148c0b10c298af12172231e79c0cda1c1f76f04.zip
Clean up some of the code
Diffstat (limited to 'quantum')
-rw-r--r--quantum/quantum.c5
-rw-r--r--quantum/quantum.h1
2 files changed, 3 insertions, 3 deletions
diff --git a/quantum/quantum.c b/quantum/quantum.c
index 0fe918b365..7038228f73 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -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); }
diff --git a/quantum/quantum.h b/quantum/quantum.h
index c7fce9a0f6..f7b278cefd 100644
--- a/quantum/quantum.h
+++ b/quantum/quantum.h
@@ -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);