summaryrefslogtreecommitdiff
path: root/quantum/process_keycode/process_combo.c
diff options
context:
space:
mode:
authorIlya Zhuravlev <whatever@xyz.is>2022-07-11 18:29:50 -0600
committerIlya Zhuravlev <whatever@xyz.is>2022-07-11 18:40:32 -0600
commitfde0c10baed61e99abd026bfefee485262b57c2d (patch)
tree0b2f220cfe17a2168f0e60ecbb0299a00ca46a56 /quantum/process_keycode/process_combo.c
parentb37649af364ce4c827e9b32bb1f745c12f0ef984 (diff)
parent2714c70bd774489f039b7c60a2f8634a64ff40c3 (diff)
Merge remote-tracking branch 'qmk/master' into merge-2022-07-11
Diffstat (limited to 'quantum/process_keycode/process_combo.c')
-rw-r--r--quantum/process_keycode/process_combo.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/quantum/process_keycode/process_combo.c b/quantum/process_keycode/process_combo.c
index 1dcc41bdc2..8299f88801 100644
--- a/quantum/process_keycode/process_combo.c
+++ b/quantum/process_keycode/process_combo.c
@@ -95,8 +95,6 @@ static queued_combo_t combo_buffer[COMBO_BUFFER_LENGTH];
#define INCREMENT_MOD(i) i = (i + 1) % COMBO_BUFFER_LENGTH
-#define COMBO_KEY_POS ((keypos_t){.col = 254, .row = 254})
-
#ifndef EXTRA_SHORT_COMBOS
/* flags are their own elements in combo_t struct. */
# define COMBO_ACTIVE(combo) (combo->active)
@@ -147,12 +145,7 @@ static queued_combo_t combo_buffer[COMBO_BUFFER_LENGTH];
static inline void release_combo(uint16_t combo_index, combo_t *combo) {
if (combo->keycode) {
keyrecord_t record = {
- .event =
- {
- .key = COMBO_KEY_POS,
- .time = timer_read() | 1,
- .pressed = false,
- },
+ .event = MAKE_KEYEVENT(KEYLOC_COMBO, KEYLOC_COMBO, false),
.keycode = combo->keycode,
};
#ifndef NO_ACTION_TAPPING
@@ -332,7 +325,7 @@ void apply_combo(uint16_t combo_index, combo_t *combo) {
if (ALL_COMBO_KEYS_ARE_DOWN(state, key_count)) {
// this in the end executes the combo when the key_buffer is dumped.
record->keycode = combo->keycode;
- record->event.key = COMBO_KEY_POS;
+ record->event.key = MAKE_KEYPOS(KEYLOC_COMBO, KEYLOC_COMBO);
qrecord->combo_index = combo_index;
ACTIVATE_COMBO(combo);