aboutsummaryrefslogtreecommitdiff
path: root/quantum/quantum.c
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2019-04-07 19:19:00 -0700
committerGitHub <noreply@github.com>2019-04-07 19:19:00 -0700
commit908966bdf36605301d27cdcae82c3201c156a43f (patch)
tree5749c833ad1b79de8958bdcfe2ddf2e1f06012a2 /quantum/quantum.c
parent6a4c54870cff157f1056ca65363c9e862920cbc9 (diff)
parentd15bb05c935e378f2e1e912a46c3114697dd00e4 (diff)
downloadqmk_firmware-908966bdf36605301d27cdcae82c3201c156a43f.tar.gz
qmk_firmware-908966bdf36605301d27cdcae82c3201c156a43f.zip
Fixed tap/down/up handling in dynamic keymap macros (#5363)
* Fixed tap/down/up handling in dynamic keymap macros * Added SS_TAP_CODE, SS_DOWN_CODE, SS_UP_CODE
Diffstat (limited to 'quantum/quantum.c')
-rw-r--r--quantum/quantum.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/quantum/quantum.c b/quantum/quantum.c
index 48c338fc8..a62368ded 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -882,16 +882,16 @@ void send_string_with_delay(const char *str, uint8_t interval) {
882 while (1) { 882 while (1) {
883 char ascii_code = *str; 883 char ascii_code = *str;
884 if (!ascii_code) break; 884 if (!ascii_code) break;
885 if (ascii_code == 1) { 885 if (ascii_code == SS_TAP_CODE) {
886 // tap 886 // tap
887 uint8_t keycode = *(++str); 887 uint8_t keycode = *(++str);
888 register_code(keycode); 888 register_code(keycode);
889 unregister_code(keycode); 889 unregister_code(keycode);
890 } else if (ascii_code == 2) { 890 } else if (ascii_code == SS_DOWN_CODE) {
891 // down 891 // down
892 uint8_t keycode = *(++str); 892 uint8_t keycode = *(++str);
893 register_code(keycode); 893 register_code(keycode);
894 } else if (ascii_code == 3) { 894 } else if (ascii_code == SS_UP_CODE) {
895 // up 895 // up
896 uint8_t keycode = *(++str); 896 uint8_t keycode = *(++str);
897 unregister_code(keycode); 897 unregister_code(keycode);
@@ -908,16 +908,16 @@ void send_string_with_delay_P(const char *str, uint8_t interval) {
908 while (1) { 908 while (1) {
909 char ascii_code = pgm_read_byte(str); 909 char ascii_code = pgm_read_byte(str);
910 if (!ascii_code) break; 910 if (!ascii_code) break;
911 if (ascii_code == 1) { 911 if (ascii_code == SS_TAP_CODE) {
912 // tap 912 // tap
913 uint8_t keycode = pgm_read_byte(++str); 913 uint8_t keycode = pgm_read_byte(++str);
914 register_code(keycode); 914 register_code(keycode);
915 unregister_code(keycode); 915 unregister_code(keycode);
916 } else if (ascii_code == 2) { 916 } else if (ascii_code == SS_DOWN_CODE) {
917 // down 917 // down
918 uint8_t keycode = pgm_read_byte(++str); 918 uint8_t keycode = pgm_read_byte(++str);
919 register_code(keycode); 919 register_code(keycode);
920 } else if (ascii_code == 3) { 920 } else if (ascii_code == SS_UP_CODE) {
921 // up 921 // up
922 uint8_t keycode = pgm_read_byte(++str); 922 uint8_t keycode = pgm_read_byte(++str);
923 unregister_code(keycode); 923 unregister_code(keycode);