summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2021-01-31 21:18:46 +0000
committerQMK Bot <hello@qmk.fm>2021-01-31 21:18:46 +0000
commit0fa2e7c790c4b4fcb318479a4951bfd33fd3862f (patch)
treea80509686038297adeca1b6d4d51953e829c1310
parentef6329af7c7be77b537fbfc5a5cc7105acc679f7 (diff)
parent6bec7fb3fe7a9495b3a45f8145e9f3f830c72763 (diff)
downloadqmk_firmware-0fa2e7c790c4b4fcb318479a4951bfd33fd3862f.tar.gz
qmk_firmware-0fa2e7c790c4b4fcb318479a4951bfd33fd3862f.zip
Merge remote-tracking branch 'origin/master' into develop
-rw-r--r--quantum/quantum.c37
1 files changed, 7 insertions, 30 deletions
diff --git a/quantum/quantum.c b/quantum/quantum.c
index 8db801f195..22aa528387 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -598,32 +598,22 @@ void tap_random_base64(void) {
#endif
switch (key) {
case 0 ... 25:
- register_code(KC_LSFT);
- register_code(key + KC_A);
- unregister_code(key + KC_A);
- unregister_code(KC_LSFT);
+ send_char(key + 'A');
break;
case 26 ... 51:
- register_code(key - 26 + KC_A);
- unregister_code(key - 26 + KC_A);
+ send_char(key - 26 + 'a');
break;
case 52:
- register_code(KC_0);
- unregister_code(KC_0);
+ send_char('0');
break;
case 53 ... 61:
- register_code(key - 53 + KC_1);
- unregister_code(key - 53 + KC_1);
+ send_char(key - 53 + '1');
break;
case 62:
- register_code(KC_LSFT);
- register_code(KC_EQL);
- unregister_code(KC_EQL);
- unregister_code(KC_LSFT);
+ send_char('+');
break;
case 63:
- register_code(KC_SLSH);
- unregister_code(KC_SLSH);
+ send_char('/');
break;
}
}
@@ -735,20 +725,7 @@ void send_byte(uint8_t number) {
}
void send_nibble(uint8_t number) {
- switch (number) {
- case 0:
- register_code(KC_0);
- unregister_code(KC_0);
- break;
- case 1 ... 9:
- register_code(KC_1 + (number - 1));
- unregister_code(KC_1 + (number - 1));
- break;
- case 0xA ... 0xF:
- register_code(KC_A + (number - 0xA));
- unregister_code(KC_A + (number - 0xA));
- break;
- }
+ tap_code16(hex_to_keycode(number));
}
__attribute__((weak)) uint16_t hex_to_keycode(uint8_t hex) {