From 190b3fd393631e389d1dbc6c6f4eb938f6484291 Mon Sep 17 00:00:00 2001 From: FREEWING-JP Date: Wed, 6 Apr 2022 22:29:03 +0900 Subject: [PATCH 1/6] add feature VIA_MACRO_DELAY --- quantum/dynamic_keymap.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/quantum/dynamic_keymap.c b/quantum/dynamic_keymap.c index f070375ff3c2..d0cb4ba88f65 100644 --- a/quantum/dynamic_keymap.c +++ b/quantum/dynamic_keymap.c @@ -250,5 +250,8 @@ void dynamic_keymap_macro_send(uint8_t id) { } } send_string(data); +#ifdef VIA_MACRO_DELAY + wait_ms(VIA_MACRO_DELAY); +#endif } } From 994c44dcf0058c85af6a6ae9d1c5741c3bdec961 Mon Sep 17 00:00:00 2001 From: FREEWING-JP Date: Tue, 12 Apr 2022 21:01:21 +0900 Subject: [PATCH 2/6] Suggested change: use send_string_with_delay, add define logic --- quantum/dynamic_keymap.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/quantum/dynamic_keymap.c b/quantum/dynamic_keymap.c index d0cb4ba88f65..6bc66141c20c 100644 --- a/quantum/dynamic_keymap.c +++ b/quantum/dynamic_keymap.c @@ -79,6 +79,11 @@ # define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE (DYNAMIC_KEYMAP_EEPROM_MAX_ADDR - DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR + 1) #endif +// Sets the delay VIA macro send . Use TAP_CODE_DELAY if undefined this . +#ifndef VIA_MACRO_DELAY +# define VIA_MACRO_DELAY TAP_CODE_DELAY +#endif + uint8_t dynamic_keymap_get_layer_count(void) { return DYNAMIC_KEYMAP_LAYER_COUNT; } @@ -249,9 +254,10 @@ void dynamic_keymap_macro_send(uint8_t id) { break; } } +#if VIA_MACRO_DELAY > 0 + send_string_with_delay(data, VIA_MACRO_DELAY); +#else send_string(data); -#ifdef VIA_MACRO_DELAY - wait_ms(VIA_MACRO_DELAY); #endif } } From bfd3b97333f321a53e6c16cb97fd3d6a32485a34 Mon Sep 17 00:00:00 2001 From: "FREEWING.JP" Date: Sun, 15 May 2022 18:57:08 +0900 Subject: [PATCH 3/6] Update quantum/dynamic_keymap.c Co-authored-by: Joel Challis --- quantum/dynamic_keymap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/quantum/dynamic_keymap.c b/quantum/dynamic_keymap.c index 6bc66141c20c..9384aa832ee2 100644 --- a/quantum/dynamic_keymap.c +++ b/quantum/dynamic_keymap.c @@ -79,9 +79,9 @@ # define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE (DYNAMIC_KEYMAP_EEPROM_MAX_ADDR - DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR + 1) #endif -// Sets the delay VIA macro send . Use TAP_CODE_DELAY if undefined this . -#ifndef VIA_MACRO_DELAY -# define VIA_MACRO_DELAY TAP_CODE_DELAY +// Sets the delay between sending macro keycodes . Use TAP_CODE_DELAY if undefined this . +#ifndef DYNAMIC_KEYMAP_MACRO_DELAY +# define DYNAMIC_KEYMAP_MACRO_DELAY TAP_CODE_DELAY #endif uint8_t dynamic_keymap_get_layer_count(void) { From 918d2294e0989a3f6bff500477396b335ddcb0d5 Mon Sep 17 00:00:00 2001 From: "FREEWING.JP" Date: Sun, 15 May 2022 18:57:12 +0900 Subject: [PATCH 4/6] Update quantum/dynamic_keymap.c Co-authored-by: Joel Challis --- quantum/dynamic_keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quantum/dynamic_keymap.c b/quantum/dynamic_keymap.c index 9384aa832ee2..c26f6952c5b1 100644 --- a/quantum/dynamic_keymap.c +++ b/quantum/dynamic_keymap.c @@ -254,8 +254,8 @@ void dynamic_keymap_macro_send(uint8_t id) { break; } } -#if VIA_MACRO_DELAY > 0 - send_string_with_delay(data, VIA_MACRO_DELAY); +#if DYNAMIC_KEYMAP_MACRO_DELAY > 0 + send_string_with_delay(data, DYNAMIC_KEYMAP_MACRO_DELAY); #else send_string(data); #endif From de82b4a985eb5871cdb6f01063c194c1827b585c Mon Sep 17 00:00:00 2001 From: "FREEWING.JP" Date: Sun, 22 May 2022 21:38:58 +0900 Subject: [PATCH 5/6] Update quantum/dynamic_keymap.c Co-authored-by: Ryan --- quantum/dynamic_keymap.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/quantum/dynamic_keymap.c b/quantum/dynamic_keymap.c index c26f6952c5b1..caed7e5f9e7b 100644 --- a/quantum/dynamic_keymap.c +++ b/quantum/dynamic_keymap.c @@ -254,10 +254,6 @@ void dynamic_keymap_macro_send(uint8_t id) { break; } } -#if DYNAMIC_KEYMAP_MACRO_DELAY > 0 send_string_with_delay(data, DYNAMIC_KEYMAP_MACRO_DELAY); -#else - send_string(data); -#endif } } From 03069f1635f5f689f41a26ab73c2f44f6607431a Mon Sep 17 00:00:00 2001 From: "FREEWING.JP" Date: Mon, 23 May 2022 13:37:34 +0900 Subject: [PATCH 6/6] Update quantum/dynamic_keymap.c Co-authored-by: Ryan --- quantum/dynamic_keymap.c | 1 - 1 file changed, 1 deletion(-) diff --git a/quantum/dynamic_keymap.c b/quantum/dynamic_keymap.c index caed7e5f9e7b..5a355a9ce4ea 100644 --- a/quantum/dynamic_keymap.c +++ b/quantum/dynamic_keymap.c @@ -79,7 +79,6 @@ # define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE (DYNAMIC_KEYMAP_EEPROM_MAX_ADDR - DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR + 1) #endif -// Sets the delay between sending macro keycodes . Use TAP_CODE_DELAY if undefined this . #ifndef DYNAMIC_KEYMAP_MACRO_DELAY # define DYNAMIC_KEYMAP_MACRO_DELAY TAP_CODE_DELAY #endif