From c485d1cf2652bfb47afbb68f128a64f1bc518aa3 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Mon, 27 Mar 2023 20:08:17 +0100 Subject: Remove use of keymap.h (#20004) --- quantum/process_keycode/process_combo.c | 1 + 1 file changed, 1 insertion(+) (limited to 'quantum/process_keycode') diff --git a/quantum/process_keycode/process_combo.c b/quantum/process_keycode/process_combo.c index 8597649c92..ce6725c402 100644 --- a/quantum/process_keycode/process_combo.c +++ b/quantum/process_keycode/process_combo.c @@ -14,6 +14,7 @@ * along with this program. If not, see . */ +#include "keymap_common.h" #include "print.h" #include "process_combo.h" #include "action_tapping.h" -- cgit 1.4.1 From 68efea70b268aceb28c28abb26641fad8d6acefd Mon Sep 17 00:00:00 2001 From: "Johannes H. Jensen" Date: Mon, 3 Apr 2023 05:01:07 +0200 Subject: Add direction to dynamic_macro_record_start_user (#19689) --- docs/feature_dynamic_macros.md | 2 +- docs/ja/feature_dynamic_macros.md | 2 +- keyboards/40percentclub/mf68/keymaps/delivrance/keymap.c | 2 +- keyboards/dztech/dz65rgb/keymaps/drootz/keymap.c | 2 +- keyboards/ergodox_ez/ergodox_ez.c | 2 +- keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/keymap.c | 2 +- .../handwired/dactyl_manuform/3x5_3/keymaps/dlford/keymap.c | 2 +- keyboards/kprepublic/bm40hsrgb/keymaps/coffee/keymap.c | 2 +- keyboards/moonlander/moonlander.c | 2 +- keyboards/mschwingen/modelm/modelm.c | 2 +- keyboards/planck/keymaps/tk/keymap.c | 2 +- quantum/process_keycode/process_dynamic_macro.c | 10 +++++----- quantum/process_keycode/process_dynamic_macro.h | 2 +- 13 files changed, 17 insertions(+), 17 deletions(-) (limited to 'quantum/process_keycode') diff --git a/docs/feature_dynamic_macros.md b/docs/feature_dynamic_macros.md index f5a6952b6b..8ab1bad61c 100644 --- a/docs/feature_dynamic_macros.md +++ b/docs/feature_dynamic_macros.md @@ -59,7 +59,7 @@ There are a number of hooks that you can use to add custom functionality and fee Note, that direction indicates which macro it is, with `1` being Macro 1, `-1` being Macro 2, and 0 being no macro. -* `dynamic_macro_record_start_user(void)` - Triggered when you start recording a macro. +* `dynamic_macro_record_start_user(int8_t direction)` - Triggered when you start recording a macro. * `dynamic_macro_play_user(int8_t direction)` - Triggered when you play back a macro. * `dynamic_macro_record_key_user(int8_t direction, keyrecord_t *record)` - Triggered on each keypress while recording a macro. * `dynamic_macro_record_end_user(int8_t direction)` - Triggered when the macro recording is stopped. diff --git a/docs/ja/feature_dynamic_macros.md b/docs/ja/feature_dynamic_macros.md index 3cff788007..fa1a1df931 100644 --- a/docs/ja/feature_dynamic_macros.md +++ b/docs/ja/feature_dynamic_macros.md @@ -64,7 +64,7 @@ QMK はその場で作られた一時的なマクロをサポートします。 direction がどのマクロであるかを示すことに注意してください。`1` がマクロ 1、`-1` がマクロ 2、0 がマクロ無しです。 -* `dynamic_macro_record_start_user(void)` - マクロの記録を開始する時に起動されます。 +* `dynamic_macro_record_start_user(int8_t direction)` - マクロの記録を開始する時に起動されます。 * `dynamic_macro_play_user(int8_t direction)` - マクロを再生する時に起動されます。 * `dynamic_macro_record_key_user(int8_t direction, keyrecord_t *record)` - マクロの記録中に各キー押下で起動されます。 * `dynamic_macro_record_end_user(int8_t direction)` - マクロの記録を停止した時に起動されます。 diff --git a/keyboards/40percentclub/mf68/keymaps/delivrance/keymap.c b/keyboards/40percentclub/mf68/keymaps/delivrance/keymap.c index 8d69a5a8af..c3e359e24e 100644 --- a/keyboards/40percentclub/mf68/keymaps/delivrance/keymap.c +++ b/keyboards/40percentclub/mf68/keymaps/delivrance/keymap.c @@ -138,7 +138,7 @@ void led_blink(void) { backlight_toggle(); } -void dynamic_macro_record_start_user(void) { +void dynamic_macro_record_start_user(int8_t direction) { led_blink(); } diff --git a/keyboards/dztech/dz65rgb/keymaps/drootz/keymap.c b/keyboards/dztech/dz65rgb/keymaps/drootz/keymap.c index 3870c6aae3..8a7bbd22ec 100644 --- a/keyboards/dztech/dz65rgb/keymaps/drootz/keymap.c +++ b/keyboards/dztech/dz65rgb/keymaps/drootz/keymap.c @@ -709,7 +709,7 @@ void leader_end_user(void) { /**************** DYNAMIC MACRO *********************/ -void dynamic_macro_record_start_user(void) { +void dynamic_macro_record_start_user(int8_t direction) { onMac = false; /* reset layer bool as dynamic macro clear the keyboard and reset layers. */ if (!isBlinking && !isRecording) { reset_blink_cycle(); diff --git a/keyboards/ergodox_ez/ergodox_ez.c b/keyboards/ergodox_ez/ergodox_ez.c index 7b9d9d3bad..3683128234 100644 --- a/keyboards/ergodox_ez/ergodox_ez.c +++ b/keyboards/ergodox_ez/ergodox_ez.c @@ -408,7 +408,7 @@ static bool is_on = false; static bool is_dynamic_recording = false; static uint16_t dynamic_loop_timer; -void dynamic_macro_record_start_user(void) { +void dynamic_macro_record_start_user(int8_t direction) { is_dynamic_recording = true; dynamic_loop_timer = timer_read(); ergodox_right_led_1_on(); diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/keymap.c index b595c1b843..ceddf81a77 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/keymap.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/keymap.c @@ -113,7 +113,7 @@ bool rgb_matrix_indicators_user(void) { // Called on start -void dynamic_macro_record_start_user(void) { +void dynamic_macro_record_start_user(int8_t direction) { dprint("-- Recording Started\n"); layer_on(_UTILITY); } diff --git a/keyboards/handwired/dactyl_manuform/3x5_3/keymaps/dlford/keymap.c b/keyboards/handwired/dactyl_manuform/3x5_3/keymaps/dlford/keymap.c index 7df7897ae9..bdacde1a85 100644 --- a/keyboards/handwired/dactyl_manuform/3x5_3/keymaps/dlford/keymap.c +++ b/keyboards/handwired/dactyl_manuform/3x5_3/keymaps/dlford/keymap.c @@ -234,7 +234,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { } // Dynamic Macro Recording Backlight -void dynamic_macro_record_start_user(void) { +void dynamic_macro_record_start_user(int8_t direction) { is_macro_recording = true; } diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/coffee/keymap.c b/keyboards/kprepublic/bm40hsrgb/keymaps/coffee/keymap.c index 53f605c54d..a41020446d 100644 --- a/keyboards/kprepublic/bm40hsrgb/keymaps/coffee/keymap.c +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/coffee/keymap.c @@ -42,7 +42,7 @@ static int current_accel = 0; static uint16_t REC = DM_REC1; static uint16_t PLY = DM_PLY1; - void dynamic_macro_record_start_user(void) { + void dynamic_macro_record_start_user(int8_t direction) { REC = DM_RSTP; RECORDING = true; } diff --git a/keyboards/moonlander/moonlander.c b/keyboards/moonlander/moonlander.c index 83b5997b53..70bcd63152 100644 --- a/keyboards/moonlander/moonlander.c +++ b/keyboards/moonlander/moonlander.c @@ -28,7 +28,7 @@ bool is_launching = false; #ifdef DYNAMIC_MACRO_ENABLE static bool is_dynamic_recording = false; -void dynamic_macro_record_start_user(void) { is_dynamic_recording = true; } +void dynamic_macro_record_start_user(int8_t direction) { is_dynamic_recording = true; } void dynamic_macro_record_end_user(int8_t direction) { is_dynamic_recording = false; diff --git a/keyboards/mschwingen/modelm/modelm.c b/keyboards/mschwingen/modelm/modelm.c index 122dca3400..23d1b1484a 100644 --- a/keyboards/mschwingen/modelm/modelm.c +++ b/keyboards/mschwingen/modelm/modelm.c @@ -204,7 +204,7 @@ void update_layer_leds(void) { #endif -void dynamic_macro_record_start_user(void) { +void dynamic_macro_record_start_user(int8_t direction) { isRecording++; blink_cycle_timer = timer_read(); } diff --git a/keyboards/planck/keymaps/tk/keymap.c b/keyboards/planck/keymaps/tk/keymap.c index 68f0f82a3d..cb512b73a3 100644 --- a/keyboards/planck/keymaps/tk/keymap.c +++ b/keyboards/planck/keymaps/tk/keymap.c @@ -318,7 +318,7 @@ void keyboard_post_init_user(void) { static bool prerecord_clicky = false; -void dynamic_macro_record_start_user(void) { +void dynamic_macro_record_start_user(int8_t direction) { prerecord_clicky = is_clicky_on(); if (!prerecord_clicky) { clicky_on(); diff --git a/quantum/process_keycode/process_dynamic_macro.c b/quantum/process_keycode/process_dynamic_macro.c index c2e7e7716f..bf6af566e2 100644 --- a/quantum/process_keycode/process_dynamic_macro.c +++ b/quantum/process_keycode/process_dynamic_macro.c @@ -29,7 +29,7 @@ void dynamic_macro_led_blink(void) { /* User hooks for Dynamic Macros */ -__attribute__((weak)) void dynamic_macro_record_start_user(void) { +__attribute__((weak)) void dynamic_macro_record_start_user(int8_t direction) { dynamic_macro_led_blink(); } @@ -62,10 +62,10 @@ __attribute__((weak)) bool dynamic_macro_valid_key_user(uint16_t keycode, keyrec * @param[out] macro_pointer The new macro buffer iterator. * @param[in] macro_buffer The macro buffer used to initialize macro_pointer. */ -void dynamic_macro_record_start(keyrecord_t **macro_pointer, keyrecord_t *macro_buffer) { +void dynamic_macro_record_start(keyrecord_t **macro_pointer, keyrecord_t *macro_buffer, int8_t direction) { dprintln("dynamic macro recording: started"); - dynamic_macro_record_start_user(); + dynamic_macro_record_start_user(direction); clear_keyboard(); layer_clear(); @@ -213,11 +213,11 @@ bool process_dynamic_macro(uint16_t keycode, keyrecord_t *record) { if (!record->event.pressed) { switch (keycode) { case QK_DYNAMIC_MACRO_RECORD_START_1: - dynamic_macro_record_start(¯o_pointer, macro_buffer); + dynamic_macro_record_start(¯o_pointer, macro_buffer, +1); macro_id = 1; return false; case QK_DYNAMIC_MACRO_RECORD_START_2: - dynamic_macro_record_start(¯o_pointer, r_macro_buffer); + dynamic_macro_record_start(¯o_pointer, r_macro_buffer, -1); macro_id = 2; return false; case QK_DYNAMIC_MACRO_PLAY_1: diff --git a/quantum/process_keycode/process_dynamic_macro.h b/quantum/process_keycode/process_dynamic_macro.h index 39036541b8..ab70726897 100644 --- a/quantum/process_keycode/process_dynamic_macro.h +++ b/quantum/process_keycode/process_dynamic_macro.h @@ -35,7 +35,7 @@ void dynamic_macro_led_blink(void); bool process_dynamic_macro(uint16_t keycode, keyrecord_t *record); -void dynamic_macro_record_start_user(void); +void dynamic_macro_record_start_user(int8_t direction); void dynamic_macro_play_user(int8_t direction); void dynamic_macro_record_key_user(int8_t direction, keyrecord_t *record); void dynamic_macro_record_end_user(int8_t direction); -- cgit 1.4.1 From 1899793f27c9b165b55b28b086bd989f12baf137 Mon Sep 17 00:00:00 2001 From: precondition <57645186+precondition@users.noreply.github.com> Date: Mon, 3 Apr 2023 07:32:47 +0200 Subject: Make IGNORE_MOD_TAP_INTERRUPT the default behaviour for mod-taps (#20211) --- data/mappings/info_config.hjson | 2 +- docs/config_options.md | 5 +- docs/ja/config_options.md | 3 - docs/ja/tap_hold.md | 28 ------- docs/mod_tap.md | 2 - docs/tap_hold.md | 89 +++------------------- keyboards/0xcb/splaytoraid/keymaps/pi/config.h | 3 - .../gherkin/keymaps/pierrec83/config.h | 1 - .../gherkin/keymaps/stevexyz/config.h | 2 - .../half_n_half/keymaps/Boy_314/config.h | 1 - .../nori/keymaps/wings_36key/config.h | 2 - keyboards/atreus/keymaps/kejadlen/config.h | 1 - keyboards/atreus/keymaps/khitsule/config.h | 2 - keyboards/atreus62/keymaps/hvp/config.h | 1 - keyboards/aya/keymaps/default/config.h | 1 - keyboards/b_sides/rev41lp/keymaps/cyril/config.h | 1 - keyboards/b_sides/rev41lp/keymaps/namnlos/config.h | 1 - keyboards/bajjak/config.h | 1 - keyboards/barracuda/keymaps/default/config.h | 1 - keyboards/barracuda/keymaps/via/config.h | 1 - .../bastardkb/charybdis/3x5/keymaps/bstiq/config.h | 14 ---- .../bastardkb/charybdis/3x5/keymaps/via/config.h | 12 --- .../bastardkb/dilemma/3x5_2/keymaps/bstiq/config.h | 14 ---- .../bastardkb/dilemma/3x5_2/keymaps/via/config.h | 12 --- .../bastardkb/dilemma/3x5_3/keymaps/bstiq/config.h | 12 --- keyboards/bastardkb/scylla/keymaps/xyverz/config.h | 1 - keyboards/bastardkb/tbk/keymaps/xyverz/config.h | 1 - .../manibus/keymaps/samurai/config.h | 1 - .../boardsource/lulu/keymaps/davidrambo/config.h | 1 - keyboards/buzzard/keymaps/crehmann/config.h | 5 +- keyboards/buzzard/keymaps/default/config.h | 5 +- keyboards/centromere/keymaps/mini_bom/config.h | 1 - .../clickety_split/leeloo/keymaps/default/config.h | 2 - keyboards/converter/usb_usb/keymaps/narze/config.h | 1 - keyboards/cradio/keymaps/default/config.h | 1 - keyboards/crkbd/keymaps/antosha417/config.h | 1 - keyboards/crkbd/keymaps/ardakilic/config.h | 1 - keyboards/crkbd/keymaps/armand1m/config.h | 1 - keyboards/crkbd/keymaps/benrestech/config.h | 1 - keyboards/crkbd/keymaps/bermeo/config.h | 1 - keyboards/crkbd/keymaps/crkdves/config.h | 1 - keyboards/crkbd/keymaps/crkqwes/config.h | 1 - keyboards/crkbd/keymaps/edvorakjp/config.h | 1 - keyboards/crkbd/keymaps/gotham/config.h | 1 - keyboards/crkbd/keymaps/hvp/config.h | 1 - keyboards/crkbd/keymaps/julian_turner/config.h | 3 - keyboards/crkbd/keymaps/markstos/config.h | 3 - keyboards/crkbd/keymaps/nimishgautam/config.h | 1 - keyboards/crkbd/keymaps/rpbaptist/config.h | 1 - keyboards/crkbd/keymaps/sharkby7e/config.h | 2 - keyboards/crkbd/keymaps/snowe/config.h | 4 - keyboards/crkbd/keymaps/soundmonster/config.h | 1 - keyboards/crkbd/keymaps/thunderbird2086/config.h | 1 - keyboards/crkbd/keymaps/xyverz/config.h | 1 - keyboards/drhigsby/ogurec/keymaps/dack/config.h | 1 - keyboards/dumbo/keymaps/trip-trap/config.h | 3 - .../dztech/dz60rgb/keymaps/kgreulich/config.h | 1 - .../dztech/dz60rgb/keymaps/matthewrobo/config.h | 1 - keyboards/dztech/dz60rgb/keymaps/xunz/config.h | 1 - .../dztech/dz65rgb/keymaps/matthewrobo/config.h | 1 - keyboards/ein_60/keymaps/klackygears/config.h | 1 - keyboards/ergodox_ez/config.h | 1 - .../ergodox_ez/keymaps/bepo_tm_style/config.h | 2 - .../ergodox_ez/keymaps/bpruitt-goddard/config.h | 2 - keyboards/ergodox_ez/keymaps/danielo515/config.h | 1 - .../ergodox_ez/keymaps/hacker_dvorak/config.h | 2 - .../ergodox_ez/keymaps/nathanvercaemert/config.h | 4 +- keyboards/ergodox_ez/keymaps/nfriend/config.h | 2 - keyboards/ergodox_ez/keymaps/rgb_layer/config.h | 1 - keyboards/ferris/keymaps/bruun-baer/config.h | 1 - keyboards/ferris/keymaps/default/config.h | 1 - keyboards/ferris/keymaps/madhatter/config.h | 1 - keyboards/ferris/keymaps/pierrec83/config.h | 1 - keyboards/ferris/keymaps/via/config.h | 1 - keyboards/foostan/cornelius/keymaps/hvp/config.h | 1 - keyboards/fungo/keymaps/default/config.h | 24 ------ keyboards/gboards/ergotaco/config.h | 1 - keyboards/gboards/georgi/config.h | 2 - .../gboards/georgi/keymaps/colemak-dh/keymap.c | 1 - keyboards/gboards/gergo/config.h | 1 - .../gboards/gergo/keymaps/abstractkb/config.h | 2 - keyboards/gboards/gergo/keymaps/colemak/keymap.c | 1 - keyboards/gboards/gergo/keymaps/default/config.h | 1 - keyboards/gboards/gergo/keymaps/germ/config.h | 1 - keyboards/gboards/gergo/keymaps/gotham/config.h | 1 - keyboards/gboards/gergo/keymaps/oled/config.h | 1 - keyboards/gboards/gergoplex/config.h | 1 - keyboards/handwired/angel/config.h | 1 - .../handwired/aranck/keymaps/turkishish/config.h | 3 +- keyboards/handwired/bolek/config.h | 1 - keyboards/handwired/brain/config.h | 1 - .../handwired/brain/keymaps/klackygears/config.h | 1 - .../handwired/chiron/keymaps/default/config.h | 1 - keyboards/handwired/dactyl/config.h | 1 - .../dactyl_manuform/3x5_3/keymaps/dlford/config.h | 1 - .../dactyl_manuform/5x6/keymaps/rishka/config.h | 1 - .../5x6_68/keymaps/default/config.h | 1 - keyboards/handwired/frenchdev/config.h | 1 - .../heisenberg/keymaps/turkishish/config.h | 3 +- .../jscotto/scotto36/keymaps/default/config.h | 1 - .../jscotto/scotto40/keymaps/default/config.h | 1 - .../jscotto/scottocmd/keymaps/default/config.h | 1 - .../jscotto/scottostarter/keymaps/default/config.h | 1 - .../handwired/lagrange/keymaps/dpapavas/config.h | 1 - keyboards/handwired/pterodactyl/config.h | 2 - .../stef9998/split_5x7/keymaps/stef9998/config.h | 2 - keyboards/handwired/xealous/rev1/config.h | 2 - keyboards/helix/rev2/keymaps/edvorakjp/config.h | 1 - keyboards/hhkb/ansi/keymaps/blakedietz/config.h | 4 - keyboards/hhkb/ansi/keymaps/brett/config.h | 3 - keyboards/hidtech/bastyl/keymaps/xyverz/config.h | 1 - keyboards/hotdox/config.h | 1 - keyboards/ibnuda/alicia_cook/keymaps/rick/config.h | 1 - keyboards/ibnuda/squiggle/keymaps/default/config.h | 1 - .../ibnuda/squiggle/keymaps/default38/config.h | 1 - .../ibnuda/squiggle/keymaps/defaultfull/config.h | 1 - .../squiggle/keymaps/defaultminidox/config.h | 1 - .../squiggle/keymaps/rick-complicated/config.h | 1 - keyboards/ibnuda/squiggle/keymaps/rick/config.h | 1 - keyboards/idobao/id75/keymaps/egstad/config.h | 1 - keyboards/idobao/id75/keymaps/gkbd_75/config.h | 1 - keyboards/idobao/id75/keymaps/gkbd_orthon/config.h | 1 - keyboards/input_club/ergodox_infinity/config.h | 1 - .../ergodox_infinity/keymaps/narze/config.h | 1 - keyboards/jian/keymaps/advanced/config.h | 1 - keyboards/jian/keymaps/default/config.h | 2 - keyboards/jian/keymaps/left_hand/config.h | 1 - keyboards/jian/keymaps/via/config.h | 1 - keyboards/k34/keymaps/default/config.h | 1 - keyboards/karn/keymaps/colemak/config.h | 5 -- .../bfo9000/keymaps/insertsnideremarks/config.h | 1 - .../keebio/bfo9000/keymaps/tuesdayjohn/config.h | 1 - keyboards/keebio/iris/keymaps/edvorakjp/config.h | 1 - keyboards/keebio/iris/keymaps/emp/config.h | 6 -- .../keebio/iris/keymaps/fluffactually/config.h | 1 - keyboards/keebio/iris/keymaps/khitsule/config.h | 1 - keyboards/keebio/iris/keymaps/radlinskii/config.h | 1 - keyboards/keebio/iris/keymaps/sq5rix/config.h | 1 - keyboards/keebio/iris/keymaps/two_knob/config.h | 3 - .../keebio/quefrency/keymaps/bfiedler/config.h | 1 - .../keebio/quefrency/keymaps/bjohnson/config.h | 1 - .../rorschach/keymaps/insertsnideremarks/config.h | 1 - .../keebio/rorschach/keymaps/tuesdayjohn/config.h | 1 - .../keyboardio/atreus/keymaps/kkokdae/config.h | 1 - keyboards/keyhive/ut472/keymaps/hvp/config.h | 1 - .../kinesis/keymaps/insertsnideremarks/config.h | 1 - keyboards/kinesis/keymaps/tuesdayjohn/config.h | 1 - keyboards/kinesis/kint2pp/config.h | 2 - keyboards/kinesis/kint36/config.h | 2 - keyboards/kinesis/kint41/config.h | 2 - keyboards/kinesis/kintlc/config.h | 2 - keyboards/kinesis/stapelberg/config.h | 2 - .../kprepublic/bm40hsrgb/keymaps/34keys/config.h | 3 - .../bm40hsrgb/keymaps/gabustoledo/config.h | 3 - .../bm68hsrgb/rev1/keymaps/peepeetee/config.h | 1 - .../bm80hsrgb/keymaps/peepeetee/config.h | 1 - .../kprepublic/jj40/keymaps/stevexyz/config.h | 2 - keyboards/lets_split/keymaps/adam/config.h | 1 - keyboards/lets_split/keymaps/shaymdev/config.h | 1 - keyboards/lily58/keymaps/hvp/config.h | 1 - keyboards/lily58/keymaps/muppetjones/config.h | 3 - keyboards/lily58/keymaps/muuko/config.h | 1 - keyboards/lily58/keymaps/narze/config.h | 1 - keyboards/lily58/keymaps/niolang/config.h | 3 - keyboards/lyso1/lck75/config.h | 1 - .../makenova/omega/omega4/keymaps/default/config.h | 1 - .../omega/omega4/keymaps/default_10u_bar/config.h | 1 - .../omega/omega4/keymaps/default_6u_bar/config.h | 1 - .../maple_computing/minidox/keymaps/bepo/config.h | 1 - .../minidox/keymaps/dustypomerleau/config.h | 1 - .../minidox/keymaps/khitsule/config.h | 6 -- .../minidox/keymaps/rsthd_combos/config.h | 1 - .../minidox/keymaps/xyverz/config.h | 1 - .../marksard/leftover30/keymaps/default/config.h | 1 - .../marksard/treadstone32/keymaps/default/config.h | 1 - .../treadstone32/keymaps/like_jis/config.h | 1 - .../treadstone48/rev1/keymaps/like_jis_rs/config.h | 1 - keyboards/massdrop/alt/keymaps/b_/config.h | 1 - keyboards/massdrop/alt/keymaps/pregame/config.h | 1 - keyboards/massdrop/ctrl/keymaps/endgame/config.h | 1 - .../massdrop/ctrl/keymaps/matthewrobo/config.h | 1 - keyboards/massdrop/ctrl/keymaps/xanimos/config.h | 1 - .../mechwild/bde/lefty/keymaps/default/config.h | 2 - .../mechwild/bde/lefty/keymaps/fancy/config.h | 2 - keyboards/mechwild/bde/lefty/keymaps/via/config.h | 2 - keyboards/mechwild/bde/rev2/keymaps/via/config.h | 2 - .../mechwild/bde/righty/keymaps/default/config.h | 3 - keyboards/mechwild/bde/righty/keymaps/via/config.h | 2 - keyboards/moonlander/keymaps/jjerrell/config.h | 1 - keyboards/numatreus/keymaps/like_jis/config.h | 1 - .../steal_this_keyboard/keymaps/default/config.h | 1 - keyboards/orthodox/keymaps/shaymdev/config.h | 1 - keyboards/pica40/keymaps/zzeneg/config.h | 1 - keyboards/pierce/keymaps/durken1/config.h | 3 - keyboards/pisces/keymaps/default/config.h | 1 - keyboards/pisces/keymaps/via/config.h | 1 - keyboards/planck/ez/config.h | 2 - keyboards/planck/keymaps/altgr/config.h | 1 - keyboards/planck/keymaps/antosha417/config.h | 1 - keyboards/planck/keymaps/ariccb/config.h | 2 - keyboards/planck/keymaps/hiea/config.h | 1 - keyboards/planck/keymaps/hieax/config.h | 1 - keyboards/planck/keymaps/hvp/config.h | 1 - keyboards/planck/keymaps/jweickm/config.h | 1 - keyboards/planck/keymaps/mattly/config.h | 1 - keyboards/planck/keymaps/muppetjones/config.h | 3 - keyboards/planck/keymaps/mwpeterson/config.h | 1 - keyboards/planck/keymaps/narze/config.h | 1 - keyboards/planck/keymaps/sdothum/config.h | 1 - keyboards/planck/keymaps/snowkuma/config.h | 1 - keyboards/planck/keymaps/tylerwince/config.h | 1 - keyboards/preonic/keymaps/egstad/config.h | 1 - keyboards/preonic/keymaps/laurentlaurent/config.h | 4 +- keyboards/q4z/keymaps/default/config.h | 2 - keyboards/q4z/keymaps/rjboone/config.h | 2 - keyboards/qpockets/eggman/keymaps/default/config.h | 1 - .../space_space/rev1/keymaps/big_space/config.h | 1 - .../space_space/rev1/keymaps/default/config.h | 1 - .../space_space/rev2/keymaps/big_space/config.h | 1 - .../space_space/rev2/keymaps/default/config.h | 1 - .../space_space/rev2/keymaps/qpockets/config.h | 1 - keyboards/qpockets/wanten/keymaps/2u_bars/config.h | 1 - keyboards/qpockets/wanten/keymaps/625_bar/config.h | 1 - keyboards/qpockets/wanten/keymaps/default/config.h | 1 - .../nomu30/keymaps/center_sprit/config.h | 1 - .../nomu30/keymaps/like_jis/config.h | 1 - keyboards/redox/keymaps/eightbitraptor/config.h | 1 - keyboards/redox/keymaps/finex/config.h | 1 - keyboards/redox_w/keymaps/danielo515/config.h | 1 - keyboards/rmi_kb/chevron/config.h | 1 - keyboards/rmi_kb/herringbone/pro/config.h | 1 - keyboards/rmi_kb/herringbone/v1/config.h | 1 - keyboards/rmi_kb/squishyfrl/config.h | 1 - keyboards/rmi_kb/squishytkl/config.h | 1 - keyboards/rmi_kb/wete/v2/config.h | 1 - keyboards/signum/3_0/keymaps/sgurenkov/config.h | 3 - .../splitkb/aurora/corne/keymaps/x123/config.h | 3 +- keyboards/splitkb/kyria/keymaps/artflag/config.h | 3 - keyboards/splitkb/kyria/keymaps/default/config.h | 2 - keyboards/splitkb/kyria/keymaps/gotham/config.h | 1 - .../splitkb/kyria/keymaps/jimmysjolund/config.h | 20 ----- keyboards/splitkb/kyria/keymaps/lw/config.h | 5 +- .../splitkb/kyria/keymaps/maherma-adg/config.h | 2 - .../splitkb/kyria/keymaps/muppetjones/config.h | 3 - keyboards/splitkb/kyria/keymaps/ohlin/config.h | 2 - keyboards/splitkb/kyria/keymaps/pierrec83/config.h | 1 - keyboards/splitkb/kyria/keymaps/via/config.h | 1 - .../splitkb/kyria/keymaps/winternebs/config.h | 1 - keyboards/splitkb/kyria/keymaps/zigotica/config.h | 1 - keyboards/synapse/keymaps/7u_space/config.h | 1 - keyboards/synapse/keymaps/default/config.h | 1 - .../thevankeyboards/minivan/keymaps/budi/config.h | 1 - .../thevankeyboards/minivan/keymaps/hvp/config.h | 1 - .../minivan/keymaps/like_jis/config.h | 1 - .../tominabox1/le_chiffre/keymaps/default/config.h | 2 - keyboards/z34/keymaps/zigotica/config.h | 1 - layouts/community/ergodox/berfarah/config.h | 1 - layouts/community/ergodox/kejadlen/config.h | 1 - layouts/community/ortho_4x12/junonum/config.h | 3 - layouts/community/planck_mit/guidoism/config.h | 1 - quantum/action.c | 2 +- quantum/action_tapping.c | 17 +---- quantum/process_keycode/process_auto_shift.c | 14 +--- .../default_mod_tap/config.h | 2 - .../quick_tap/test_quick_tap.cpp | 80 ------------------- users/curry/config.h | 1 - users/cwebster2/config.h | 1 - users/drashna/config.h | 1 - users/dshields/config.h | 1 - users/ericgebhart/config.h | 2 - users/ericgebhart/miryoku_hd_gold_config.h | 2 - users/ibnuda/config.h | 1 - users/jarred/config.h | 2 - users/kuchosauronad0/config.h | 5 -- users/manna-harbour_miryoku/config.h | 2 - users/mattly/config.h | 1 - users/muppetjones/config.h | 3 - users/pvinis/config.h | 2 - users/ridingqwerty/config.h | 1 - users/rmeli/config.h | 4 - users/snowe/snowe.h | 1 - users/tominabox1/tominabox1.c | 1 - users/uqs/config.h | 1 - users/vosechu/config.h | 5 -- users/wanleg/config.h | 4 - users/yet-another-developer/config.h | 5 -- users/zer09/config.h | 5 -- 287 files changed, 28 insertions(+), 734 deletions(-) delete mode 100644 keyboards/fungo/keymaps/default/config.h delete mode 100644 keyboards/maple_computing/minidox/keymaps/khitsule/config.h delete mode 100644 keyboards/splitkb/kyria/keymaps/jimmysjolund/config.h (limited to 'quantum/process_keycode') diff --git a/data/mappings/info_config.hjson b/data/mappings/info_config.hjson index 21d9d49104..bc4f46c353 100644 --- a/data/mappings/info_config.hjson +++ b/data/mappings/info_config.hjson @@ -133,7 +133,7 @@ "QMK_KEYS_PER_SCAN": {"info_key": "qmk.keys_per_scan", "value_type": "int", "deprecated": true}, "TAPPING_FORCE_HOLD": {"info_key": "tapping.force_hold", "value_type": "bool", "deprecated": true}, "TAPPING_FORCE_HOLD_PER_KEY": {"info_key": "tapping.force_hold_per_key", "value_type": "bool", "deprecated": true}, - "IGNORE_MOD_TAP_INTERRUPT": {"info_key": "_deprecated.ignore_mod_tap_interrupt", "value_type": "bool", "deprecated": true}, + "IGNORE_MOD_TAP_INTERRUPT": {"info_key": "_invalid.ignore_mod_tap_interrupt", "value_type": "bool", "invalid": true}, "IGNORE_MOD_TAP_INTERRUPT_PER_KEY": {"info_key": "_invalid.ignore_mod_tap_interrupt_per_key", "invalid": true} // USB params, need to mark as failure when specified in config.h, rather than deprecated diff --git a/docs/config_options.md b/docs/config_options.md index 5bfb7c5d58..8ea059a352 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -150,7 +150,7 @@ If you define these options you will enable the associated feature, which may in * `#define TAPPING_TERM_PER_KEY` * enables handling for per key `TAPPING_TERM` settings * `#define RETRO_TAPPING` - * tap anyway, even after TAPPING_TERM, if there was no other key interruption between press and release + * tap anyway, even after `TAPPING_TERM`, if there was no other key interruption between press and release * See [Retro Tapping](tap_hold.md#retro-tapping) for details * `#define RETRO_TAPPING_PER_KEY` * enables handling for per key `RETRO_TAPPING` settings @@ -161,9 +161,6 @@ If you define these options you will enable the associated feature, which may in * See [Permissive Hold](tap_hold.md#permissive-hold) for details * `#define PERMISSIVE_HOLD_PER_KEY` * enabled handling for per key `PERMISSIVE_HOLD` settings -* `#define IGNORE_MOD_TAP_INTERRUPT` - * makes it possible to do rolling combos (zx) with keys that convert to other keys on hold, by enforcing the `TAPPING_TERM` for both keys. - * See [Ignore Mod Tap Interrupt](tap_hold.md#ignore-mod-tap-interrupt) for details * `#define QUICK_TAP_TERM 100` * tap-then-hold timing to use a dual role key to repeat keycode * See [Quick Tap Term](tap_hold.md#quick-tap-term) diff --git a/docs/ja/config_options.md b/docs/ja/config_options.md index 6135721a42..4f9f1f2770 100644 --- a/docs/ja/config_options.md +++ b/docs/ja/config_options.md @@ -159,9 +159,6 @@ QMK での全ての利用可能な設定にはデフォルトがあります。 * 詳細は [Permissive Hold](ja/tap_hold.md#permissive-hold) を見てください * `#define PERMISSIVE_HOLD_PER_KEY` * キーごとの `PERMISSIVE_HOLD` 設定の処理を有効にします -* `#define IGNORE_MOD_TAP_INTERRUPT` - * 両方のキーに `TAPPING_TERM` を適用することで、ホールド時に他のキーに変換するキーを使ってローリングコンボ (zx) をすることができるようにします - * 詳細は [Ignore Mod Tap Interrupt](ja/tap_hold.md#ignore-mod-tap-interrupt) を見てください * `#define TAPPING_FORCE_HOLD` * タップされた直後に、デュアルロールキーを修飾子として使用できるようにします * [Tapping Force Hold](ja/tap_hold.md#tapping-force-hold)を見てください diff --git a/docs/ja/tap_hold.md b/docs/ja/tap_hold.md index ac64fe6ce3..00b80c8b22 100644 --- a/docs/ja/tap_hold.md +++ b/docs/ja/tap_hold.md @@ -63,8 +63,6 @@ uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { 通常、これら全てを `TAPPING_TERM` (デフォルト: 200ms) 内で行うと、ファームウェアとホストシステムによって `ax` として登録されます。許容ホールドを有効にすると、別のキーがタップされた場合にモッドタップキーを修飾キーと見なすように処理を変更し、 `X` (`SHIFT`+`x`) と登録されます。 -?> `モッドタップ割り込みの無視`を有効にしている場合、これにより両方の動きが変更されます。通常のキーには、最初のキーが最初に放された場合、あるいは両方のキーが `TAPPING_TERM` より長くホールドされた場合に、修飾キーが追加されます。 - この機能をより細かく制御するために、以下を `config.h` に追加することができます: ```c @@ -84,32 +82,6 @@ bool get_permissive_hold(uint16_t keycode, keyrecord_t *record) { } ``` -## モッドタップ割り込みの無視 - -この設定を有効にするには、これを `config.h` に追加してください: - -```c -#define IGNORE_MOD_TAP_INTERRUPT -``` - -許容ホールドと同様に、これは高速なタイピストのためのファームウェアの処理方法を変更します。モッドタップキーを押し、他のキーを押し、モッドタップキーを放し、通常のキーを放すと、`TAPPING_TERM` 内で押された場合でも、通常はモッドと通常のキーが出力されます。これは、ローリングコンボキーや、頻繁に使用するキー(例えば、`RCTL_T(KC_QUOT)`)にモッドタップを使う高速なタイピストには望ましくない場合があります。 - -`モッドタップ割り込みの無視`を設定するには、両方のキーを `TAPPING_TERM` の間ホールドすると、(その修飾キーの)ホールド機能を実行する必要があります。 - -例えば: - -- `SFT_T(KC_A)` を押す -- `KC_X` を押す -- `SFT_T(KC_A)` を放す -- `KC_X` を放す - -通常、これは大文字の `X` (`SHIFT`+`x`)、またはモッド + キーを送信します。`モッドタップ割り込みの無視` を有効にすると、ホールドアクションを登録するには、両方のキーを `TAPPING_TERM` の間ホールドする必要があります。この場合、素早いタップは `ax` を送信しますが、両方をホールドすると、大文字の `X` (`SHIFT`+`x`) を出力します。 - - -?> __注意__: これはモディファイアにのみ関係し、レイヤー切り替えキーには関係しません。 - -?> `許容ホールド`を有効にすると、これは両方がどのように動作するかを変更します。通常のキーには、最初のキーが最初に放された場合、あるいは両方のキーが `TAPPING_TERM` より長くホールドされた場合に、修飾キーが追加されます。 - ## タッピング強制ホールド `タッピング強制ホールド` を有効にするには、以下を `config.h` に追加します: diff --git a/docs/mod_tap.md b/docs/mod_tap.md index ca3a2752c7..8b953d76b4 100644 --- a/docs/mod_tap.md +++ b/docs/mod_tap.md @@ -111,8 +111,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } ``` -Enabling `IGNORE_MOD_TAP_INTERRUPT` is recommended when using Mod-Tap on alphanumeric keys to avoid hold function taking precendence when the next key is pressed quickly. See [Ignore Mod Tap Interrupt](tap_hold.md#ignore-mod-tap-interrupt) for more details. - ### Changing both tap and hold This last example implements custom tap and hold function with `LT(0,KC_NO)` to create a single copy-on-tap, paste-on-hold key: diff --git a/docs/tap_hold.md b/docs/tap_hold.md index 348e2655eb..cdc1cfeca7 100644 --- a/docs/tap_hold.md +++ b/docs/tap_hold.md @@ -130,20 +130,18 @@ Note that until the tap-or-hold decision completes (which happens when either th To better illustrate the tap-or-hold decision modes, let us compare the expected output of each decision mode in a handful of tapping scenarios involving a mod-tap key (`LSFT_T(KC_A)`) and a regular key (`KC_B`) with the `TAPPING_TERM` set to 200ms. -By default, mod-taps behave like `HOLD_ON_OTHER_KEY_PRESS`, while layer-taps behave like "Ignore Interrupt" out of the box. If you want "Ignore Interrupt"-like behaviour for mod-taps, you must enable `IGNORE_MOD_TAP_INTERRUPT`, or return `false` in the `get_hold_on_other_key_press` function for all mod-taps. - Note: "`kc` held" in the "Physical key event" column means that the key wasn't physically released yet at this point in time. #### Distinct taps (AABB) :id=distinct-taps -| Time | Physical key event |Ignore Interrupt| `PERMISSIVE_HOLD` | `HOLD_ON_OTHER_KEY_PRESS` | +| Time | Physical key event | Default | `PERMISSIVE_HOLD` | `HOLD_ON_OTHER_KEY_PRESS` | |------|--------------------|----------------|-------------------|----------------------------| | 0 | `LSFT_T(KC_A)` down| | | | | 199 | `LSFT_T(KC_A)` up | a | a | a | | 210 | `KC_B` down | ab | ab | ab | | 220 | `KC_B` up | ab | ab | ab | -| Time | Physical key event |Ignore Interrupt| `PERMISSIVE_HOLD` | `HOLD_ON_OTHER_KEY_PRESS` | +| Time | Physical key event | Default | `PERMISSIVE_HOLD` | `HOLD_ON_OTHER_KEY_PRESS` | |------|--------------------|----------------|-------------------|----------------------------| | 0 | `LSFT_T(KC_A)` down| | | | | 200 | `LSFT_T(KC_A)` held|Shift| Shift | Shift | @@ -153,14 +151,14 @@ Note: "`kc` held" in the "Physical key event" column means that the key wasn't p #### Nested tap (ABBA) :id=nested-tap -| Time | Physical key event |Ignore Interrupt| `PERMISSIVE_HOLD` | `HOLD_ON_OTHER_KEY_PRESS` | +| Time | Physical key event | Default | `PERMISSIVE_HOLD` | `HOLD_ON_OTHER_KEY_PRESS` | |------|--------------------|----------------|-------------------|----------------------------| | 0 | `LSFT_T(KC_A)` down| | | | | 110 | `KC_B` down | | | B | | 120 | `KC_B` up | | B | B | | 199 | `LSFT_T(KC_A)` up | ab | B | B | -| Time | Physical key event |Ignore Interrupt| `PERMISSIVE_HOLD` | `HOLD_ON_OTHER_KEY_PRESS` | +| Time | Physical key event | Default | `PERMISSIVE_HOLD` | `HOLD_ON_OTHER_KEY_PRESS` | |------|--------------------|----------------|-------------------|----------------------------| | 0 | `LSFT_T(KC_A)` down| | | | | 110 | `KC_B` down | | | B | @@ -168,7 +166,7 @@ Note: "`kc` held" in the "Physical key event" column means that the key wasn't p | 200 | `LSFT_T(KC_A)` held| B | B | B | | 210 | `LSFT_T(KC_A)` up | B | B | B | -| Time | Physical key event |Ignore Interrupt| `PERMISSIVE_HOLD` | `HOLD_ON_OTHER_KEY_PRESS` | +| Time | Physical key event | Default | `PERMISSIVE_HOLD` | `HOLD_ON_OTHER_KEY_PRESS` | |------|--------------------|----------------|-------------------|----------------------------| | 0 | `LSFT_T(KC_A)` down| | | | | 200 | `LSFT_T(KC_A)` held|Shift| Shift | Shift | @@ -178,14 +176,14 @@ Note: "`kc` held" in the "Physical key event" column means that the key wasn't p #### Rolling keys (ABAB) :id=rolling-keys -| Time | Physical key event |Ignore Interrupt| `PERMISSIVE_HOLD` | `HOLD_ON_OTHER_KEY_PRESS` | +| Time | Physical key event | Default | `PERMISSIVE_HOLD` | `HOLD_ON_OTHER_KEY_PRESS` | |------|--------------------|----------------|-------------------|----------------------------| | 0 | `LSFT_T(KC_A)` down| | | | | 110 | `KC_B` down | | | B | | 130 | `LSFT_T(KC_A)` up | ab | ab | B | | 140 | `KC_B` up | ab | ab | B | -| Time | Physical key event |Ignore Interrupt| `PERMISSIVE_HOLD` | `HOLD_ON_OTHER_KEY_PRESS` | +| Time | Physical key event | Default | `PERMISSIVE_HOLD` | `HOLD_ON_OTHER_KEY_PRESS` | |------|--------------------|----------------|-------------------|----------------------------| | 0 | `LSFT_T(KC_A)` down| | | | | 110 | `KC_B` down | | | B | @@ -241,10 +239,8 @@ Example sequence 3 (Mod Tap): | +--------------+ | | +---------------------------|--------+ ``` -Based on previous examples, you might have expected the output of the above sequence to be `KC_A` `KC_X` -since `SFT_T(KC_A)` is NOT held longer than the `TAPPING_TERM`. -However, the actual output would be capital `X` (`SHIFT` + `x`) due to reasons -explained under [Ignore Mod Tap Interrupt](#ignore-mod-tap-interrupt). +In the above sequence, `SFT_T(KC_A)` has been released before the end of its `TAPPING_TERM` and as such will be interpreted as `KC_A`, +followed by any key event that happened after the initial press of `SFT_T(KC_A)`. In this instance, the output would be `KC_A` `KC_X`. ### Permissive Hold @@ -379,73 +375,6 @@ bool get_hold_on_other_key_press(uint16_t keycode, keyrecord_t *record) { } ``` - -## Ignore Mod Tap Interrupt - -To enable this setting, add this to your `config.h`: - -```c -#define IGNORE_MOD_TAP_INTERRUPT -``` - -?> This option affects only the Mod Tap keys; it does not affect other dual-role keys such as Layer Tap. - -By default, the tap-or-hold decision for Mod Tap keys strongly prefers the hold action. If you press a Mod Tap key, then press another key while still holding the Mod Tap key down, the Mod Tap press will be handled as a modifier hold even if the Mod Tap key is then released within the tapping term, and irrespective of the order in which those keys are released. Using options such as `PERMISSIVE_HOLD` or `HOLD_ON_OTHER_KEY_PRESS` will not affect the functionality of Mod Tap keys in a major way (these options would still affect the delay until the common code for dual-role keys finishes its tap-or-hold decision, but then the special code for Mod Tap keys will override the result of that decision and choose the hold action if another key was pressed). In fact, by default, the tap-or-hold decision for Mod Tap keys is done in the same way as if the `HOLD_ON_OTHER_KEY_PRESS` option was enabled, but without the decreased delay provided by `HOLD_ON_OTHER_KEY_PRESS`. - -If the `IGNORE_MOD_TAP_INTERRUPT` option is enabled, Mod Tap keys are no longer treated as a special case, and their behavior will match the behavior of other dual-role keys such as Layer Tap. Then the behavior of Mod Tap keys can be further tuned using other options such as `PERMISSIVE_HOLD` or `HOLD_ON_OTHER_KEY_PRESS`. - -An example of a sequence that will be affected by the `IGNORE_MOD_TAP_INTERRUPT` option (assuming that options like `PERMISSIVE_HOLD` or `HOLD_ON_OTHER_KEY_PRESS` are not enabled): - -- `SFT_T(KC_A)` Down -- `KC_X` Down -- `SFT_T(KC_A)` Up -- `KC_X` Up - -``` - TAPPING_TERM - +---------------------------|--------+ - | +-------------+ | | - | | SFT_T(KC_A) | | | - | +-------------+ | | - | +--------------+ | | - | | KC_X | | | - | +--------------+ | | - +---------------------------|--------+ -``` - -Normally, this would send a capital `X` (`SHIFT`+`x`), even if the sequence is performed faster than the `TAPPING_TERM`. However, if the `IGNORE_MOD_TAP_INTERRUPT` option is enabled, the `SFT_T(KC_A)` key must be held longer than the `TAPPING_TERM` to register the hold action. A quick tap will output `ax` in this case, while a hold will still output a capital `X` (`SHIFT`+`x`). - -However, if the `HOLD_ON_OTHER_KEY_PRESS` option is enabled in addition to `IGNORE_MOD_TAP_INTERRUPT`, the above sequence will again send a capital `X` (`SHIFT`+`x`) even if performed faster than the `TAPPING_TERM`. The difference from the default configuration is that by default the host will receive the key events only after the `SFT_T(KC_A)` key is released, but with the `HOLD_ON_OTHER_KEY_PRESS` option, the host will start receiving key events when the `KC_X` key is pressed. - -For more granular control of this feature, you can add the following to your `config.h`: - -```c -#define HOLD_ON_OTHER_KEY_PRESS_PER_KEY -``` - -?> This option affects *all* dual-role keys. - -You can then add the following function to your keymap: - -```c -bool get_hold_on_other_key_press(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case SFT_T(KC_SPC): - // Do not force the mod-tap key press to be handled as a modifier - // if any other key was pressed while the mod-tap key is held down. - return false; - default: - // Force the dual-role key press to be handled as a modifier if any - // other key was pressed while the mod-tap key is held down. - return true; - } -} -``` - -Note that you must return `false` in `get_hold_on_other_key_press` in order to apply `IGNORE_MOD_TAP_INTERRUPT` for a certain mod-tap key. - -?> `IGNORE_MOD_TAP_INTERRUPT[_PER_KEY]` is being progressively phased out to align the (default) behavior and configuration of mod-taps with the rest of dual-role keys. - ## Quick Tap Term When the user holds a key after tapping it, the tapping function is repeated by default, rather than activating the hold function. This allows keeping the ability to auto-repeat the tapping function of a dual-role key. `QUICK_TAP_TERM` enables fine tuning of that ability. If set to `0`, it will remove the auto-repeat ability and activate the hold function instead. diff --git a/keyboards/0xcb/splaytoraid/keymaps/pi/config.h b/keyboards/0xcb/splaytoraid/keymaps/pi/config.h index d955f36ab3..52e39aef65 100644 --- a/keyboards/0xcb/splaytoraid/keymaps/pi/config.h +++ b/keyboards/0xcb/splaytoraid/keymaps/pi/config.h @@ -5,9 +5,6 @@ #define TAPPING_TERM 180 -// Prevent normal rollover on alphas from accidentally triggering mods. -#define IGNORE_MOD_TAP_INTERRUPT - #undef LOCKING_SUPPORT_ENABLE #undef LOCKING_RESYNC_ENABLE diff --git a/keyboards/40percentclub/gherkin/keymaps/pierrec83/config.h b/keyboards/40percentclub/gherkin/keymaps/pierrec83/config.h index bde9ec2055..0df91ad925 100644 --- a/keyboards/40percentclub/gherkin/keymaps/pierrec83/config.h +++ b/keyboards/40percentclub/gherkin/keymaps/pierrec83/config.h @@ -27,5 +27,4 @@ #define TAPPING_TERM 200 #define PERMISSIVE_HOLD -#define IGNORE_MOD_TAP_INTERRUPT #define QUICK_TAP_TERM 0 diff --git a/keyboards/40percentclub/gherkin/keymaps/stevexyz/config.h b/keyboards/40percentclub/gherkin/keymaps/stevexyz/config.h index 243b953f68..589a67f03d 100644 --- a/keyboards/40percentclub/gherkin/keymaps/stevexyz/config.h +++ b/keyboards/40percentclub/gherkin/keymaps/stevexyz/config.h @@ -13,8 +13,6 @@ #define PERMISSIVE_HOLD // makes tap and hold keys trigger the hold if another key is pressed before releasing, even if it hasn't hit the TAPPING_TERM -#define IGNORE_MOD_TAP_INTERRUPT - // makes it possible to do rolling combos (zx) with keys that convert to other keys on hold, by enforcing the TAPPING_TERM for both keys. #define QUICK_TAP_TERM 0 // makes it possible to use a dual role key as modifier shortly after having been tapped (see Hold after tap) diff --git a/keyboards/40percentclub/half_n_half/keymaps/Boy_314/config.h b/keyboards/40percentclub/half_n_half/keymaps/Boy_314/config.h index f73fd055cc..be51c48d8a 100644 --- a/keyboards/40percentclub/half_n_half/keymaps/Boy_314/config.h +++ b/keyboards/40percentclub/half_n_half/keymaps/Boy_314/config.h @@ -17,6 +17,5 @@ #pragma once // place overrides here -#define IGNORE_MOD_TAP_INTERRUPT #define PERMISSIVE_HOLD #define TAPPING_TERM 200 diff --git a/keyboards/40percentclub/nori/keymaps/wings_36key/config.h b/keyboards/40percentclub/nori/keymaps/wings_36key/config.h index eacfacc5a7..f076ded9ba 100644 --- a/keyboards/40percentclub/nori/keymaps/wings_36key/config.h +++ b/keyboards/40percentclub/nori/keymaps/wings_36key/config.h @@ -16,8 +16,6 @@ #pragma once -#define IGNORE_MOD_TAP_INTERRUPT // MT key must be held longer than tapping term for - // modifer to be registered #define RETRO_TAPPING_PER_KEY #define TAPPING_TERM_PER_KEY diff --git a/keyboards/atreus/keymaps/kejadlen/config.h b/keyboards/atreus/keymaps/kejadlen/config.h index 5a9573c57f..a75070e199 100644 --- a/keyboards/atreus/keymaps/kejadlen/config.h +++ b/keyboards/atreus/keymaps/kejadlen/config.h @@ -7,7 +7,6 @@ #define DIODE_DIRECTION COL2ROW -#define IGNORE_MOD_TAP_INTERRUPT #define QUICK_TAP_TERM 0 #define USB_MAX_POWER_CONSUMPTION 50 diff --git a/keyboards/atreus/keymaps/khitsule/config.h b/keyboards/atreus/keymaps/khitsule/config.h index c74909a9ff..7fa3bf328e 100644 --- a/keyboards/atreus/keymaps/khitsule/config.h +++ b/keyboards/atreus/keymaps/khitsule/config.h @@ -3,6 +3,4 @@ #include "../../config.h" -#define IGNORE_MOD_TAP_INTERRUPT - #endif diff --git a/keyboards/atreus62/keymaps/hvp/config.h b/keyboards/atreus62/keymaps/hvp/config.h index e1222e21f5..8013c0cb6d 100644 --- a/keyboards/atreus62/keymaps/hvp/config.h +++ b/keyboards/atreus62/keymaps/hvp/config.h @@ -1,5 +1,4 @@ #pragma once #define TAPPING_TERM 150 -#define IGNORE_MOD_TAP_INTERRUPT #define PERMISSIVE_HOLD diff --git a/keyboards/aya/keymaps/default/config.h b/keyboards/aya/keymaps/default/config.h index 5ef534d04f..6e57fd6499 100644 --- a/keyboards/aya/keymaps/default/config.h +++ b/keyboards/aya/keymaps/default/config.h @@ -16,4 +16,3 @@ #pragma once -#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/b_sides/rev41lp/keymaps/cyril/config.h b/keyboards/b_sides/rev41lp/keymaps/cyril/config.h index 4677c5f1d4..7029bdddb7 100644 --- a/keyboards/b_sides/rev41lp/keymaps/cyril/config.h +++ b/keyboards/b_sides/rev41lp/keymaps/cyril/config.h @@ -18,4 +18,3 @@ along with this program. If not, see . #define TAPPING_TERM 150 #define TAPPING_TERM_PER_KEY -#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/b_sides/rev41lp/keymaps/namnlos/config.h b/keyboards/b_sides/rev41lp/keymaps/namnlos/config.h index 1ad3156afa..19b366f4a8 100644 --- a/keyboards/b_sides/rev41lp/keymaps/namnlos/config.h +++ b/keyboards/b_sides/rev41lp/keymaps/namnlos/config.h @@ -22,7 +22,6 @@ #define BACKLIGHT_DEFAULT_LEVEL 3 #define COMBO_COUNT 3 -#define IGNORE_MOD_TAP_INTERRUPT #define UNICODE_SELECTED_MODES UNICODE_MODE_WINCOMPOSE, UNICODE_MODE_WINDOWS, UNICODE_MODE_MACOS, UNICODE_MODE_LINUX diff --git a/keyboards/bajjak/config.h b/keyboards/bajjak/config.h index 07f6dcaf50..614d7a7813 100644 --- a/keyboards/bajjak/config.h +++ b/keyboards/bajjak/config.h @@ -46,7 +46,6 @@ along with this program. If not, see . #define TAPPING_TOGGLE 1 #define TAPPING_TERM 200 -#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.) /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/barracuda/keymaps/default/config.h b/keyboards/barracuda/keymaps/default/config.h index 810b6546db..fbac4dcb26 100644 --- a/keyboards/barracuda/keymaps/default/config.h +++ b/keyboards/barracuda/keymaps/default/config.h @@ -17,4 +17,3 @@ #pragma once #define TAPPING_TERM 175 // milliseconds -#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/barracuda/keymaps/via/config.h b/keyboards/barracuda/keymaps/via/config.h index 810b6546db..fbac4dcb26 100644 --- a/keyboards/barracuda/keymaps/via/config.h +++ b/keyboards/barracuda/keymaps/via/config.h @@ -17,4 +17,3 @@ #pragma once #define TAPPING_TERM 175 // milliseconds -#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/bastardkb/charybdis/3x5/keymaps/bstiq/config.h b/keyboards/bastardkb/charybdis/3x5/keymaps/bstiq/config.h index 0a2db20561..d7b6d01bce 100644 --- a/keyboards/bastardkb/charybdis/3x5/keymaps/bstiq/config.h +++ b/keyboards/bastardkb/charybdis/3x5/keymaps/bstiq/config.h @@ -67,20 +67,6 @@ */ #define PERMISSIVE_HOLD -/** - * Prevent normal rollover on alphas from accidentally triggering mods. - * - * Ignores key presses that interrupt a mod-tap. Must-have for Home Row mod. - * - * Without `IGNORE_MOD_TAP_INTERRUPT`, within `TAPPING_TERM`: - * Mod(a)🠗 e🠗 Mod(a)🠕 e🠕 ➞ Mod+e - * With `IGNORE_MOD_TAP_INTERRUPT`, within `TAPPING_TERM`: - * Mod(a)🠗 e🠗 Mod(a)🠕 e🠕 ➞ ae - * - * See docs.qmk.fm/using-qmk/software-features/tap_hold#ignore-mod-tap-interrupt - */ -#define IGNORE_MOD_TAP_INTERRUPT - /** Charybdis-specific features. */ #ifdef POINTING_DEVICE_ENABLE diff --git a/keyboards/bastardkb/charybdis/3x5/keymaps/via/config.h b/keyboards/bastardkb/charybdis/3x5/keymaps/via/config.h index 5d9d4662f0..fd33c84758 100644 --- a/keyboards/bastardkb/charybdis/3x5/keymaps/via/config.h +++ b/keyboards/bastardkb/charybdis/3x5/keymaps/via/config.h @@ -24,18 +24,6 @@ /* Disable unused features. */ #define NO_ACTION_ONESHOT -/** - * \brief Prevent normal rollover on alphas from accidentally triggering mods. - * - * Ignores key presses that interrupt a mod-tap. Must-have for Home Row mod. - * - * Without `IGNORE_MOD_TAP_INTERRUPT`, within `TAPPING_TERM`: - * Mod(a)🠗 e🠗 Mod(a)🠕 e🠕 ➞ Mod+e - * With `IGNORE_MOD_TAP_INTERRUPT`, within `TAPPING_TERM`: - * Mod(a)🠗 e🠗 Mod(a)🠕 e🠕 ➞ ae - */ -#define IGNORE_MOD_TAP_INTERRUPT - /* Charybdis-specific features. */ #ifdef POINTING_DEVICE_ENABLE diff --git a/keyboards/bastardkb/dilemma/3x5_2/keymaps/bstiq/config.h b/keyboards/bastardkb/dilemma/3x5_2/keymaps/bstiq/config.h index 2390d10ca5..8d8baa5c32 100644 --- a/keyboards/bastardkb/dilemma/3x5_2/keymaps/bstiq/config.h +++ b/keyboards/bastardkb/dilemma/3x5_2/keymaps/bstiq/config.h @@ -65,20 +65,6 @@ */ #define PERMISSIVE_HOLD -/** - * Prevent normal rollover on alphas from accidentally triggering mods. - * - * Ignores key presses that interrupt a mod-tap. Must-have for Home Row mod. - * - * Without `IGNORE_MOD_TAP_INTERRUPT`, within `TAPPING_TERM`: - * Mod(a)🠗 e🠗 Mod(a)🠕 e🠕 ➞ Mod+e - * With `IGNORE_MOD_TAP_INTERRUPT`, within `TAPPING_TERM`: - * Mod(a)🠗 e🠗 Mod(a)🠕 e🠕 ➞ ae - * - * See docs.qmk.fm/using-qmk/software-features/tap_hold#ignore-mod-tap-interrupt - */ -#define IGNORE_MOD_TAP_INTERRUPT - /** Dilemma-specific features. */ #ifdef POINTING_DEVICE_ENABLE diff --git a/keyboards/bastardkb/dilemma/3x5_2/keymaps/via/config.h b/keyboards/bastardkb/dilemma/3x5_2/keymaps/via/config.h index 5bfac4b6c5..f92ea9a4c9 100644 --- a/keyboards/bastardkb/dilemma/3x5_2/keymaps/via/config.h +++ b/keyboards/bastardkb/dilemma/3x5_2/keymaps/via/config.h @@ -21,18 +21,6 @@ # define DYNAMIC_KEYMAP_LAYER_COUNT 6 #endif // VIA_ENABLE -/** - * \brief Prevent normal rollover on alphas from accidentally triggering mods. - * - * Ignores key presses that interrupt a mod-tap. Must-have for Home Row mod. - * - * Without `IGNORE_MOD_TAP_INTERRUPT`, within `TAPPING_TERM`: - * Mod(a)🠗 e🠗 Mod(a)🠕 e🠕 ➞ Mod+e - * With `IGNORE_MOD_TAP_INTERRUPT`, within `TAPPING_TERM`: - * Mod(a)🠗 e🠗 Mod(a)🠕 e🠕 ➞ ae - */ -#define IGNORE_MOD_TAP_INTERRUPT - /* Charybdis-specific features. */ #ifdef POINTING_DEVICE_ENABLE diff --git a/keyboards/bastardkb/dilemma/3x5_3/keymaps/bstiq/config.h b/keyboards/bastardkb/dilemma/3x5_3/keymaps/bstiq/config.h index fce6c3a1f6..cfdafc4a51 100644 --- a/keyboards/bastardkb/dilemma/3x5_3/keymaps/bstiq/config.h +++ b/keyboards/bastardkb/dilemma/3x5_3/keymaps/bstiq/config.h @@ -59,18 +59,6 @@ */ #define PERMISSIVE_HOLD -/** - * Prevent normal rollover on alphas from accidentally triggering mods. - * - * Ignores key presses that interrupt a mod-tap. Must-have for Home Row mod. - * - * Without `IGNORE_MOD_TAP_INTERRUPT`, within `TAPPING_TERM`: - * Mod(a)🠗 e🠗 Mod(a)🠕 e🠕 ➞ Mod+e - * With `IGNORE_MOD_TAP_INTERRUPT`, within `TAPPING_TERM`: - * Mod(a)🠗 e🠗 Mod(a)🠕 e🠕 ➞ ae - */ -#define IGNORE_MOD_TAP_INTERRUPT - /** Dilemma-specific features. */ #ifdef POINTING_DEVICE_ENABLE diff --git a/keyboards/bastardkb/scylla/keymaps/xyverz/config.h b/keyboards/bastardkb/scylla/keymaps/xyverz/config.h index 335f968e2a..4fa185e956 100644 --- a/keyboards/bastardkb/scylla/keymaps/xyverz/config.h +++ b/keyboards/bastardkb/scylla/keymaps/xyverz/config.h @@ -28,6 +28,5 @@ along with this program. If not, see . #define QUICK_TAP_TERM 0 #define TAPPING_TERM 300 #define PERMISSIVE_HOLD -#define IGNORE_MOD_TAP_INTERRUPT #define LEADER_PER_KEY_TIMING #define LEADER_TIMEOUT 300 \ No newline at end of file diff --git a/keyboards/bastardkb/tbk/keymaps/xyverz/config.h b/keyboards/bastardkb/tbk/keymaps/xyverz/config.h index 335f968e2a..4fa185e956 100644 --- a/keyboards/bastardkb/tbk/keymaps/xyverz/config.h +++ b/keyboards/bastardkb/tbk/keymaps/xyverz/config.h @@ -28,6 +28,5 @@ along with this program. If not, see . #define QUICK_TAP_TERM 0 #define TAPPING_TERM 300 #define PERMISSIVE_HOLD -#define IGNORE_MOD_TAP_INTERRUPT #define LEADER_PER_KEY_TIMING #define LEADER_TIMEOUT 300 \ No newline at end of file diff --git a/keyboards/blank_tehnologii/manibus/keymaps/samurai/config.h b/keyboards/blank_tehnologii/manibus/keymaps/samurai/config.h index d3017fbc06..2644dc8d65 100644 --- a/keyboards/blank_tehnologii/manibus/keymaps/samurai/config.h +++ b/keyboards/blank_tehnologii/manibus/keymaps/samurai/config.h @@ -17,7 +17,6 @@ #pragma once #define EE_HANDS #define TAPPING_TERM 200 -#define IGNORE_MOD_TAP_INTERRUPT #define MOUSEKEY_INTERVAL 16 #define MOUSEKEY_MAX_SPEED 3 #define MOUSEKEY_TIME_TO_MAX 30 diff --git a/keyboards/boardsource/lulu/keymaps/davidrambo/config.h b/keyboards/boardsource/lulu/keymaps/davidrambo/config.h index 8728002a39..7dea913a0f 100644 --- a/keyboards/boardsource/lulu/keymaps/davidrambo/config.h +++ b/keyboards/boardsource/lulu/keymaps/davidrambo/config.h @@ -23,7 +23,6 @@ #define TAPPING_TERM 210 /*#define PERMISSIVE_HOLD*/ -#define IGNORE_MOD_TAP_INTERRUPT #define TAPPING_FORCE_HOLD #ifdef RGB_MATRIX_ENABLE diff --git a/keyboards/buzzard/keymaps/crehmann/config.h b/keyboards/buzzard/keymaps/crehmann/config.h index c5638c767d..181396ad26 100644 --- a/keyboards/buzzard/keymaps/crehmann/config.h +++ b/keyboards/buzzard/keymaps/crehmann/config.h @@ -6,9 +6,6 @@ // Configure the global tapping term (default: 200ms) #define TAPPING_TERM 200 -// Prevent normal rollover on alphas from accidentally triggering mods. -#define IGNORE_MOD_TAP_INTERRUPT - // Enable rapid switch from tap to hold, disables double tap hold auto-repeat. #define QUICK_TAP_TERM 0 @@ -35,4 +32,4 @@ #ifdef PS2_MOUSE_ENABLE #define PS2_MOUSE_SCROLL_BTN_MASK (1<. #define QUICK_TAP_TERM 0 #define TAPPING_TERM 200 #define PERMISSIVE_HOLD -#define IGNORE_MOD_TAP_INTERRUPT #define RETRO_TAPPING diff --git a/keyboards/crkbd/keymaps/armand1m/config.h b/keyboards/crkbd/keymaps/armand1m/config.h index f4b8c08a3f..8d97cf1465 100644 --- a/keyboards/crkbd/keymaps/armand1m/config.h +++ b/keyboards/crkbd/keymaps/armand1m/config.h @@ -31,7 +31,6 @@ along with this program. If not, see . // #define QUICK_TAP_TERM 0 // #define PERMISSIVE_HOLD #define TAPPING_TERM 300 -#define IGNORE_MOD_TAP_INTERRUPT #ifdef RGBLIGHT_ENABLE #undef RGBLED_NUM diff --git a/keyboards/crkbd/keymaps/benrestech/config.h b/keyboards/crkbd/keymaps/benrestech/config.h index f700899883..b827d76fcb 100644 --- a/keyboards/crkbd/keymaps/benrestech/config.h +++ b/keyboards/crkbd/keymaps/benrestech/config.h @@ -31,7 +31,6 @@ along with this program. If not, see . #define QUICK_TAP_TERM 0 #define TAPPING_TERM 175 #define PERMISSIVE_HOLD -#define IGNORE_MOD_TAP_INTERRUPT #ifdef RGBLIGHT_ENABLE #undef RGBLED_NUM diff --git a/keyboards/crkbd/keymaps/bermeo/config.h b/keyboards/crkbd/keymaps/bermeo/config.h index 188f717aba..fce27a7265 100644 --- a/keyboards/crkbd/keymaps/bermeo/config.h +++ b/keyboards/crkbd/keymaps/bermeo/config.h @@ -31,7 +31,6 @@ along with this program. If not, see . // #define QUICK_TAP_TERM 0 #define TAPPING_TERM 150 // #define RETRO_TAPPING -// #define IGNORE_MOD_TAP_INTERRUPT // #define PERMISSIVE_HOLD #ifdef RGBLIGHT_ENABLE diff --git a/keyboards/crkbd/keymaps/crkdves/config.h b/keyboards/crkbd/keymaps/crkdves/config.h index ca025830b4..07d930137f 100644 --- a/keyboards/crkbd/keymaps/crkdves/config.h +++ b/keyboards/crkbd/keymaps/crkdves/config.h @@ -29,7 +29,6 @@ along with this program. If not, see . #define QUICK_TAP_TERM 0 #define TAPPING_TERM 200 // #define RETRO_TAPPING -// #define IGNORE_MOD_TAP_INTERRUPT #ifdef RGBLIGHT_ENABLE #define RGBLIGHT_SLEEP diff --git a/keyboards/crkbd/keymaps/crkqwes/config.h b/keyboards/crkbd/keymaps/crkqwes/config.h index bf33cc90aa..5be6a0449b 100644 --- a/keyboards/crkbd/keymaps/crkqwes/config.h +++ b/keyboards/crkbd/keymaps/crkqwes/config.h @@ -35,7 +35,6 @@ along with this program. If not, see . #define QUICK_TAP_TERM 0 #define TAPPING_TERM 200 // #define RETRO_TAPPING -// #define IGNORE_MOD_TAP_INTERRUPT #ifdef RGBLIGHT_ENABLE #undef RGBLED_NUM diff --git a/keyboards/crkbd/keymaps/edvorakjp/config.h b/keyboards/crkbd/keymaps/edvorakjp/config.h index ee4e7388be..94896f6898 100644 --- a/keyboards/crkbd/keymaps/edvorakjp/config.h +++ b/keyboards/crkbd/keymaps/edvorakjp/config.h @@ -10,7 +10,6 @@ // #define QUICK_TAP_TERM 0 #define TAPPING_TERM 300 -#define IGNORE_MOD_TAP_INTERRUPT #ifdef RGBLIGHT_ENABLE # undef RGBLED_NUM diff --git a/keyboards/crkbd/keymaps/gotham/config.h b/keyboards/crkbd/keymaps/gotham/config.h index 3f56ef92a5..753854c01c 100644 --- a/keyboards/crkbd/keymaps/gotham/config.h +++ b/keyboards/crkbd/keymaps/gotham/config.h @@ -3,7 +3,6 @@ #define EE_HANDS #define SPLIT_USB_DETECT -#define IGNORE_MOD_TAP_INTERRUPT #define PERMISSIVE_HOLD #define TAPPING_TERM 250 diff --git a/keyboards/crkbd/keymaps/hvp/config.h b/keyboards/crkbd/keymaps/hvp/config.h index a926f67537..1a9ac69498 100644 --- a/keyboards/crkbd/keymaps/hvp/config.h +++ b/keyboards/crkbd/keymaps/hvp/config.h @@ -33,7 +33,6 @@ along with this program. If not, see . #define TAPPING_TERM 150 #define PERMISSIVE_HOLD -#define IGNORE_MOD_TAP_INTERRUPT #ifdef RGBLIGHT_ENABLE # undef RGBLED_NUM diff --git a/keyboards/crkbd/keymaps/julian_turner/config.h b/keyboards/crkbd/keymaps/julian_turner/config.h index 3b875235a8..2d200d7d55 100644 --- a/keyboards/crkbd/keymaps/julian_turner/config.h +++ b/keyboards/crkbd/keymaps/julian_turner/config.h @@ -25,9 +25,6 @@ // Configure the global tapping term (default: 200ms) #define TAPPING_TERM 500 -// Prevent normal rollover on alphas from accidentally triggering mods. -#define IGNORE_MOD_TAP_INTERRUPT - // Enable rapid switch from tap to hold, disables double tap hold auto-repeat. #define QUICK_TAP_TERM 0 diff --git a/keyboards/crkbd/keymaps/markstos/config.h b/keyboards/crkbd/keymaps/markstos/config.h index ff00a04a8d..5644812e5e 100644 --- a/keyboards/crkbd/keymaps/markstos/config.h +++ b/keyboards/crkbd/keymaps/markstos/config.h @@ -42,9 +42,6 @@ This is the C configuration file for the keymap #define QMK_LED D5 #define QMK_SPEAKER C6 -// Prevent normal rollover on alphas from accidentally triggering mods. -#define IGNORE_MOD_TAP_INTERRUPT - // When enabled, typing a mod-tap plus second within term will register as the mod-combo // Ref: https://beta.docs.qmk.fm/using-qmk/software-features/tap_hold#permissive-hold #define PERMISSIVE_HOLD diff --git a/keyboards/crkbd/keymaps/nimishgautam/config.h b/keyboards/crkbd/keymaps/nimishgautam/config.h index 53b5f1b834..d169988be7 100644 --- a/keyboards/crkbd/keymaps/nimishgautam/config.h +++ b/keyboards/crkbd/keymaps/nimishgautam/config.h @@ -21,7 +21,6 @@ //Tapping values //#define QUICK_TAP_TERM 0 #define TAPPING_TERM 200 -#define IGNORE_MOD_TAP_INTERRUPT #define PERMISSIVE_HOLD_PER_KEY diff --git a/keyboards/crkbd/keymaps/rpbaptist/config.h b/keyboards/crkbd/keymaps/rpbaptist/config.h index 95485797cc..d0cda95794 100644 --- a/keyboards/crkbd/keymaps/rpbaptist/config.h +++ b/keyboards/crkbd/keymaps/rpbaptist/config.h @@ -98,7 +98,6 @@ along with this program. If not, see . #define TAPPING_TERM 140 #define PERMISSIVE_HOLD -#define IGNORE_MOD_TAP_INTERRUPT #define TAPPING_TOGGLE 2 diff --git a/keyboards/crkbd/keymaps/sharkby7e/config.h b/keyboards/crkbd/keymaps/sharkby7e/config.h index 60503a51a5..50a4247765 100644 --- a/keyboards/crkbd/keymaps/sharkby7e/config.h +++ b/keyboards/crkbd/keymaps/sharkby7e/config.h @@ -30,8 +30,6 @@ along with this program. If not, see . //#define QUICK_TAP_TERM 0 #define TAPPING_TERM 200 -#define IGNORE_MOD_TAP_INTERRUPT - #ifdef RGBLIGHT_ENABLE #define RGBLIGHT_EFFECT_BREATHING #define RGBLIGHT_EFFECT_RAINBOW_MOOD diff --git a/keyboards/crkbd/keymaps/snowe/config.h b/keyboards/crkbd/keymaps/snowe/config.h index 57a253428b..82097c503a 100644 --- a/keyboards/crkbd/keymaps/snowe/config.h +++ b/keyboards/crkbd/keymaps/snowe/config.h @@ -31,7 +31,6 @@ along with this program. If not, see . #define QUICK_TAP_TERM 0 #define TAPPING_TERM 200 -#define IGNORE_MOD_TAP_INTERRUPT #undef PERMISSIVE_HOLD #ifdef RGBLIGHT_ENABLE @@ -55,8 +54,5 @@ along with this program. If not, see . #define OLED_FONT_H "keyboards/crkbd/lib/glcdfont.c" -// fix for me putting alt under A and being a fast typist -#define IGNORE_MOD_TAP_INTERRUPT - #define LAYER_STATE_8BIT #define SPLIT_WPM_ENABLE diff --git a/keyboards/crkbd/keymaps/soundmonster/config.h b/keyboards/crkbd/keymaps/soundmonster/config.h index 6cd090f9fd..97614f3b70 100644 --- a/keyboards/crkbd/keymaps/soundmonster/config.h +++ b/keyboards/crkbd/keymaps/soundmonster/config.h @@ -31,7 +31,6 @@ along with this program. If not, see . // #define QUICK_TAP_TERM 0 #define TAPPING_TERM 150 #define RETRO_TAPPING -#define IGNORE_MOD_TAP_INTERRUPT #ifdef RGBLIGHT_ENABLE #undef RGBLED_NUM diff --git a/keyboards/crkbd/keymaps/thunderbird2086/config.h b/keyboards/crkbd/keymaps/thunderbird2086/config.h index 41e5c3ff43..ad2bfcabc7 100644 --- a/keyboards/crkbd/keymaps/thunderbird2086/config.h +++ b/keyboards/crkbd/keymaps/thunderbird2086/config.h @@ -8,7 +8,6 @@ // #define RGB_LAYER_ENABLE -#define IGNORE_MOD_TAP_INTERRUPT #define PERMISSIVE_HOLD #if defined(TAPPING_TERM) diff --git a/keyboards/crkbd/keymaps/xyverz/config.h b/keyboards/crkbd/keymaps/xyverz/config.h index 2ccbb229b8..3b7eab62e6 100644 --- a/keyboards/crkbd/keymaps/xyverz/config.h +++ b/keyboards/crkbd/keymaps/xyverz/config.h @@ -31,7 +31,6 @@ along with this program. If not, see . #define QUICK_TAP_TERM 0 #define TAPPING_TERM 300 #define PERMISSIVE_HOLD -#define IGNORE_MOD_TAP_INTERRUPT #define LEADER_PER_KEY_TIMING #define LEADER_TIMEOUT 300 diff --git a/keyboards/drhigsby/ogurec/keymaps/dack/config.h b/keyboards/drhigsby/ogurec/keymaps/dack/config.h index af5d55bf6e..cadd53a971 100644 --- a/keyboards/drhigsby/ogurec/keymaps/dack/config.h +++ b/keyboards/drhigsby/ogurec/keymaps/dack/config.h @@ -14,6 +14,5 @@ * along with this program. If not, see . */ #pragma once -#define IGNORE_MOD_TAP_INTERRUPT #define TAPPING_TERM 230 #define TAPPING_TERM_PER_KEY diff --git a/keyboards/dumbo/keymaps/trip-trap/config.h b/keyboards/dumbo/keymaps/trip-trap/config.h index 7f713e4a3d..15b6ce7c0d 100644 --- a/keyboards/dumbo/keymaps/trip-trap/config.h +++ b/keyboards/dumbo/keymaps/trip-trap/config.h @@ -19,9 +19,6 @@ // Tapping term is ever so slightly lowered from the 200ms default to make layer and mod usage more snappy. #define TAPPING_TERM 200 -// Prevent normal rollover on alphas from accidentally triggering mods. -#define IGNORE_MOD_TAP_INTERRUPT - // If you are using an Elite C rev3 on the slave side, uncomment the lines below: // #define SPLIT_USB_DETECT // #define NO_USB_STARTUP_CHECK diff --git a/keyboards/dztech/dz60rgb/keymaps/kgreulich/config.h b/keyboards/dztech/dz60rgb/keymaps/kgreulich/config.h index a5235259ff..6ad73f6edf 100644 --- a/keyboards/dztech/dz60rgb/keymaps/kgreulich/config.h +++ b/keyboards/dztech/dz60rgb/keymaps/kgreulich/config.h @@ -20,7 +20,6 @@ #define NO_ACTION_ONESHOT #define QUICK_TAP_TERM 0 -#define IGNORE_MOD_TAP_INTERRUPT // #include "config_led.h" // #include "dz60rgb.h" diff --git a/keyboards/dztech/dz60rgb/keymaps/matthewrobo/config.h b/keyboards/dztech/dz60rgb/keymaps/matthewrobo/config.h index 4ea0d150ea..90627f894f 100644 --- a/keyboards/dztech/dz60rgb/keymaps/matthewrobo/config.h +++ b/keyboards/dztech/dz60rgb/keymaps/matthewrobo/config.h @@ -66,7 +66,6 @@ #define NO_ACTION_ONESHOT #define QUICK_TAP_TERM 0 -#define IGNORE_MOD_TAP_INTERRUPT // #include "config_led.h" // #include "dz60rgb.h" diff --git a/keyboards/dztech/dz60rgb/keymaps/xunz/config.h b/keyboards/dztech/dz60rgb/keymaps/xunz/config.h index c302214061..d981df82ed 100644 --- a/keyboards/dztech/dz60rgb/keymaps/xunz/config.h +++ b/keyboards/dztech/dz60rgb/keymaps/xunz/config.h @@ -50,4 +50,3 @@ #define NO_ACTION_ONESHOT #define QUICK_TAP_TERM 0 -#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/dztech/dz65rgb/keymaps/matthewrobo/config.h b/keyboards/dztech/dz65rgb/keymaps/matthewrobo/config.h index 93e6990950..bce34bcfbc 100644 --- a/keyboards/dztech/dz65rgb/keymaps/matthewrobo/config.h +++ b/keyboards/dztech/dz65rgb/keymaps/matthewrobo/config.h @@ -60,7 +60,6 @@ #define NO_ACTION_ONESHOT #define QUICK_TAP_TERM 0 -#define IGNORE_MOD_TAP_INTERRUPT // #include "config_led.h" // #include "dz60rgb.h" diff --git a/keyboards/ein_60/keymaps/klackygears/config.h b/keyboards/ein_60/keymaps/klackygears/config.h index d3b1c7b4d9..91c51cb51c 100644 --- a/keyboards/ein_60/keymaps/klackygears/config.h +++ b/keyboards/ein_60/keymaps/klackygears/config.h @@ -20,7 +20,6 @@ #define PERMISSIVE_HOLD #define TAPPING_TERM 150 -#define IGNORE_MOD_TAP_INTERRUPT #ifdef RGB_MATRIX_ENABLE diff --git a/keyboards/ergodox_ez/config.h b/keyboards/ergodox_ez/config.h index 05aec8e958..bb91701044 100644 --- a/keyboards/ergodox_ez/config.h +++ b/keyboards/ergodox_ez/config.h @@ -47,7 +47,6 @@ along with this program. If not, see . #define TAPPING_TOGGLE 1 #define TAPPING_TERM 200 -#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.) /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/ergodox_ez/keymaps/bepo_tm_style/config.h b/keyboards/ergodox_ez/keymaps/bepo_tm_style/config.h index 11c81f2eba..c03ee70bd5 100755 --- a/keyboards/ergodox_ez/keymaps/bepo_tm_style/config.h +++ b/keyboards/ergodox_ez/keymaps/bepo_tm_style/config.h @@ -21,8 +21,6 @@ #undef TAPPING_TOGGLE #undef TAPPING_TERM -#undef IGNORE_MOD_TAP_INTERRUPT #define TAPPING_TOGGLE 1 #define TAPPING_TERM 150 -#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/ergodox_ez/keymaps/bpruitt-goddard/config.h b/keyboards/ergodox_ez/keymaps/bpruitt-goddard/config.h index 11c81f2eba..c03ee70bd5 100644 --- a/keyboards/ergodox_ez/keymaps/bpruitt-goddard/config.h +++ b/keyboards/ergodox_ez/keymaps/bpruitt-goddard/config.h @@ -21,8 +21,6 @@ #undef TAPPING_TOGGLE #undef TAPPING_TERM -#undef IGNORE_MOD_TAP_INTERRUPT #define TAPPING_TOGGLE 1 #define TAPPING_TERM 150 -#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/ergodox_ez/keymaps/danielo515/config.h b/keyboards/ergodox_ez/keymaps/danielo515/config.h index c69c0dfe57..7428cccc82 100644 --- a/keyboards/ergodox_ez/keymaps/danielo515/config.h +++ b/keyboards/ergodox_ez/keymaps/danielo515/config.h @@ -4,7 +4,6 @@ */ #pragma once -#define IGNORE_MOD_TAP_INTERRUPT #define TAPPING_TERM 200 #define ONESHOT_TAP_TOGGLE 3 diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h b/keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h index 3f8c68ceb7..e90d7184ee 100644 --- a/keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h @@ -12,8 +12,6 @@ #undef DEBOUNCE #define DEBOUNCE 15 -#undef IGNORE_MOD_TAP_INTERRUPT -#define IGNORE_MOD_TAP_INTERRUPT #define RGB_DISABLE_WHEN_USB_SUSPENDED diff --git a/keyboards/ergodox_ez/keymaps/nathanvercaemert/config.h b/keyboards/ergodox_ez/keymaps/nathanvercaemert/config.h index 06c50e0a96..232b608be9 100644 --- a/keyboards/ergodox_ez/keymaps/nathanvercaemert/config.h +++ b/keyboards/ergodox_ez/keymaps/nathanvercaemert/config.h @@ -25,8 +25,6 @@ // #undef TAPPING_TERM // #define TAPPING_TERM 499 -/* Turning permissive hold and ignore mod tap interrupt off in order to test the tapping term. */ +/* Turning permissive hold off in order to test the tapping term. */ #undef PERMISSIVE_HOLD #define PERMISSIVE_HOLD -#undef IGNORE_MOD_TAP_INTERRUPT -#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/ergodox_ez/keymaps/nfriend/config.h b/keyboards/ergodox_ez/keymaps/nfriend/config.h index 36d23c96b7..141d7ac89a 100644 --- a/keyboards/ergodox_ez/keymaps/nfriend/config.h +++ b/keyboards/ergodox_ez/keymaps/nfriend/config.h @@ -26,6 +26,4 @@ #define PERMISSIVE_HOLD -#undef IGNORE_MOD_TAP_INTERRUPT - #define RGBLIGHT_SLEEP diff --git a/keyboards/ergodox_ez/keymaps/rgb_layer/config.h b/keyboards/ergodox_ez/keymaps/rgb_layer/config.h index 84c5adfc9e..edd1f130cc 100644 --- a/keyboards/ergodox_ez/keymaps/rgb_layer/config.h +++ b/keyboards/ergodox_ez/keymaps/rgb_layer/config.h @@ -5,7 +5,6 @@ #define RGBLIGHT_SLEEP -#define IGNORE_MOD_TAP_INTERRUPT #undef PERMISSIVE_HOLD diff --git a/keyboards/ferris/keymaps/bruun-baer/config.h b/keyboards/ferris/keymaps/bruun-baer/config.h index 5c2377be1e..fce5cb445b 100644 --- a/keyboards/ferris/keymaps/bruun-baer/config.h +++ b/keyboards/ferris/keymaps/bruun-baer/config.h @@ -35,5 +35,4 @@ along with this program. If not, see . // Pick good defaults for enabling homerow modifiers #define TAPPING_TERM 200 #define PERMISSIVE_HOLD -#define IGNORE_MOD_TAP_INTERRUPT #define QUICK_TAP_TERM 0 diff --git a/keyboards/ferris/keymaps/default/config.h b/keyboards/ferris/keymaps/default/config.h index b10555bb0d..1a4d15ff42 100644 --- a/keyboards/ferris/keymaps/default/config.h +++ b/keyboards/ferris/keymaps/default/config.h @@ -35,7 +35,6 @@ along with this program. If not, see . // Pick good defaults for enabling homerow modifiers #define TAPPING_TERM 200 #define PERMISSIVE_HOLD -#define IGNORE_MOD_TAP_INTERRUPT #define QUICK_TAP_TERM 0 // Underglow configuration diff --git a/keyboards/ferris/keymaps/madhatter/config.h b/keyboards/ferris/keymaps/madhatter/config.h index 79496ae750..65a14e6622 100644 --- a/keyboards/ferris/keymaps/madhatter/config.h +++ b/keyboards/ferris/keymaps/madhatter/config.h @@ -19,4 +19,3 @@ along with this program. If not, see . // Pick good defaults for enabling homerow modifiers #define TAPPING_TERM 200 -#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/ferris/keymaps/pierrec83/config.h b/keyboards/ferris/keymaps/pierrec83/config.h index b10555bb0d..1a4d15ff42 100644 --- a/keyboards/ferris/keymaps/pierrec83/config.h +++ b/keyboards/ferris/keymaps/pierrec83/config.h @@ -35,7 +35,6 @@ along with this program. If not, see . // Pick good defaults for enabling homerow modifiers #define TAPPING_TERM 200 #define PERMISSIVE_HOLD -#define IGNORE_MOD_TAP_INTERRUPT #define QUICK_TAP_TERM 0 // Underglow configuration diff --git a/keyboards/ferris/keymaps/via/config.h b/keyboards/ferris/keymaps/via/config.h index 0d822891d1..4bdd1774a7 100644 --- a/keyboards/ferris/keymaps/via/config.h +++ b/keyboards/ferris/keymaps/via/config.h @@ -5,7 +5,6 @@ // Good defaults for home row modifiers #define TAPPING_TERM 230 -#define IGNORE_MOD_TAP_INTERRUPT // Handle master/slave detection on low cost Promicro #ifdef __AVR__ diff --git a/keyboards/foostan/cornelius/keymaps/hvp/config.h b/keyboards/foostan/cornelius/keymaps/hvp/config.h index ea23adfab5..a2a492ff27 100644 --- a/keyboards/foostan/cornelius/keymaps/hvp/config.h +++ b/keyboards/foostan/cornelius/keymaps/hvp/config.h @@ -17,4 +17,3 @@ #pragma once #define TAPPING_TERM 200 #define TAPPING_TERM_PER_KEY -#define IGNORE_MOD_TAP_INTERRUPT \ No newline at end of file diff --git a/keyboards/fungo/keymaps/default/config.h b/keyboards/fungo/keymaps/default/config.h deleted file mode 100644 index c6d778d109..0000000000 --- a/keyboards/fungo/keymaps/default/config.h +++ /dev/null @@ -1,24 +0,0 @@ -/* This is the c configuration file for the keymap - * Copyright 2022 bojiguard (@bojiguard) - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - - - - -#define IGNORE_MOD_TAP_INTERRUPT - diff --git a/keyboards/gboards/ergotaco/config.h b/keyboards/gboards/ergotaco/config.h index 3274a5ab92..ba0078e71b 100644 --- a/keyboards/gboards/ergotaco/config.h +++ b/keyboards/gboards/ergotaco/config.h @@ -35,7 +35,6 @@ along with this program. If not, see . #define TAPPING_TOGGLE 1 #define TAPPING_TERM 200 -#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.) /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/gboards/georgi/config.h b/keyboards/gboards/georgi/config.h index 858f99208f..3e090f9e57 100644 --- a/keyboards/gboards/georgi/config.h +++ b/keyboards/gboards/georgi/config.h @@ -27,7 +27,6 @@ along with this program. If not, see . #define FORCE_NKRO #define NO_ACTION_ONESHOT -#define IGNORE_MOD_TAP_INTERRUPT /* key matrix size */ #define MATRIX_ROWS 14 @@ -42,7 +41,6 @@ along with this program. If not, see . #define TAPPING_TOGGLE 2 #define TAPPING_TERM 200 -#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.) /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/gboards/georgi/keymaps/colemak-dh/keymap.c b/keyboards/gboards/georgi/keymaps/colemak-dh/keymap.c index bb6ed9dd3e..9b3365d02f 100644 --- a/keyboards/gboards/georgi/keymaps/colemak-dh/keymap.c +++ b/keyboards/gboards/georgi/keymaps/colemak-dh/keymap.c @@ -13,7 +13,6 @@ #include QMK_KEYBOARD_H #include "sten.h" #include "keymap_steno.h" -#define IGNORE_MOD_TAP_INTERRUPT // Steno Layers #define FUNCT ( LSD | LK | LP | LH ) diff --git a/keyboards/gboards/gergo/config.h b/keyboards/gboards/gergo/config.h index 2eda942c15..37d4fe8499 100644 --- a/keyboards/gboards/gergo/config.h +++ b/keyboards/gboards/gergo/config.h @@ -44,7 +44,6 @@ along with this program. If not, see . #define TAPPING_TOGGLE 1 #define TAPPING_TERM 200 -#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.) /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/gboards/gergo/keymaps/abstractkb/config.h b/keyboards/gboards/gergo/keymaps/abstractkb/config.h index bc7b9f7845..d3c17757c8 100644 --- a/keyboards/gboards/gergo/keymaps/abstractkb/config.h +++ b/keyboards/gboards/gergo/keymaps/abstractkb/config.h @@ -1,6 +1,4 @@ #pragma once -#define IGNORE_MOD_TAP_INTERRUPT - #undef DEBOUNCE #define DEBOUNCE 10 diff --git a/keyboards/gboards/gergo/keymaps/colemak/keymap.c b/keyboards/gboards/gergo/keymaps/colemak/keymap.c index b72e81f6d7..39bafc5e31 100644 --- a/keyboards/gboards/gergo/keymaps/colemak/keymap.c +++ b/keyboards/gboards/gergo/keymaps/colemak/keymap.c @@ -8,7 +8,6 @@ #include QMK_KEYBOARD_H -#define IGNORE_MOD_TAP_INTERRUPT #define BASE 0 // default layer #define SYMB 1 // symbols #define NUMB 2 // numbers/motion diff --git a/keyboards/gboards/gergo/keymaps/default/config.h b/keyboards/gboards/gergo/keymaps/default/config.h index 6393d46f14..3f59c932d3 100644 --- a/keyboards/gboards/gergo/keymaps/default/config.h +++ b/keyboards/gboards/gergo/keymaps/default/config.h @@ -1,3 +1,2 @@ #pragma once -#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/gboards/gergo/keymaps/germ/config.h b/keyboards/gboards/gergo/keymaps/germ/config.h index 6393d46f14..3f59c932d3 100644 --- a/keyboards/gboards/gergo/keymaps/germ/config.h +++ b/keyboards/gboards/gergo/keymaps/germ/config.h @@ -1,3 +1,2 @@ #pragma once -#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/gboards/gergo/keymaps/gotham/config.h b/keyboards/gboards/gergo/keymaps/gotham/config.h index 6393d46f14..3f59c932d3 100644 --- a/keyboards/gboards/gergo/keymaps/gotham/config.h +++ b/keyboards/gboards/gergo/keymaps/gotham/config.h @@ -1,3 +1,2 @@ #pragma once -#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/gboards/gergo/keymaps/oled/config.h b/keyboards/gboards/gergo/keymaps/oled/config.h index af960a1eed..327e03d56d 100644 --- a/keyboards/gboards/gergo/keymaps/oled/config.h +++ b/keyboards/gboards/gergo/keymaps/oled/config.h @@ -1,4 +1,3 @@ #pragma once -#define IGNORE_MOD_TAP_INTERRUPT #define OLED_FONT_H "keyboards/gboards/gergo/keymaps/oled/glcdfont.c" diff --git a/keyboards/gboards/gergoplex/config.h b/keyboards/gboards/gergoplex/config.h index d733cb3b7a..e6ef1def9e 100644 --- a/keyboards/gboards/gergoplex/config.h +++ b/keyboards/gboards/gergoplex/config.h @@ -34,6 +34,5 @@ along with this program. If not, see . */ #define MATRIX_COL_PINS { F6, F5, F4, F1 } #define MATRIX_ROW_PINS { B1, B2, B3, D2, D3 } -#define IGNORE_MOD_TAP_INTERRUPT #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || get_mods() == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT))) diff --git a/keyboards/handwired/angel/config.h b/keyboards/handwired/angel/config.h index b7e08c2b24..3439d8c8c1 100644 --- a/keyboards/handwired/angel/config.h +++ b/keyboards/handwired/angel/config.h @@ -19,7 +19,6 @@ along with this program. If not, see . // https://docs.qmk.fm/using-qmk/software-features/tap_hold #define TAPPING_TERM 200 -#define IGNORE_MOD_TAP_INTERRUPT /* define if matrix has ghost (lacks anti-ghosting diodes) */ #define MATRIX_HAS_GHOST diff --git a/keyboards/handwired/aranck/keymaps/turkishish/config.h b/keyboards/handwired/aranck/keymaps/turkishish/config.h index 69c1beb03c..53cf5bbc0f 100644 --- a/keyboards/handwired/aranck/keymaps/turkishish/config.h +++ b/keyboards/handwired/aranck/keymaps/turkishish/config.h @@ -20,5 +20,4 @@ #define RETRO_TAPPING #define PERMISSIVE_HOLD -#define IGNORE_MOD_TAP_INTERRUPT -#define QUICK_TAP_TERM 0 \ No newline at end of file +#define QUICK_TAP_TERM 0 diff --git a/keyboards/handwired/bolek/config.h b/keyboards/handwired/bolek/config.h index 02f5f29c3f..72c76ac580 100644 --- a/keyboards/handwired/bolek/config.h +++ b/keyboards/handwired/bolek/config.h @@ -39,4 +39,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT #define PERMISSIVE_HOLD -#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/handwired/brain/config.h b/keyboards/handwired/brain/config.h index 088f03a379..6ab3491141 100644 --- a/keyboards/handwired/brain/config.h +++ b/keyboards/handwired/brain/config.h @@ -69,5 +69,4 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define TAPPING_TERM 150 -//#define IGNORE_MOD_TAP_INTERRUPT //#define QUICK_TAP_TERM 0 diff --git a/keyboards/handwired/brain/keymaps/klackygears/config.h b/keyboards/handwired/brain/keymaps/klackygears/config.h index 5115f01801..b572858448 100644 --- a/keyboards/handwired/brain/keymaps/klackygears/config.h +++ b/keyboards/handwired/brain/keymaps/klackygears/config.h @@ -19,7 +19,6 @@ along with this program. If not, see . #define PERMISSIVE_HOLD #define TAPPING_TERM 150 -#define IGNORE_MOD_TAP_INTERRUPT #define RGBLIGHT_EFFECT_BREATHING #define RGBLIGHT_EFFECT_RAINBOW_MOOD diff --git a/keyboards/handwired/chiron/keymaps/default/config.h b/keyboards/handwired/chiron/keymaps/default/config.h index 06c5f586e4..c373743a39 100644 --- a/keyboards/handwired/chiron/keymaps/default/config.h +++ b/keyboards/handwired/chiron/keymaps/default/config.h @@ -19,7 +19,6 @@ #define MASTER_RIGHT //#define MASTER_LEFT -#define IGNORE_MOD_TAP_INTERRUPT #define PERMISSIVE_HOLD #define TAPPING_TERM 200 diff --git a/keyboards/handwired/dactyl/config.h b/keyboards/handwired/dactyl/config.h index 61f997b5b4..0b98f64a4f 100644 --- a/keyboards/handwired/dactyl/config.h +++ b/keyboards/handwired/dactyl/config.h @@ -40,7 +40,6 @@ along with this program. If not, see . #define TAPPING_TOGGLE 1 #define TAPPING_TERM 200 -#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.) /* key combination for command */ #define IS_COMMAND() ( \ diff --git a/keyboards/handwired/dactyl_manuform/3x5_3/keymaps/dlford/config.h b/keyboards/handwired/dactyl_manuform/3x5_3/keymaps/dlford/config.h index b8df581b72..783a2c46b1 100644 --- a/keyboards/handwired/dactyl_manuform/3x5_3/keymaps/dlford/config.h +++ b/keyboards/handwired/dactyl_manuform/3x5_3/keymaps/dlford/config.h @@ -25,7 +25,6 @@ along with this program. If not, see . #define TAPPING_TOGGLE 2 // number of taps to toggle TT #define TAPPING_TERM_PER_KEY // milliseconds from tap to hold for mod tap per key -#define IGNORE_MOD_TAP_INTERRUPT // ignore hold mod if another tap occurs within tapping term #define PERMISSIVE_HOLD_PER_KEY // activate mod top hold earlier if another key is pressed AND released per key #define QUICK_TAP_TERM_PER_KEY // disable double tap hold key repeat per key #undef MOUSEKEY_INTERVAL diff --git a/keyboards/handwired/dactyl_manuform/5x6/keymaps/rishka/config.h b/keyboards/handwired/dactyl_manuform/5x6/keymaps/rishka/config.h index fb01f969d3..7eaeceb44a 100644 --- a/keyboards/handwired/dactyl_manuform/5x6/keymaps/rishka/config.h +++ b/keyboards/handwired/dactyl_manuform/5x6/keymaps/rishka/config.h @@ -27,7 +27,6 @@ along with this program. If not, see . #define TAPPING_TOGGLE 3 #define ONESHOT_TAP_TOGGLE 3 #define PERMISSIVE_HOLD -#define IGNORE_MOD_TAP_INTERRUPT #define TAPPING_TERM 300 #ifdef RGBLED_NUM # undef RGBLED_NUM diff --git a/keyboards/handwired/dactyl_manuform/5x6_68/keymaps/default/config.h b/keyboards/handwired/dactyl_manuform/5x6_68/keymaps/default/config.h index 44fe0587fc..0b5e296dc8 100644 --- a/keyboards/handwired/dactyl_manuform/5x6_68/keymaps/default/config.h +++ b/keyboards/handwired/dactyl_manuform/5x6_68/keymaps/default/config.h @@ -5,5 +5,4 @@ #define SPLIT_USB_DETECT -#define IGNORE_MOD_TAP_INTERRUPT #define TAPPING_TERM 250 diff --git a/keyboards/handwired/frenchdev/config.h b/keyboards/handwired/frenchdev/config.h index b9ebeee96b..fc5d819060 100644 --- a/keyboards/handwired/frenchdev/config.h +++ b/keyboards/handwired/frenchdev/config.h @@ -36,7 +36,6 @@ along with this program. If not, see . #define TAPPING_TOGGLE 1 #define TAPPING_TERM 200 -#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.) /* key combination for command */ #define IS_COMMAND() ( \ diff --git a/keyboards/handwired/heisenberg/keymaps/turkishish/config.h b/keyboards/handwired/heisenberg/keymaps/turkishish/config.h index 69c1beb03c..53cf5bbc0f 100644 --- a/keyboards/handwired/heisenberg/keymaps/turkishish/config.h +++ b/keyboards/handwired/heisenberg/keymaps/turkishish/config.h @@ -20,5 +20,4 @@ #define RETRO_TAPPING #define PERMISSIVE_HOLD -#define IGNORE_MOD_TAP_INTERRUPT -#define QUICK_TAP_TERM 0 \ No newline at end of file +#define QUICK_TAP_TERM 0 diff --git a/keyboards/handwired/jscotto/scotto36/keymaps/default/config.h b/keyboards/handwired/jscotto/scotto36/keymaps/default/config.h index 8723c294cb..1a6512052c 100644 --- a/keyboards/handwired/jscotto/scotto36/keymaps/default/config.h +++ b/keyboards/handwired/jscotto/scotto36/keymaps/default/config.h @@ -18,7 +18,6 @@ along with this program. If not, see . #pragma once // Define options -#define IGNORE_MOD_TAP_INTERRUPT #define TAPPING_TERM 135 #define PERMISSIVE_HOLD #define TAPPING_TERM_PER_KEY diff --git a/keyboards/handwired/jscotto/scotto40/keymaps/default/config.h b/keyboards/handwired/jscotto/scotto40/keymaps/default/config.h index 8723c294cb..1a6512052c 100644 --- a/keyboards/handwired/jscotto/scotto40/keymaps/default/config.h +++ b/keyboards/handwired/jscotto/scotto40/keymaps/default/config.h @@ -18,7 +18,6 @@ along with this program. If not, see . #pragma once // Define options -#define IGNORE_MOD_TAP_INTERRUPT #define TAPPING_TERM 135 #define PERMISSIVE_HOLD #define TAPPING_TERM_PER_KEY diff --git a/keyboards/handwired/jscotto/scottocmd/keymaps/default/config.h b/keyboards/handwired/jscotto/scottocmd/keymaps/default/config.h index 8723c294cb..1a6512052c 100644 --- a/keyboards/handwired/jscotto/scottocmd/keymaps/default/config.h +++ b/keyboards/handwired/jscotto/scottocmd/keymaps/default/config.h @@ -18,7 +18,6 @@ along with this program. If not, see . #pragma once // Define options -#define IGNORE_MOD_TAP_INTERRUPT #define TAPPING_TERM 135 #define PERMISSIVE_HOLD #define TAPPING_TERM_PER_KEY diff --git a/keyboards/handwired/jscotto/scottostarter/keymaps/default/config.h b/keyboards/handwired/jscotto/scottostarter/keymaps/default/config.h index 8723c294cb..1a6512052c 100644 --- a/keyboards/handwired/jscotto/scottostarter/keymaps/default/config.h +++ b/keyboards/handwired/jscotto/scottostarter/keymaps/default/config.h @@ -18,7 +18,6 @@ along with this program. If not, see . #pragma once // Define options -#define IGNORE_MOD_TAP_INTERRUPT #define TAPPING_TERM 135 #define PERMISSIVE_HOLD #define TAPPING_TERM_PER_KEY diff --git a/keyboards/handwired/lagrange/keymaps/dpapavas/config.h b/keyboards/handwired/lagrange/keymaps/dpapavas/config.h index 049ba598a9..0114d6c7f9 100644 --- a/keyboards/handwired/lagrange/keymaps/dpapavas/config.h +++ b/keyboards/handwired/lagrange/keymaps/dpapavas/config.h @@ -20,4 +20,3 @@ #define TAPPING_TERM 175 #define TAPPING_TERM_PER_KEY #define PERMISSIVE_HOLD_PER_KEY -#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/handwired/pterodactyl/config.h b/keyboards/handwired/pterodactyl/config.h index 6ca97d3e73..40aee1e05e 100644 --- a/keyboards/handwired/pterodactyl/config.h +++ b/keyboards/handwired/pterodactyl/config.h @@ -39,8 +39,6 @@ along with this program. If not, see . #define TAPPING_TOGGLE 1 -#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.) - /* key combination for command */ #define IS_COMMAND() ( \ get_mods() == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \ diff --git a/keyboards/handwired/stef9998/split_5x7/keymaps/stef9998/config.h b/keyboards/handwired/stef9998/split_5x7/keymaps/stef9998/config.h index d8a98f8d40..22d68ab390 100644 --- a/keyboards/handwired/stef9998/split_5x7/keymaps/stef9998/config.h +++ b/keyboards/handwired/stef9998/split_5x7/keymaps/stef9998/config.h @@ -28,5 +28,3 @@ along with this program. If not, see . #define RCPC_KEYS KC_RCTL,KC_TRNS,KC_RBRC #define TAPPING_TERM_PER_KEY -#define IGNORE_MOD_TAP_INTERRUPT -#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY diff --git a/keyboards/handwired/xealous/rev1/config.h b/keyboards/handwired/xealous/rev1/config.h index 9910669457..49be10cce4 100644 --- a/keyboards/handwired/xealous/rev1/config.h +++ b/keyboards/handwired/xealous/rev1/config.h @@ -33,5 +33,3 @@ along with this program. If not, see . //#define NO_ACTION_LAYER //#define NO_ACTION_TAPPING #define NO_ACTION_ONESHOT - -#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/helix/rev2/keymaps/edvorakjp/config.h b/keyboards/helix/rev2/keymaps/edvorakjp/config.h index 6854249be0..0dff4b59ca 100644 --- a/keyboards/helix/rev2/keymaps/edvorakjp/config.h +++ b/keyboards/helix/rev2/keymaps/edvorakjp/config.h @@ -5,7 +5,6 @@ #undef QUICK_TAP_TERM #undef TAPPING_TERM #define TAPPING_TERM 300 -#define IGNORE_MOD_TAP_INTERRUPT // If you need more program area, try select and reduce rgblight modes to use. diff --git a/keyboards/hhkb/ansi/keymaps/blakedietz/config.h b/keyboards/hhkb/ansi/keymaps/blakedietz/config.h index e0d2bce0f1..8d281f2604 100644 --- a/keyboards/hhkb/ansi/keymaps/blakedietz/config.h +++ b/keyboards/hhkb/ansi/keymaps/blakedietz/config.h @@ -17,8 +17,4 @@ //#define TAPPING_TOGGLE 1 // TAPPING_TERM is set in config.h this defaults to 200 -// This makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when -// you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.) -#define IGNORE_MOD_TAP_INTERRUPT - #endif diff --git a/keyboards/hhkb/ansi/keymaps/brett/config.h b/keyboards/hhkb/ansi/keymaps/brett/config.h index 8f769d603f..0711122d74 100644 --- a/keyboards/hhkb/ansi/keymaps/brett/config.h +++ b/keyboards/hhkb/ansi/keymaps/brett/config.h @@ -12,6 +12,3 @@ #define LSPO_MOD KC_LSFT #define RSPC_MOD KC_RSFT -// This makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when -// you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.) -#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/hidtech/bastyl/keymaps/xyverz/config.h b/keyboards/hidtech/bastyl/keymaps/xyverz/config.h index 335f968e2a..4fa185e956 100644 --- a/keyboards/hidtech/bastyl/keymaps/xyverz/config.h +++ b/keyboards/hidtech/bastyl/keymaps/xyverz/config.h @@ -28,6 +28,5 @@ along with this program. If not, see . #define QUICK_TAP_TERM 0 #define TAPPING_TERM 300 #define PERMISSIVE_HOLD -#define IGNORE_MOD_TAP_INTERRUPT #define LEADER_PER_KEY_TIMING #define LEADER_TIMEOUT 300 \ No newline at end of file diff --git a/keyboards/hotdox/config.h b/keyboards/hotdox/config.h index ee7b25cf6f..56eda36984 100644 --- a/keyboards/hotdox/config.h +++ b/keyboards/hotdox/config.h @@ -14,7 +14,6 @@ #define TAPPING_TOGGLE 1 #define TAPPING_TERM 200 -#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.) /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/ibnuda/alicia_cook/keymaps/rick/config.h b/keyboards/ibnuda/alicia_cook/keymaps/rick/config.h index fc9cdfe786..ccfd50638b 100644 --- a/keyboards/ibnuda/alicia_cook/keymaps/rick/config.h +++ b/keyboards/ibnuda/alicia_cook/keymaps/rick/config.h @@ -17,7 +17,6 @@ #define COMBO_TERM 50 #define COMBO_COUNT 50 -#define IGNORE_MOD_TAP_INTERRUPT #define PERMISSIVE_HOLD #define TAPPING_TERM 175 #define TAPPING_TERM 175 diff --git a/keyboards/ibnuda/squiggle/keymaps/default/config.h b/keyboards/ibnuda/squiggle/keymaps/default/config.h index 88c4203d8b..6411ba8c66 100644 --- a/keyboards/ibnuda/squiggle/keymaps/default/config.h +++ b/keyboards/ibnuda/squiggle/keymaps/default/config.h @@ -2,5 +2,4 @@ #define COMBO_TERM 100 #define COMBO_COUNT 38 -#define IGNORE_MOD_TAP_INTERRUPT #define PERMISSIVE_HOLD diff --git a/keyboards/ibnuda/squiggle/keymaps/default38/config.h b/keyboards/ibnuda/squiggle/keymaps/default38/config.h index 9b7c369dda..fa95320e90 100644 --- a/keyboards/ibnuda/squiggle/keymaps/default38/config.h +++ b/keyboards/ibnuda/squiggle/keymaps/default38/config.h @@ -21,5 +21,4 @@ along with this program. If not, see . #define COMBO_TERM 100 #define COMBO_COUNT 38 -#define IGNORE_MOD_TAP_INTERRUPT #define PERMISSIVE_HOLD diff --git a/keyboards/ibnuda/squiggle/keymaps/defaultfull/config.h b/keyboards/ibnuda/squiggle/keymaps/defaultfull/config.h index 1c8cff4bb6..65eec1d7f8 100644 --- a/keyboards/ibnuda/squiggle/keymaps/defaultfull/config.h +++ b/keyboards/ibnuda/squiggle/keymaps/defaultfull/config.h @@ -18,5 +18,4 @@ #define COMBO_TERM 100 #define COMBO_COUNT 38 -#define IGNORE_MOD_TAP_INTERRUPT #define PERMISSIVE_HOLD diff --git a/keyboards/ibnuda/squiggle/keymaps/defaultminidox/config.h b/keyboards/ibnuda/squiggle/keymaps/defaultminidox/config.h index 88c4203d8b..6411ba8c66 100644 --- a/keyboards/ibnuda/squiggle/keymaps/defaultminidox/config.h +++ b/keyboards/ibnuda/squiggle/keymaps/defaultminidox/config.h @@ -2,5 +2,4 @@ #define COMBO_TERM 100 #define COMBO_COUNT 38 -#define IGNORE_MOD_TAP_INTERRUPT #define PERMISSIVE_HOLD diff --git a/keyboards/ibnuda/squiggle/keymaps/rick-complicated/config.h b/keyboards/ibnuda/squiggle/keymaps/rick-complicated/config.h index 5b97451890..9920602ab8 100644 --- a/keyboards/ibnuda/squiggle/keymaps/rick-complicated/config.h +++ b/keyboards/ibnuda/squiggle/keymaps/rick-complicated/config.h @@ -2,7 +2,6 @@ #define COMBO_TERM 100 #define COMBO_COUNT 38 -#define IGNORE_MOD_TAP_INTERRUPT #define PERMISSIVE_HOLD #define LEADER_TIMEOUT 300 diff --git a/keyboards/ibnuda/squiggle/keymaps/rick/config.h b/keyboards/ibnuda/squiggle/keymaps/rick/config.h index 88c4203d8b..6411ba8c66 100644 --- a/keyboards/ibnuda/squiggle/keymaps/rick/config.h +++ b/keyboards/ibnuda/squiggle/keymaps/rick/config.h @@ -2,5 +2,4 @@ #define COMBO_TERM 100 #define COMBO_COUNT 38 -#define IGNORE_MOD_TAP_INTERRUPT #define PERMISSIVE_HOLD diff --git a/keyboards/idobao/id75/keymaps/egstad/config.h b/keyboards/idobao/id75/keymaps/egstad/config.h index c0227431fb..7e1868813f 100644 --- a/keyboards/idobao/id75/keymaps/egstad/config.h +++ b/keyboards/idobao/id75/keymaps/egstad/config.h @@ -16,7 +16,6 @@ #pragma once #define TAPPING_TERM 200 -#define IGNORE_MOD_TAP_INTERRUPT #define RGBLIGHT_SLEEP diff --git a/keyboards/idobao/id75/keymaps/gkbd_75/config.h b/keyboards/idobao/id75/keymaps/gkbd_75/config.h index 7813d776e5..d969bd88a2 100644 --- a/keyboards/idobao/id75/keymaps/gkbd_75/config.h +++ b/keyboards/idobao/id75/keymaps/gkbd_75/config.h @@ -17,5 +17,4 @@ #pragma once #define TAPPING_TERM 200 -#define IGNORE_MOD_TAP_INTERRUPT #define PERMISSIVE_HOLD diff --git a/keyboards/idobao/id75/keymaps/gkbd_orthon/config.h b/keyboards/idobao/id75/keymaps/gkbd_orthon/config.h index e8fc39faad..3e8dcc7570 100644 --- a/keyboards/idobao/id75/keymaps/gkbd_orthon/config.h +++ b/keyboards/idobao/id75/keymaps/gkbd_orthon/config.h @@ -17,4 +17,3 @@ #pragma once #define TAPPING_TERM 200 -#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/input_club/ergodox_infinity/config.h b/keyboards/input_club/ergodox_infinity/config.h index 6ebc0f4083..6d642e5d45 100644 --- a/keyboards/input_club/ergodox_infinity/config.h +++ b/keyboards/input_club/ergodox_infinity/config.h @@ -26,7 +26,6 @@ along with this program. If not, see . #define TAPPING_TOGGLE 1 #define TAPPING_TERM 200 -#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.) /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/input_club/ergodox_infinity/keymaps/narze/config.h b/keyboards/input_club/ergodox_infinity/keymaps/narze/config.h index d5ed0a8e9e..3fef45f887 100644 --- a/keyboards/input_club/ergodox_infinity/keymaps/narze/config.h +++ b/keyboards/input_club/ergodox_infinity/keymaps/narze/config.h @@ -6,7 +6,6 @@ #define COMBO_TERM 20 #define COMBO_COUNT 1 -#define IGNORE_MOD_TAP_INTERRUPT #define PERMISSIVE_HOLD #undef MOUSEKEY_DELAY diff --git a/keyboards/jian/keymaps/advanced/config.h b/keyboards/jian/keymaps/advanced/config.h index 85b41c86d8..1a033d8311 100644 --- a/keyboards/jian/keymaps/advanced/config.h +++ b/keyboards/jian/keymaps/advanced/config.h @@ -22,6 +22,5 @@ along with this program. If not, see . //#define AUTO_SHIFT_TIMEOUT 150 //#define NO_AUTO_SHIFT_NUMERIC //#define AUTO_SHIFT_MODIFIERS -#define IGNORE_MOD_TAP_INTERRUPT #define ALT_LAYOUTS_ENABLE //#define TRAINING_HALFES_LOCK diff --git a/keyboards/jian/keymaps/default/config.h b/keyboards/jian/keymaps/default/config.h index 4d9cb17cac..314836a54d 100644 --- a/keyboards/jian/keymaps/default/config.h +++ b/keyboards/jian/keymaps/default/config.h @@ -18,5 +18,3 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ #pragma once - -#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/jian/keymaps/left_hand/config.h b/keyboards/jian/keymaps/left_hand/config.h index 4d9cb17cac..cae66a5c3a 100644 --- a/keyboards/jian/keymaps/left_hand/config.h +++ b/keyboards/jian/keymaps/left_hand/config.h @@ -19,4 +19,3 @@ along with this program. If not, see . */ #pragma once -#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/jian/keymaps/via/config.h b/keyboards/jian/keymaps/via/config.h index 4d9cb17cac..cae66a5c3a 100644 --- a/keyboards/jian/keymaps/via/config.h +++ b/keyboards/jian/keymaps/via/config.h @@ -19,4 +19,3 @@ along with this program. If not, see . */ #pragma once -#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/k34/keymaps/default/config.h b/keyboards/k34/keymaps/default/config.h index 803471e550..c86bbebdc7 100644 --- a/keyboards/k34/keymaps/default/config.h +++ b/keyboards/k34/keymaps/default/config.h @@ -20,5 +20,4 @@ // mod taps for home row mods #define TAPPING_TERM_PER_KEY -#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/karn/keymaps/colemak/config.h b/keyboards/karn/keymaps/colemak/config.h index 71eb08ed1e..22d190164b 100644 --- a/keyboards/karn/keymaps/colemak/config.h +++ b/keyboards/karn/keymaps/colemak/config.h @@ -3,11 +3,6 @@ #pragma once -// Equivalent to zmk behavior-hold-tap tap-preferred flavor -// Do not force the mod-tap key press to be handled as a modifier -// if any other key was pressed while the mod-tap key is held down. -#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY - // Equivalent to zmk behavior-hold-tap hold-preferred flavor #define HOLD_ON_OTHER_KEY_PRESS_PER_KEY diff --git a/keyboards/keebio/bfo9000/keymaps/insertsnideremarks/config.h b/keyboards/keebio/bfo9000/keymaps/insertsnideremarks/config.h index 8290ffd799..9538405eb2 100644 --- a/keyboards/keebio/bfo9000/keymaps/insertsnideremarks/config.h +++ b/keyboards/keebio/bfo9000/keymaps/insertsnideremarks/config.h @@ -27,7 +27,6 @@ along with this program. If not, see . // #define MASTER_RIGHT #define EE_HANDS -#define IGNORE_MOD_TAP_INTERRUPT #define TAPPING_TERM 150 #define TAPPING_TOGGLE 2 diff --git a/keyboards/keebio/bfo9000/keymaps/tuesdayjohn/config.h b/keyboards/keebio/bfo9000/keymaps/tuesdayjohn/config.h index 8290ffd799..9538405eb2 100644 --- a/keyboards/keebio/bfo9000/keymaps/tuesdayjohn/config.h +++ b/keyboards/keebio/bfo9000/keymaps/tuesdayjohn/config.h @@ -27,7 +27,6 @@ along with this program. If not, see . // #define MASTER_RIGHT #define EE_HANDS -#define IGNORE_MOD_TAP_INTERRUPT #define TAPPING_TERM 150 #define TAPPING_TOGGLE 2 diff --git a/keyboards/keebio/iris/keymaps/edvorakjp/config.h b/keyboards/keebio/iris/keymaps/edvorakjp/config.h index 864cedae98..d5caa23369 100644 --- a/keyboards/keebio/iris/keymaps/edvorakjp/config.h +++ b/keyboards/keebio/iris/keymaps/edvorakjp/config.h @@ -8,7 +8,6 @@ #define SWAP_SCLN #define TAPPING_TERM 300 -#define IGNORE_MOD_TAP_INTERRUPT #undef RGBLED_NUM #define RGBLIGHT_EFFECT_STATIC_GRADIENT diff --git a/keyboards/keebio/iris/keymaps/emp/config.h b/keyboards/keebio/iris/keymaps/emp/config.h index 9f1982935a..0aa25a88bc 100644 --- a/keyboards/keebio/iris/keymaps/emp/config.h +++ b/keyboards/keebio/iris/keymaps/emp/config.h @@ -50,12 +50,6 @@ along with this program. If not, see . */ #undef PERMISSIVE_HOLD -/* IGNORE_MOD_TAP_INTERRUPT - * when on: rolling tap-hold keys taps all keys - * when off: rolling tap-hold keys modifies keys -*/ -#undef IGNORE_MOD_TAP_INTERRUPT - /* TAPPING_TERM x (ms) * how long before a tap becomes a hold. if set above 500, a key tapped during * the tapping term will turn it into a hold too diff --git a/keyboards/keebio/iris/keymaps/fluffactually/config.h b/keyboards/keebio/iris/keymaps/fluffactually/config.h index fd3ebfd94b..44c4fbd1e5 100644 --- a/keyboards/keebio/iris/keymaps/fluffactually/config.h +++ b/keyboards/keebio/iris/keymaps/fluffactually/config.h @@ -19,6 +19,5 @@ along with this program. If not, see . // #define USE_I2C #define EE_HANDS -#define IGNORE_MOD_TAP_INTERRUPT #define TAPPING_TERM 175 diff --git a/keyboards/keebio/iris/keymaps/khitsule/config.h b/keyboards/keebio/iris/keymaps/khitsule/config.h index 62760cce35..22b4d6eac7 100644 --- a/keyboards/keebio/iris/keymaps/khitsule/config.h +++ b/keyboards/keebio/iris/keymaps/khitsule/config.h @@ -19,6 +19,5 @@ along with this program. If not, see . // #define USE_I2C #define EE_HANDS -#define IGNORE_MOD_TAP_INTERRUPT #undef RGBLED_NUM diff --git a/keyboards/keebio/iris/keymaps/radlinskii/config.h b/keyboards/keebio/iris/keymaps/radlinskii/config.h index 359dda7b61..c2ea15af87 100644 --- a/keyboards/keebio/iris/keymaps/radlinskii/config.h +++ b/keyboards/keebio/iris/keymaps/radlinskii/config.h @@ -8,7 +8,6 @@ #define TAPPING_TOGGLE 1 // tap just once for TT() to toggle the layer #define TAPPING_TERM 200 -#define IGNORE_MOD_TAP_INTERRUPT #define RGBLIGHT_LAYERS diff --git a/keyboards/keebio/iris/keymaps/sq5rix/config.h b/keyboards/keebio/iris/keymaps/sq5rix/config.h index 8c576917e8..59004bfa8a 100644 --- a/keyboards/keebio/iris/keymaps/sq5rix/config.h +++ b/keyboards/keebio/iris/keymaps/sq5rix/config.h @@ -18,7 +18,6 @@ along with this program. If not, see . #pragma once #define EE_HANDS #define TAPPING_TERM 164 -#define IGNORE_MOD_TAP_INTERRUPT #define PERMISSIVE_HOLD #define RGBLIGHT_LAYERS #define ENCODER_RESOLUTION 4 diff --git a/keyboards/keebio/iris/keymaps/two_knob/config.h b/keyboards/keebio/iris/keymaps/two_knob/config.h index 37ffb20a2f..83b0fcfc44 100644 --- a/keyboards/keebio/iris/keymaps/two_knob/config.h +++ b/keyboards/keebio/iris/keymaps/two_knob/config.h @@ -13,9 +13,6 @@ /* If you're setting colors per key, this is required. */ #define SPLIT_LAYER_STATE_ENABLE -/* If you type too fast, it confuses the Mod key combos. This resolves it: */ -#define IGNORE_MOD_TAP_INTERRUPT - /* Set tapdance speed */ #define TAPPING_TERM 210 diff --git a/keyboards/keebio/quefrency/keymaps/bfiedler/config.h b/keyboards/keebio/quefrency/keymaps/bfiedler/config.h index 8a35b6f197..1751a65b2e 100644 --- a/keyboards/keebio/quefrency/keymaps/bfiedler/config.h +++ b/keyboards/keebio/quefrency/keymaps/bfiedler/config.h @@ -25,4 +25,3 @@ along with this program. If not, see . // https://docs.qmk.fm/#/tap_hold?id=tap-hold-configuration-options #define TAPPING_TERM 120 //#define PERMISSIVE_HOLD -#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/keebio/quefrency/keymaps/bjohnson/config.h b/keyboards/keebio/quefrency/keymaps/bjohnson/config.h index 82ace2ef68..3e2c097853 100644 --- a/keyboards/keebio/quefrency/keymaps/bjohnson/config.h +++ b/keyboards/keebio/quefrency/keymaps/bjohnson/config.h @@ -23,7 +23,6 @@ along with this program. If not, see . #define TAPPING_TERM 500 -#define IGNORE_MOD_TAP_INTERRUPT #define PERMISSIVE_HOLD #define FORCE_NKRO #define RETRO_TAPPING diff --git a/keyboards/keebio/rorschach/keymaps/insertsnideremarks/config.h b/keyboards/keebio/rorschach/keymaps/insertsnideremarks/config.h index 0ac1cc4a6e..c02549e477 100644 --- a/keyboards/keebio/rorschach/keymaps/insertsnideremarks/config.h +++ b/keyboards/keebio/rorschach/keymaps/insertsnideremarks/config.h @@ -8,7 +8,6 @@ // #define MASTER_RIGHT #define EE_HANDS -#define IGNORE_MOD_TAP_INTERRUPT #define TAPPING_TERM 150 #define TAPPING_TOGGLE 2 diff --git a/keyboards/keebio/rorschach/keymaps/tuesdayjohn/config.h b/keyboards/keebio/rorschach/keymaps/tuesdayjohn/config.h index 3bb69ef31c..9d65e8da70 100644 --- a/keyboards/keebio/rorschach/keymaps/tuesdayjohn/config.h +++ b/keyboards/keebio/rorschach/keymaps/tuesdayjohn/config.h @@ -8,7 +8,6 @@ // #define MASTER_RIGHT #define EE_HANDS -#define IGNORE_MOD_TAP_INTERRUPT #define TAPPING_TERM 175 #define TAPPING_TOGGLE 2 diff --git a/keyboards/keyboardio/atreus/keymaps/kkokdae/config.h b/keyboards/keyboardio/atreus/keymaps/kkokdae/config.h index f66f840bfd..c34fa270b4 100644 --- a/keyboards/keyboardio/atreus/keymaps/kkokdae/config.h +++ b/keyboards/keyboardio/atreus/keymaps/kkokdae/config.h @@ -16,7 +16,6 @@ #pragma once //#define PERMISSIVE_HOLD -#define IGNORE_MOD_TAP_INTERRUPT #define TAPPING_TERM 200 #define ONESHOT_TAP_TOGGLE 5 #define ONESHOT_TIMEOUT 5000 diff --git a/keyboards/keyhive/ut472/keymaps/hvp/config.h b/keyboards/keyhive/ut472/keymaps/hvp/config.h index ea23adfab5..a2a492ff27 100644 --- a/keyboards/keyhive/ut472/keymaps/hvp/config.h +++ b/keyboards/keyhive/ut472/keymaps/hvp/config.h @@ -17,4 +17,3 @@ #pragma once #define TAPPING_TERM 200 #define TAPPING_TERM_PER_KEY -#define IGNORE_MOD_TAP_INTERRUPT \ No newline at end of file diff --git a/keyboards/kinesis/keymaps/insertsnideremarks/config.h b/keyboards/kinesis/keymaps/insertsnideremarks/config.h index 053a291b7c..7749c523f3 100644 --- a/keyboards/kinesis/keymaps/insertsnideremarks/config.h +++ b/keyboards/kinesis/keymaps/insertsnideremarks/config.h @@ -5,7 +5,6 @@ #include "../../config.h" // place overrides here -#define IGNORE_MOD_TAP_INTERRUPT #define TAPPING_TERM 150 #define TAPPING_TOGGLE 2 diff --git a/keyboards/kinesis/keymaps/tuesdayjohn/config.h b/keyboards/kinesis/keymaps/tuesdayjohn/config.h index ebed17fede..b0816d6ae5 100644 --- a/keyboards/kinesis/keymaps/tuesdayjohn/config.h +++ b/keyboards/kinesis/keymaps/tuesdayjohn/config.h @@ -1,6 +1,5 @@ #pragma once // place overrides here -#define IGNORE_MOD_TAP_INTERRUPT #define TAPPING_TERM 175 #define TAPPING_TOGGLE 2 diff --git a/keyboards/kinesis/kint2pp/config.h b/keyboards/kinesis/kint2pp/config.h index aa87459cd4..b81985f1ef 100644 --- a/keyboards/kinesis/kint2pp/config.h +++ b/keyboards/kinesis/kint2pp/config.h @@ -1,7 +1,5 @@ #pragma once -#define IGNORE_MOD_TAP_INTERRUPT - // The Teensy 2++ consumes about 60 mA of current at its full speed of 16 MHz as // per https://www.pjrc.com/teensy/low_power.html #define USB_MAX_POWER_CONSUMPTION 100 diff --git a/keyboards/kinesis/kint36/config.h b/keyboards/kinesis/kint36/config.h index b9bb73219c..8b291df88e 100644 --- a/keyboards/kinesis/kint36/config.h +++ b/keyboards/kinesis/kint36/config.h @@ -16,8 +16,6 @@ #pragma once -#define IGNORE_MOD_TAP_INTERRUPT - // The Teensy 3.6 consumes about 80 mA of current at its full speed of 180 MHz: // https://forum.pjrc.com/threads/47256-What-is-the-power-consumption-of-the-Teensy-3-6 #define USB_MAX_POWER_CONSUMPTION 100 diff --git a/keyboards/kinesis/kint41/config.h b/keyboards/kinesis/kint41/config.h index 152a7d9c9b..74d1a8a78f 100644 --- a/keyboards/kinesis/kint41/config.h +++ b/keyboards/kinesis/kint41/config.h @@ -16,8 +16,6 @@ #pragma once -#define IGNORE_MOD_TAP_INTERRUPT - // The Teensy 4.1 consumes about 100 mA of current at its full speed of 600 MHz // as per https://www.pjrc.com/store/teensy41.html #define USB_MAX_POWER_CONSUMPTION 100 diff --git a/keyboards/kinesis/kintlc/config.h b/keyboards/kinesis/kintlc/config.h index c1699c2d6d..a5610a4c8c 100644 --- a/keyboards/kinesis/kintlc/config.h +++ b/keyboards/kinesis/kintlc/config.h @@ -16,8 +16,6 @@ #pragma once -#define IGNORE_MOD_TAP_INTERRUPT - // The Teensy LC power consumption is unknown as per // https://www.pjrc.com/store/teensylc.html but since // https://www.pjrc.com/store/teensy41.html says 100mA, let's go with half. diff --git a/keyboards/kinesis/stapelberg/config.h b/keyboards/kinesis/stapelberg/config.h index 3489b5104b..a3ae6615ac 100644 --- a/keyboards/kinesis/stapelberg/config.h +++ b/keyboards/kinesis/stapelberg/config.h @@ -6,5 +6,3 @@ #define MOUSEKEY_MAX_SPEED 3 #define MOUSEKEY_TIME_TO_MAX 10 */ - -#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/34keys/config.h b/keyboards/kprepublic/bm40hsrgb/keymaps/34keys/config.h index a6a97d5b76..3a48491679 100644 --- a/keyboards/kprepublic/bm40hsrgb/keymaps/34keys/config.h +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/34keys/config.h @@ -8,9 +8,6 @@ #define TAPPING_TERM 200 // time of holding key, milliseconds -// Prevent normal rollover on alphas from accidentally triggering mods. -#define IGNORE_MOD_TAP_INTERRUPT - // Enable rapid switch from tap to hold, disables double tap hold auto-repeat. #define QUICK_TAP_TERM 0 diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/gabustoledo/config.h b/keyboards/kprepublic/bm40hsrgb/keymaps/gabustoledo/config.h index 9d566d388d..a669c31c24 100644 --- a/keyboards/kprepublic/bm40hsrgb/keymaps/gabustoledo/config.h +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/gabustoledo/config.h @@ -19,9 +19,6 @@ #undef TAPPING_TERM #define TAPPING_TERM 200 -// Prevent normal rollover on alphas from accidentally triggering mods. -#define IGNORE_MOD_TAP_INTERRUPT - // Enable rapid switch from tap to hold, disables double tap hold auto-repeat. #define QUICK_TAP_TERM 0 diff --git a/keyboards/kprepublic/bm68hsrgb/rev1/keymaps/peepeetee/config.h b/keyboards/kprepublic/bm68hsrgb/rev1/keymaps/peepeetee/config.h index c1f1a06a33..ceb40da092 100644 --- a/keyboards/kprepublic/bm68hsrgb/rev1/keymaps/peepeetee/config.h +++ b/keyboards/kprepublic/bm68hsrgb/rev1/keymaps/peepeetee/config.h @@ -43,7 +43,6 @@ // #define RETRO_TAPPING // Tap anyway, even after TAPPING_TERM, if there was no other key interruption between press and release // #define TAPPING_TOGGLE 2 // How many taps before triggering the toggle // #define PERMISSIVE_HOLD // Makes tap and hold keys trigger the hold if another key is pressed before releasing, even if it hasn't hit the TAPPING_TERM. See Permissive Hold for details -// #define IGNORE_MOD_TAP_INTERRUPT // Makes it possible to do rolling combos (zx) with keys that convert to other keys on hold, by enforcing the TAPPING_TERM for both keys. See Mod tap interrupt for details // #define QUICK_TAP_TERM 0 // Makes it possible to use a dual role key as modifier shortly after having been tapped. See Hold after tap. Breaks any Tap Toggle functionality (TT or the One Shot Tap Toggle) // #define LEADER_TIMEOUT 300 // How long before the leader key times out. If you're having issues finishing the sequence before it times out, you may need to increase the timeout setting. Or you may want to enable the LEADER_PER_KEY_TIMING option, which resets the timeout after each key is tapped. // #define LEADER_PER_KEY_TIMING // Sets the timer for leader key chords to run on each key press rather than overall diff --git a/keyboards/kprepublic/bm80hsrgb/keymaps/peepeetee/config.h b/keyboards/kprepublic/bm80hsrgb/keymaps/peepeetee/config.h index be172a8cf6..eaff1148d0 100644 --- a/keyboards/kprepublic/bm80hsrgb/keymaps/peepeetee/config.h +++ b/keyboards/kprepublic/bm80hsrgb/keymaps/peepeetee/config.h @@ -28,7 +28,6 @@ // #define RETRO_TAPPING // Tap anyway, even after TAPPING_TERM, if there was no other key interruption between press and release // #define TAPPING_TOGGLE 2 // How many taps before triggering the toggle // #define PERMISSIVE_HOLD // Makes tap and hold keys trigger the hold if another key is pressed before releasing, even if it hasn't hit the TAPPING_TERM. See Permissive Hold for details -// #define IGNORE_MOD_TAP_INTERRUPT // Makes it possible to do rolling combos (zx) with keys that convert to other keys on hold, by enforcing the TAPPING_TERM for both keys. See Mod tap interrupt for details // #define QUICK_TAP_TERM 0 // Makes it possible to use a dual role key as modifier shortly after having been tapped. See Hold after tap. Breaks any Tap Toggle functionality (TT or the One Shot Tap Toggle) // #define LEADER_TIMEOUT 300 // How long before the leader key times out. If you're having issues finishing the sequence before it times out, you may need to increase the timeout setting. Or you may want to enable the LEADER_PER_KEY_TIMING option, which resets the timeout after each key is tapped. // #define LEADER_PER_KEY_TIMING // Sets the timer for leader key chords to run on each key press rather than overall diff --git a/keyboards/kprepublic/jj40/keymaps/stevexyz/config.h b/keyboards/kprepublic/jj40/keymaps/stevexyz/config.h index 3be7f6f0cb..48d86aedf5 100644 --- a/keyboards/kprepublic/jj40/keymaps/stevexyz/config.h +++ b/keyboards/kprepublic/jj40/keymaps/stevexyz/config.h @@ -8,8 +8,6 @@ #define PERMISSIVE_HOLD // makes tap and hold keys trigger the hold if another key is pressed before releasing, even if it hasn't hit the TAPPING_TERM -#define IGNORE_MOD_TAP_INTERRUPT - // makes it possible to do rolling combos (zx) with keys that convert to other keys on hold, by enforcing the TAPPING_TERM for both keys. #define QUICK_TAP_TERM 0 // makes it possible to use a dual role key as modifier shortly after having been tapped (see Hold after tap) diff --git a/keyboards/lets_split/keymaps/adam/config.h b/keyboards/lets_split/keymaps/adam/config.h index 826c381b32..9ba612359e 100644 --- a/keyboards/lets_split/keymaps/adam/config.h +++ b/keyboards/lets_split/keymaps/adam/config.h @@ -47,7 +47,6 @@ along with this program. If not, see . #undef TAPPING_TERM #define TAPPING_TERM 200 //At 500 some bad logic takes hold -#define IGNORE_MOD_TAP_INTERRUPT #define PERMISSIVE_HOLD #endif diff --git a/keyboards/lets_split/keymaps/shaymdev/config.h b/keyboards/lets_split/keymaps/shaymdev/config.h index 1a46cdf108..2135f04351 100644 --- a/keyboards/lets_split/keymaps/shaymdev/config.h +++ b/keyboards/lets_split/keymaps/shaymdev/config.h @@ -52,5 +52,4 @@ along with this program. If not, see . #define COMBO_COUNT 1 -#define IGNORE_MOD_TAP_INTERRUPT #define TAPPING_TERM 220 diff --git a/keyboards/lily58/keymaps/hvp/config.h b/keyboards/lily58/keymaps/hvp/config.h index 5699395f73..ec0960470a 100644 --- a/keyboards/lily58/keymaps/hvp/config.h +++ b/keyboards/lily58/keymaps/hvp/config.h @@ -35,7 +35,6 @@ along with this program. If not, see . #define TAPPING_TERM 150 #define PERMISSIVE_HOLD -#define IGNORE_MOD_TAP_INTERRUPT #undef RGBLED_NUM #define RGBLIGHT_EFFECT_BREATHING diff --git a/keyboards/lily58/keymaps/muppetjones/config.h b/keyboards/lily58/keymaps/muppetjones/config.h index 283a4ed890..81bc728d5a 100644 --- a/keyboards/lily58/keymaps/muppetjones/config.h +++ b/keyboards/lily58/keymaps/muppetjones/config.h @@ -31,9 +31,6 @@ along with this program. If not, see . // Change "hold" time (default is 200 ms) #define TAPPING_TERM 200 -// Prevent normal rollover on alphas from accidentally triggering mods. -#define IGNORE_MOD_TAP_INTERRUPT - // Enable rapid switch from tap to hold, disables double tap hold auto-repeat. #define QUICK_TAP_TERM 0 diff --git a/keyboards/lily58/keymaps/muuko/config.h b/keyboards/lily58/keymaps/muuko/config.h index 377ee816fe..5d833d34d0 100644 --- a/keyboards/lily58/keymaps/muuko/config.h +++ b/keyboards/lily58/keymaps/muuko/config.h @@ -27,7 +27,6 @@ along with this program. If not, see . #define NO_MUSIC_MODE #define PERMISSIVE_HOLD -#define IGNORE_MOD_TAP_INTERRUPT #ifdef TAPPING_TERM #undef TAPPING_TERM diff --git a/keyboards/lily58/keymaps/narze/config.h b/keyboards/lily58/keymaps/narze/config.h index a6fac1a58b..814338c18f 100644 --- a/keyboards/lily58/keymaps/narze/config.h +++ b/keyboards/lily58/keymaps/narze/config.h @@ -31,7 +31,6 @@ along with this program. If not, see . #define COMBO_TERM 20 #define COMBO_COUNT 3 -#define IGNORE_MOD_TAP_INTERRUPT #define PERMISSIVE_HOLD #define QUICK_TAP_TERM 0 diff --git a/keyboards/lily58/keymaps/niolang/config.h b/keyboards/lily58/keymaps/niolang/config.h index 58ffd90e2f..dedefc2fcf 100644 --- a/keyboards/lily58/keymaps/niolang/config.h +++ b/keyboards/lily58/keymaps/niolang/config.h @@ -25,9 +25,6 @@ along with this program. If not, see . // #define MASTER_RIGHT // #define EE_HANDS -/* Necessary because of use fo tap dance for ç (leads to un wanted modifications after typing c if not) */ -#define IGNORE_MOD_TAP_INTERRUPT - /* RGB light */ #ifdef RGBLIGHT_ENABLE #define RGBLIGHT_EFFECT_BREATHING diff --git a/keyboards/lyso1/lck75/config.h b/keyboards/lyso1/lck75/config.h index fd8587b1e4..ef5df5dd3d 100644 --- a/keyboards/lyso1/lck75/config.h +++ b/keyboards/lyso1/lck75/config.h @@ -41,7 +41,6 @@ along with this program. If not, see . # undef LOCKING_RESYNC_ENABLE #endif -#define IGNORE_MOD_TAP_INTERRUPT #define PERMISSIVE_HOLD #define TAPPING_TERM 200 diff --git a/keyboards/makenova/omega/omega4/keymaps/default/config.h b/keyboards/makenova/omega/omega4/keymaps/default/config.h index 1d2dd05351..c60e064e21 100644 --- a/keyboards/makenova/omega/omega4/keymaps/default/config.h +++ b/keyboards/makenova/omega/omega4/keymaps/default/config.h @@ -9,4 +9,3 @@ #endif #define TAPPING_TERM 150 -#define IGNORE_MOD_TAP_INTERRUPT \ No newline at end of file diff --git a/keyboards/makenova/omega/omega4/keymaps/default_10u_bar/config.h b/keyboards/makenova/omega/omega4/keymaps/default_10u_bar/config.h index 1d2dd05351..c60e064e21 100644 --- a/keyboards/makenova/omega/omega4/keymaps/default_10u_bar/config.h +++ b/keyboards/makenova/omega/omega4/keymaps/default_10u_bar/config.h @@ -9,4 +9,3 @@ #endif #define TAPPING_TERM 150 -#define IGNORE_MOD_TAP_INTERRUPT \ No newline at end of file diff --git a/keyboards/makenova/omega/omega4/keymaps/default_6u_bar/config.h b/keyboards/makenova/omega/omega4/keymaps/default_6u_bar/config.h index 1d2dd05351..c60e064e21 100644 --- a/keyboards/makenova/omega/omega4/keymaps/default_6u_bar/config.h +++ b/keyboards/makenova/omega/omega4/keymaps/default_6u_bar/config.h @@ -9,4 +9,3 @@ #endif #define TAPPING_TERM 150 -#define IGNORE_MOD_TAP_INTERRUPT \ No newline at end of file diff --git a/keyboards/maple_computing/minidox/keymaps/bepo/config.h b/keyboards/maple_computing/minidox/keymaps/bepo/config.h index f2a669ec94..1809262044 100644 --- a/keyboards/maple_computing/minidox/keymaps/bepo/config.h +++ b/keyboards/maple_computing/minidox/keymaps/bepo/config.h @@ -1,4 +1,3 @@ #pragma once #define EE_HANDS -#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/maple_computing/minidox/keymaps/dustypomerleau/config.h b/keyboards/maple_computing/minidox/keymaps/dustypomerleau/config.h index 0bb532c663..af4401a4a0 100644 --- a/keyboards/maple_computing/minidox/keymaps/dustypomerleau/config.h +++ b/keyboards/maple_computing/minidox/keymaps/dustypomerleau/config.h @@ -3,7 +3,6 @@ #pragma once #define EE_HANDS -#define IGNORE_MOD_TAP_INTERRUPT #define ONESHOT_TIMEOUT 1000 #define TAPPING_TERM 200 diff --git a/keyboards/maple_computing/minidox/keymaps/khitsule/config.h b/keyboards/maple_computing/minidox/keymaps/khitsule/config.h deleted file mode 100644 index 645e80ee8f..0000000000 --- a/keyboards/maple_computing/minidox/keymaps/khitsule/config.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#define IGNORE_MOD_TAP_INTERRUPT - -#endif diff --git a/keyboards/maple_computing/minidox/keymaps/rsthd_combos/config.h b/keyboards/maple_computing/minidox/keymaps/rsthd_combos/config.h index 37602b9163..98f8d6b071 100644 --- a/keyboards/maple_computing/minidox/keymaps/rsthd_combos/config.h +++ b/keyboards/maple_computing/minidox/keymaps/rsthd_combos/config.h @@ -5,4 +5,3 @@ #define COMBO_COUNT 10 #define COMBO_TERM 100 -#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/maple_computing/minidox/keymaps/xyverz/config.h b/keyboards/maple_computing/minidox/keymaps/xyverz/config.h index ee5aaa8294..023781e111 100644 --- a/keyboards/maple_computing/minidox/keymaps/xyverz/config.h +++ b/keyboards/maple_computing/minidox/keymaps/xyverz/config.h @@ -43,7 +43,6 @@ along with this program. If not, see . #define RGBLIGHT_SAT_STEP 17 #define RGBLIGHT_VAL_STEP 17 -#define IGNORE_MOD_TAP_INTERRUPT #undef PERMISSIVE_HOLD #endif diff --git a/keyboards/marksard/leftover30/keymaps/default/config.h b/keyboards/marksard/leftover30/keymaps/default/config.h index 8bffbbb3b5..8d29b8e6c9 100644 --- a/keyboards/marksard/leftover30/keymaps/default/config.h +++ b/keyboards/marksard/leftover30/keymaps/default/config.h @@ -18,7 +18,6 @@ // place overrides here #define TAPPING_TERM 200 -#define IGNORE_MOD_TAP_INTERRUPT #define TAPPING_LAYER_TERM 150 // Custom LT Tapping term #define TAPPING_TERM_PER_KEY diff --git a/keyboards/marksard/treadstone32/keymaps/default/config.h b/keyboards/marksard/treadstone32/keymaps/default/config.h index 863588c5aa..82020a59b8 100644 --- a/keyboards/marksard/treadstone32/keymaps/default/config.h +++ b/keyboards/marksard/treadstone32/keymaps/default/config.h @@ -18,7 +18,6 @@ // place overrides here #define TAPPING_TERM 200 -#define IGNORE_MOD_TAP_INTERRUPT #define TAPPING_LAYER_TERM 150 // Custom LT Tapping term #define TAPPING_TERM_PER_KEY diff --git a/keyboards/marksard/treadstone32/keymaps/like_jis/config.h b/keyboards/marksard/treadstone32/keymaps/like_jis/config.h index 863588c5aa..82020a59b8 100644 --- a/keyboards/marksard/treadstone32/keymaps/like_jis/config.h +++ b/keyboards/marksard/treadstone32/keymaps/like_jis/config.h @@ -18,7 +18,6 @@ // place overrides here #define TAPPING_TERM 200 -#define IGNORE_MOD_TAP_INTERRUPT #define TAPPING_LAYER_TERM 150 // Custom LT Tapping term #define TAPPING_TERM_PER_KEY diff --git a/keyboards/marksard/treadstone48/rev1/keymaps/like_jis_rs/config.h b/keyboards/marksard/treadstone48/rev1/keymaps/like_jis_rs/config.h index 54ac1f2fce..f18bcf44e7 100644 --- a/keyboards/marksard/treadstone48/rev1/keymaps/like_jis_rs/config.h +++ b/keyboards/marksard/treadstone48/rev1/keymaps/like_jis_rs/config.h @@ -23,7 +23,6 @@ #endif #define TAPPING_TERM 225 #define PREVENT_STUCK_MODIFIERS -#define IGNORE_MOD_TAP_INTERRUPT #ifdef MOUSEKEY_ENABLE #undef MOUSEKEY_INTERVAL diff --git a/keyboards/massdrop/alt/keymaps/b_/config.h b/keyboards/massdrop/alt/keymaps/b_/config.h index 8f06c0dd34..d87bdade68 100644 --- a/keyboards/massdrop/alt/keymaps/b_/config.h +++ b/keyboards/massdrop/alt/keymaps/b_/config.h @@ -31,7 +31,6 @@ // #define RETRO_TAPPING // Tap anyway, even after TAPPING_TERM, if there was no other key interruption between press and release // #define TAPPING_TOGGLE 2 // How many taps before triggering the toggle // #define PERMISSIVE_HOLD // Makes tap and hold keys trigger the hold if another key is pressed before releasing, even if it hasn't hit the TAPPING_TERM. See Permissive Hold for details -// #define IGNORE_MOD_TAP_INTERRUPT // Makes it possible to do rolling combos (zx) with keys that convert to other keys on hold, by enforcing the TAPPING_TERM for both keys. See Mod tap interrupt for details // #define QUICK_TAP_TERM 0 // Makes it possible to use a dual role key as modifier shortly after having been tapped. See Hold after tap. Breaks any Tap Toggle functionality (TT or the One Shot Tap Toggle) // #define LEADER_TIMEOUT 300 // How long before the leader key times out. If you're having issues finishing the sequence before it times out, you may need to increase the timeout setting. Or you may want to enable the LEADER_PER_KEY_TIMING option, which resets the timeout after each key is tapped. // #define LEADER_PER_KEY_TIMING // Sets the timer for leader key chords to run on each key press rather than overall diff --git a/keyboards/massdrop/alt/keymaps/pregame/config.h b/keyboards/massdrop/alt/keymaps/pregame/config.h index 83f0d13bd5..331b34c9b0 100644 --- a/keyboards/massdrop/alt/keymaps/pregame/config.h +++ b/keyboards/massdrop/alt/keymaps/pregame/config.h @@ -44,7 +44,6 @@ // #define RETRO_TAPPING // Tap anyway, even after TAPPING_TERM, if there was no other key interruption between press and release // #define TAPPING_TOGGLE 2 // How many taps before triggering the toggle // #define PERMISSIVE_HOLD // Makes tap and hold keys trigger the hold if another key is pressed before releasing, even if it hasn't hit the TAPPING_TERM. See Permissive Hold for details -// #define IGNORE_MOD_TAP_INTERRUPT // Makes it possible to do rolling combos (zx) with keys that convert to other keys on hold, by enforcing the TAPPING_TERM for both keys. See Mod tap interrupt for details // #define QUICK_TAP_TERM 0 // Makes it possible to use a dual role key as modifier shortly after having been tapped. See Hold after tap. Breaks any Tap Toggle functionality (TT or the One Shot Tap Toggle) // #define LEADER_TIMEOUT 300 // How long before the leader key times out. If you're having issues finishing the sequence before it times out, you may need to increase the timeout setting. Or you may want to enable the LEADER_PER_KEY_TIMING option, which resets the timeout after each key is tapped. // #define LEADER_PER_KEY_TIMING // Sets the timer for leader key chords to run on each key press rather than overall diff --git a/keyboards/massdrop/ctrl/keymaps/endgame/config.h b/keyboards/massdrop/ctrl/keymaps/endgame/config.h index 8584c07a5d..c8fa629552 100644 --- a/keyboards/massdrop/ctrl/keymaps/endgame/config.h +++ b/keyboards/massdrop/ctrl/keymaps/endgame/config.h @@ -28,7 +28,6 @@ // #define RETRO_TAPPING // Tap anyway, even after TAPPING_TERM, if there was no other key interruption between press and release #define TAPPING_TOGGLE 2 // How many taps before triggering the toggle // #define PERMISSIVE_HOLD // Makes tap and hold keys trigger the hold if another key is pressed before releasing, even if it hasn't hit the TAPPING_TERM. See Permissive Hold for details -// #define IGNORE_MOD_TAP_INTERRUPT // Makes it possible to do rolling combos (zx) with keys that convert to other keys on hold, by enforcing the TAPPING_TERM for both keys. See Mod tap interrupt for details // #define QUICK_TAP_TERM 0 // Makes it possible to use a dual role key as modifier shortly after having been tapped. See Hold after tap. Breaks any Tap Toggle functionality (TT or the One Shot Tap Toggle) // #define LEADER_TIMEOUT 300 // How long before the leader key times out. If you're having issues finishing the sequence before it times out, you may need to increase the timeout setting. Or you may want to enable the LEADER_PER_KEY_TIMING option, which resets the timeout after each key is tapped. // #define LEADER_PER_KEY_TIMING // Sets the timer for leader key chords to run on each key press rather than overall diff --git a/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h b/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h index b975b7895b..a17ad45c4c 100644 --- a/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h +++ b/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h @@ -46,7 +46,6 @@ along with this program. If not, see . // #define RETRO_TAPPING // Tap anyway, even after TAPPING_TERM, if there was no other key interruption between press and release // #define TAPPING_TOGGLE 2 // How many taps before triggering the toggle // #define PERMISSIVE_HOLD // Makes tap and hold keys trigger the hold if another key is pressed before releasing, even if it hasn't hit the TAPPING_TERM. See Permissive Hold for details -// #define IGNORE_MOD_TAP_INTERRUPT // Makes it possible to do rolling combos (zx) with keys that convert to other keys on hold, by enforcing the TAPPING_TERM for both keys. See Mod tap interrupt for details // #define QUICK_TAP_TERM 0 // Makes it possible to use a dual role key as modifier shortly after having been tapped. See Hold after tap. Breaks any Tap Toggle functionality (TT or the One Shot Tap Toggle) // #define LEADER_TIMEOUT 300 // How long before the leader key times out. If you're having issues finishing the sequence before it times out, you may need to increase the timeout setting. Or you may want to enable the LEADER_PER_KEY_TIMING option, which resets the timeout after each key is tapped. // #define LEADER_PER_KEY_TIMING // Sets the timer for leader key chords to run on each key press rather than overall diff --git a/keyboards/massdrop/ctrl/keymaps/xanimos/config.h b/keyboards/massdrop/ctrl/keymaps/xanimos/config.h index 87db7fe8ea..2166f67e8c 100644 --- a/keyboards/massdrop/ctrl/keymaps/xanimos/config.h +++ b/keyboards/massdrop/ctrl/keymaps/xanimos/config.h @@ -44,7 +44,6 @@ // #define RETRO_TAPPING // Tap anyway, even after TAPPING_TERM, if there was no other key interruption between press and release #define TAPPING_TOGGLE 2 // How many taps before triggering the toggle // #define PERMISSIVE_HOLD // Makes tap and hold keys trigger the hold if another key is pressed before releasing, even if it hasn't hit the TAPPING_TERM. See Permissive Hold for details -// #define IGNORE_MOD_TAP_INTERRUPT // Makes it possible to do rolling combos (zx) with keys that convert to other keys on hold, by enforcing the TAPPING_TERM for both keys. See Mod tap interrupt for details // #define QUICK_TAP_TERM 0 // Makes it possible to use a dual role key as modifier shortly after having been tapped. See Hold after tap. Breaks any Tap Toggle functionality (TT or the One Shot Tap Toggle) // #define LEADER_TIMEOUT 300 // How long before the leader key times out. If you're having issues finishing the sequence before it times out, you may need to increase the timeout setting. Or you may want to enable the LEADER_PER_KEY_TIMING option, which resets the timeout after each key is tapped. // #define LEADER_PER_KEY_TIMING // Sets the timer for leader key chords to run on each key press rather than overall diff --git a/keyboards/mechwild/bde/lefty/keymaps/default/config.h b/keyboards/mechwild/bde/lefty/keymaps/default/config.h index 5c2d15a006..c8b98febcd 100644 --- a/keyboards/mechwild/bde/lefty/keymaps/default/config.h +++ b/keyboards/mechwild/bde/lefty/keymaps/default/config.h @@ -15,8 +15,6 @@ */ #pragma once -/* Making it so you need to hold the modifier and other key for the time together, helps not accidentally hit activate the hold functions of bottom row*/ -#define IGNORE_MOD_TAP_INTERRUPT /* Setting tap term, helps not accidentally hit activate the hold functions of bottom row*/ #define TAPPING_TERM 250 diff --git a/keyboards/mechwild/bde/lefty/keymaps/fancy/config.h b/keyboards/mechwild/bde/lefty/keymaps/fancy/config.h index 8476c8ccd6..656cf1a794 100644 --- a/keyboards/mechwild/bde/lefty/keymaps/fancy/config.h +++ b/keyboards/mechwild/bde/lefty/keymaps/fancy/config.h @@ -15,8 +15,6 @@ */ #pragma once -/* Making it so you need to hold the modifier and other key for the time together, helps not accidentally hit activate the hold functions of bottom row*/ -#define IGNORE_MOD_TAP_INTERRUPT /* Setting tap term, helps not accidentally hit activate the hold functions of bottom row*/ #define TAPPING_TERM 250 diff --git a/keyboards/mechwild/bde/lefty/keymaps/via/config.h b/keyboards/mechwild/bde/lefty/keymaps/via/config.h index 8476c8ccd6..656cf1a794 100644 --- a/keyboards/mechwild/bde/lefty/keymaps/via/config.h +++ b/keyboards/mechwild/bde/lefty/keymaps/via/config.h @@ -15,8 +15,6 @@ */ #pragma once -/* Making it so you need to hold the modifier and other key for the time together, helps not accidentally hit activate the hold functions of bottom row*/ -#define IGNORE_MOD_TAP_INTERRUPT /* Setting tap term, helps not accidentally hit activate the hold functions of bottom row*/ #define TAPPING_TERM 250 diff --git a/keyboards/mechwild/bde/rev2/keymaps/via/config.h b/keyboards/mechwild/bde/rev2/keymaps/via/config.h index d09385ca5d..9630c999ff 100644 --- a/keyboards/mechwild/bde/rev2/keymaps/via/config.h +++ b/keyboards/mechwild/bde/rev2/keymaps/via/config.h @@ -15,8 +15,6 @@ */ #pragma once -/* Making it so you need to hold the modifier and other key for the time together, helps not accidentally hit activate the hold functions of bottom row*/ -#define IGNORE_MOD_TAP_INTERRUPT /* Setting tap term, helps not accidentally hit activate the hold functions of bottom row*/ #define TAPPING_TERM 250 diff --git a/keyboards/mechwild/bde/righty/keymaps/default/config.h b/keyboards/mechwild/bde/righty/keymaps/default/config.h index 5c2d15a006..2507b2e612 100644 --- a/keyboards/mechwild/bde/righty/keymaps/default/config.h +++ b/keyboards/mechwild/bde/righty/keymaps/default/config.h @@ -15,9 +15,6 @@ */ #pragma once -/* Making it so you need to hold the modifier and other key for the time together, helps not accidentally hit activate the hold functions of bottom row*/ -#define IGNORE_MOD_TAP_INTERRUPT - /* Setting tap term, helps not accidentally hit activate the hold functions of bottom row*/ #define TAPPING_TERM 250 diff --git a/keyboards/mechwild/bde/righty/keymaps/via/config.h b/keyboards/mechwild/bde/righty/keymaps/via/config.h index 5c2d15a006..c8b98febcd 100644 --- a/keyboards/mechwild/bde/righty/keymaps/via/config.h +++ b/keyboards/mechwild/bde/righty/keymaps/via/config.h @@ -15,8 +15,6 @@ */ #pragma once -/* Making it so you need to hold the modifier and other key for the time together, helps not accidentally hit activate the hold functions of bottom row*/ -#define IGNORE_MOD_TAP_INTERRUPT /* Setting tap term, helps not accidentally hit activate the hold functions of bottom row*/ #define TAPPING_TERM 250 diff --git a/keyboards/moonlander/keymaps/jjerrell/config.h b/keyboards/moonlander/keymaps/jjerrell/config.h index aa4bf3885e..e39340c80a 100644 --- a/keyboards/moonlander/keymaps/jjerrell/config.h +++ b/keyboards/moonlander/keymaps/jjerrell/config.h @@ -24,4 +24,3 @@ #undef PRODUCT #define PRODUCT "Moonlander Mark I - Modified by <@jjerrell>" -#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/numatreus/keymaps/like_jis/config.h b/keyboards/numatreus/keymaps/like_jis/config.h index 961de83e42..70faffdf37 100644 --- a/keyboards/numatreus/keymaps/like_jis/config.h +++ b/keyboards/numatreus/keymaps/like_jis/config.h @@ -26,7 +26,6 @@ along with this program. If not, see . #undef TAPPING_TERM #endif #define TAPPING_TERM 225 -#define IGNORE_MOD_TAP_INTERRUPT #ifdef MOUSEKEY_ENABLE #undef MOUSEKEY_INTERVAL diff --git a/keyboards/obosob/steal_this_keyboard/keymaps/default/config.h b/keyboards/obosob/steal_this_keyboard/keymaps/default/config.h index 3e3ba7a401..71b4813515 100644 --- a/keyboards/obosob/steal_this_keyboard/keymaps/default/config.h +++ b/keyboards/obosob/steal_this_keyboard/keymaps/default/config.h @@ -35,5 +35,4 @@ along with this program. If not, see . // Pick good defaults for enabling homerow modifiers #define TAPPING_TERM 200 #define PERMISSIVE_HOLD -#define IGNORE_MOD_TAP_INTERRUPT #define QUICK_TAP_TERM 0 diff --git a/keyboards/orthodox/keymaps/shaymdev/config.h b/keyboards/orthodox/keymaps/shaymdev/config.h index 5f20923107..2fa05fda7c 100644 --- a/keyboards/orthodox/keymaps/shaymdev/config.h +++ b/keyboards/orthodox/keymaps/shaymdev/config.h @@ -50,5 +50,4 @@ along with this program. If not, see . #define COMBO_COUNT 1 -#define IGNORE_MOD_TAP_INTERRUPT #define TAPPING_TERM 220 diff --git a/keyboards/pica40/keymaps/zzeneg/config.h b/keyboards/pica40/keymaps/zzeneg/config.h index ec422c4d8e..f29f5ba1a7 100644 --- a/keyboards/pica40/keymaps/zzeneg/config.h +++ b/keyboards/pica40/keymaps/zzeneg/config.h @@ -3,7 +3,6 @@ #pragma once -#define IGNORE_MOD_TAP_INTERRUPT #define TAPPING_FORCE_HOLD #define TAPPING_FORCE_HOLD_PER_KEY #define TAPPING_TERM 150 diff --git a/keyboards/pierce/keymaps/durken1/config.h b/keyboards/pierce/keymaps/durken1/config.h index 7049a692ed..8ff2df3709 100644 --- a/keyboards/pierce/keymaps/durken1/config.h +++ b/keyboards/pierce/keymaps/durken1/config.h @@ -19,9 +19,6 @@ // default but important #define TAPPING_TERM 220 -// Prevent normal rollover on alphas from accidentally triggering mods. -#define IGNORE_MOD_TAP_INTERRUPT - // Enable rapid switch from tap to hold, disables double tap hold auto-repeat. #define QUICK_TAP_TERM 0 diff --git a/keyboards/pisces/keymaps/default/config.h b/keyboards/pisces/keymaps/default/config.h index 810b6546db..fbac4dcb26 100644 --- a/keyboards/pisces/keymaps/default/config.h +++ b/keyboards/pisces/keymaps/default/config.h @@ -17,4 +17,3 @@ #pragma once #define TAPPING_TERM 175 // milliseconds -#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/pisces/keymaps/via/config.h b/keyboards/pisces/keymaps/via/config.h index 810b6546db..fbac4dcb26 100644 --- a/keyboards/pisces/keymaps/via/config.h +++ b/keyboards/pisces/keymaps/via/config.h @@ -17,4 +17,3 @@ #pragma once #define TAPPING_TERM 175 // milliseconds -#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/planck/ez/config.h b/keyboards/planck/ez/config.h index 6828e4dce2..3b10a2b753 100644 --- a/keyboards/planck/ez/config.h +++ b/keyboards/planck/ez/config.h @@ -111,8 +111,6 @@ #define ENABLE_RGB_MATRIX_SOLID_SPLASH #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH -#define IGNORE_MOD_TAP_INTERRUPT - #define TAPPING_TOGGLE 1 #define MOUSEKEY_INTERVAL 20 diff --git a/keyboards/planck/keymaps/altgr/config.h b/keyboards/planck/keymaps/altgr/config.h index e517a8b24b..b6c010a825 100644 --- a/keyboards/planck/keymaps/altgr/config.h +++ b/keyboards/planck/keymaps/altgr/config.h @@ -36,7 +36,6 @@ #define HOME_MODS // fix dual function timing #define PERMISSIVE_HOLD -#define IGNORE_MOD_TAP_INTERRUPT // layout ADNW*, BEAKL*, COLEKA*, QWERTY (default) #define BEAKLGR diff --git a/keyboards/planck/keymaps/antosha417/config.h b/keyboards/planck/keymaps/antosha417/config.h index 9bbb1192c7..3ad322687a 100644 --- a/keyboards/planck/keymaps/antosha417/config.h +++ b/keyboards/planck/keymaps/antosha417/config.h @@ -29,6 +29,5 @@ #define ENCODER_RESOLUTION 4 #define TAPPING_TERM 200 -#define IGNORE_MOD_TAP_INTERRUPT #define COMBO_TERM 30 diff --git a/keyboards/planck/keymaps/ariccb/config.h b/keyboards/planck/keymaps/ariccb/config.h index 464a8cd5db..e9fcc865fa 100644 --- a/keyboards/planck/keymaps/ariccb/config.h +++ b/keyboards/planck/keymaps/ariccb/config.h @@ -41,8 +41,6 @@ #define TAPPING_TERM 150 #define TAPPING_TERM_PER_KEY -#define IGNORE_MOD_TAP_INTERRUPT -// #define IGNORE_MOD_TAP_INTERRUPT // #define HOLD_ON_OTHER_KEY_PRESS #define COMBO_TERM 20 diff --git a/keyboards/planck/keymaps/hiea/config.h b/keyboards/planck/keymaps/hiea/config.h index eb86704578..65845fe3e7 100644 --- a/keyboards/planck/keymaps/hiea/config.h +++ b/keyboards/planck/keymaps/hiea/config.h @@ -36,7 +36,6 @@ #define HOME_MODS // fix dual function timing #define PERMISSIVE_HOLD -#define IGNORE_MOD_TAP_INTERRUPT // layout ADNW*, BEAKL*, COLEKA*, QWERTY (default) #define DEFAULT diff --git a/keyboards/planck/keymaps/hieax/config.h b/keyboards/planck/keymaps/hieax/config.h index eb86704578..65845fe3e7 100644 --- a/keyboards/planck/keymaps/hieax/config.h +++ b/keyboards/planck/keymaps/hieax/config.h @@ -36,7 +36,6 @@ #define HOME_MODS // fix dual function timing #define PERMISSIVE_HOLD -#define IGNORE_MOD_TAP_INTERRUPT // layout ADNW*, BEAKL*, COLEKA*, QWERTY (default) #define DEFAULT diff --git a/keyboards/planck/keymaps/hvp/config.h b/keyboards/planck/keymaps/hvp/config.h index 009a8f7122..472320ed68 100644 --- a/keyboards/planck/keymaps/hvp/config.h +++ b/keyboards/planck/keymaps/hvp/config.h @@ -1,6 +1,5 @@ #pragma once #define TAPPING_TERM 150 -#define IGNORE_MOD_TAP_INTERRUPT #define PERMISSIVE_HOLD #ifdef AUDIO_ENABLE diff --git a/keyboards/planck/keymaps/jweickm/config.h b/keyboards/planck/keymaps/jweickm/config.h index bd34fca202..2b7a3b02d6 100644 --- a/keyboards/planck/keymaps/jweickm/config.h +++ b/keyboards/planck/keymaps/jweickm/config.h @@ -57,7 +57,6 @@ #define TAPPING_TERM 160 // 200 ms is the default value #define TAPPING_TERM_PER_KEY //#define PERMISSIVE_HOLD -#define IGNORE_MOD_TAP_INTERRUPT #define QUICK_TAP_TERM_PER_KEY // settings for LEADER key diff --git a/keyboards/planck/keymaps/mattly/config.h b/keyboards/planck/keymaps/mattly/config.h index 46fe973417..31c47c85b4 100644 --- a/keyboards/planck/keymaps/mattly/config.h +++ b/keyboards/planck/keymaps/mattly/config.h @@ -34,7 +34,6 @@ // Most tactile encoders have detents every 4 stages #define ENCODER_RESOLUTION 4 -#define IGNORE_MOD_TAP_INTERRUPT #define PERMISSIVE_HOLD #define TAPPING_TOGGLE 2 #define TAPPING_TERM 200 diff --git a/keyboards/planck/keymaps/muppetjones/config.h b/keyboards/planck/keymaps/muppetjones/config.h index 1a05bfc837..88331e71f6 100644 --- a/keyboards/planck/keymaps/muppetjones/config.h +++ b/keyboards/planck/keymaps/muppetjones/config.h @@ -49,8 +49,5 @@ // Change "hold" time (default is 200 ms) #define TAPPING_TERM 200 -// Prevent normal rollover on alphas from accidentally triggering mods. -#define IGNORE_MOD_TAP_INTERRUPT - // Enable rapid switch from tap to hold, disables double tap hold auto-repeat. #define QUICK_TAP_TERM 0 diff --git a/keyboards/planck/keymaps/mwpeterson/config.h b/keyboards/planck/keymaps/mwpeterson/config.h index 2665bd7c56..657ffda599 100644 --- a/keyboards/planck/keymaps/mwpeterson/config.h +++ b/keyboards/planck/keymaps/mwpeterson/config.h @@ -1,7 +1,6 @@ #pragma once #define PERMISSIVE_HOLD -#define IGNORE_MOD_TAP_INTERRUPT #ifdef AUDIO_ENABLE #define STARTUP_SONG SONG(ONE_UP_SOUND) diff --git a/keyboards/planck/keymaps/narze/config.h b/keyboards/planck/keymaps/narze/config.h index 9ab1637306..fddd9cd376 100644 --- a/keyboards/planck/keymaps/narze/config.h +++ b/keyboards/planck/keymaps/narze/config.h @@ -26,7 +26,6 @@ #define COMBO_TERM 20 #define COMBO_COUNT 1 -#define IGNORE_MOD_TAP_INTERRUPT #define PERMISSIVE_HOLD #define SUPER_DUPER_SOUND S__NOTE(_B1) diff --git a/keyboards/planck/keymaps/sdothum/config.h b/keyboards/planck/keymaps/sdothum/config.h index 903bbe8095..6afcc69064 100644 --- a/keyboards/planck/keymaps/sdothum/config.h +++ b/keyboards/planck/keymaps/sdothum/config.h @@ -36,7 +36,6 @@ #define HOME_MODS // fix dual function timing #define PERMISSIVE_HOLD -#define IGNORE_MOD_TAP_INTERRUPT // layout ADNW*, BEAKL*, COLEKA*, QWERTY (default) #define BEAKLSP diff --git a/keyboards/planck/keymaps/snowkuma/config.h b/keyboards/planck/keymaps/snowkuma/config.h index 694245582d..c61d252804 100644 --- a/keyboards/planck/keymaps/snowkuma/config.h +++ b/keyboards/planck/keymaps/snowkuma/config.h @@ -36,7 +36,6 @@ // Settings for homerow mods #define TAPPING_TERM 250 -#define IGNORE_MOD_TAP_INTERRUPT // Add the leader key feature diff --git a/keyboards/planck/keymaps/tylerwince/config.h b/keyboards/planck/keymaps/tylerwince/config.h index 52c1494a1d..d0fb8680e3 100644 --- a/keyboards/planck/keymaps/tylerwince/config.h +++ b/keyboards/planck/keymaps/tylerwince/config.h @@ -13,6 +13,5 @@ See config.h options at https://docs.qmk.fm/#/config_options?id=the-configh-file */ #define QUICK_TAP_TERM 0 -#define IGNORE_MOD_TAP_INTERRUPT #define EECONFIG_RGB_MATRIX (uint32_t *)16 diff --git a/keyboards/preonic/keymaps/egstad/config.h b/keyboards/preonic/keymaps/egstad/config.h index 4f4fbfe05c..16a4c267e5 100644 --- a/keyboards/preonic/keymaps/egstad/config.h +++ b/keyboards/preonic/keymaps/egstad/config.h @@ -1,6 +1,5 @@ #pragma once #define TAPPING_TERM 200 -#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/preonic/keymaps/laurentlaurent/config.h b/keyboards/preonic/keymaps/laurentlaurent/config.h index 2c1b1a7059..20ce699a19 100644 --- a/keyboards/preonic/keymaps/laurentlaurent/config.h +++ b/keyboards/preonic/keymaps/laurentlaurent/config.h @@ -33,6 +33,4 @@ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 2 -// Fix Home Row mod keys -#define IGNORE_MOD_TAP_INTERRUPT -//#define RETRO_TAPPING \ No newline at end of file +//#define RETRO_TAPPING diff --git a/keyboards/q4z/keymaps/default/config.h b/keyboards/q4z/keymaps/default/config.h index ac3a08778d..c129199230 100644 --- a/keyboards/q4z/keymaps/default/config.h +++ b/keyboards/q4z/keymaps/default/config.h @@ -15,8 +15,6 @@ */ #pragma once -#define IGNORE_MOD_TAP_INTERRUPT //helps with homerow mods - #ifdef COMBO_ENABLE #define COMBO_COUNT 5 #define COMBO_TERM 200 diff --git a/keyboards/q4z/keymaps/rjboone/config.h b/keyboards/q4z/keymaps/rjboone/config.h index 9921a19178..7530b24262 100644 --- a/keyboards/q4z/keymaps/rjboone/config.h +++ b/keyboards/q4z/keymaps/rjboone/config.h @@ -15,8 +15,6 @@ */ #pragma once -#define IGNORE_MOD_TAP_INTERRUPT //helps with homerow mods - #undef TAPPING_TERM #define TAPPING_TERM 300 diff --git a/keyboards/qpockets/eggman/keymaps/default/config.h b/keyboards/qpockets/eggman/keymaps/default/config.h index dd1d9753fd..90d12ee7da 100644 --- a/keyboards/qpockets/eggman/keymaps/default/config.h +++ b/keyboards/qpockets/eggman/keymaps/default/config.h @@ -18,7 +18,6 @@ /*Modtaps*/ #define TAPPING_TERM 175 -#define IGNORE_MOD_TAP_INTERRUPT /*Combos*/ #ifdef COMBO_ENABLE diff --git a/keyboards/qpockets/space_space/rev1/keymaps/big_space/config.h b/keyboards/qpockets/space_space/rev1/keymaps/big_space/config.h index ffc2124e1b..fd24168f47 100644 --- a/keyboards/qpockets/space_space/rev1/keymaps/big_space/config.h +++ b/keyboards/qpockets/space_space/rev1/keymaps/big_space/config.h @@ -18,7 +18,6 @@ /*Modtaps*/ #define TAPPING_TERM 175 -#define IGNORE_MOD_TAP_INTERRUPT /*Combos*/ #ifdef COMBO_ENABLE diff --git a/keyboards/qpockets/space_space/rev1/keymaps/default/config.h b/keyboards/qpockets/space_space/rev1/keymaps/default/config.h index ffc2124e1b..fd24168f47 100644 --- a/keyboards/qpockets/space_space/rev1/keymaps/default/config.h +++ b/keyboards/qpockets/space_space/rev1/keymaps/default/config.h @@ -18,7 +18,6 @@ /*Modtaps*/ #define TAPPING_TERM 175 -#define IGNORE_MOD_TAP_INTERRUPT /*Combos*/ #ifdef COMBO_ENABLE diff --git a/keyboards/qpockets/space_space/rev2/keymaps/big_space/config.h b/keyboards/qpockets/space_space/rev2/keymaps/big_space/config.h index ffc2124e1b..fd24168f47 100644 --- a/keyboards/qpockets/space_space/rev2/keymaps/big_space/config.h +++ b/keyboards/qpockets/space_space/rev2/keymaps/big_space/config.h @@ -18,7 +18,6 @@ /*Modtaps*/ #define TAPPING_TERM 175 -#define IGNORE_MOD_TAP_INTERRUPT /*Combos*/ #ifdef COMBO_ENABLE diff --git a/keyboards/qpockets/space_space/rev2/keymaps/default/config.h b/keyboards/qpockets/space_space/rev2/keymaps/default/config.h index 0b0e89fa1f..7fdb8504a6 100644 --- a/keyboards/qpockets/space_space/rev2/keymaps/default/config.h +++ b/keyboards/qpockets/space_space/rev2/keymaps/default/config.h @@ -18,7 +18,6 @@ /*Modtaps*/ #define TAPPING_TERM 165 -#define IGNORE_MOD_TAP_INTERRUPT /*Combos*/ #ifdef COMBO_ENABLE diff --git a/keyboards/qpockets/space_space/rev2/keymaps/qpockets/config.h b/keyboards/qpockets/space_space/rev2/keymaps/qpockets/config.h index bf8c47eb3e..31291ecc8f 100644 --- a/keyboards/qpockets/space_space/rev2/keymaps/qpockets/config.h +++ b/keyboards/qpockets/space_space/rev2/keymaps/qpockets/config.h @@ -18,7 +18,6 @@ /*Modtaps*/ #define TAPPING_TERM 145 -#define IGNORE_MOD_TAP_INTERRUPT /*Combos*/ #ifdef COMBO_ENABLE diff --git a/keyboards/qpockets/wanten/keymaps/2u_bars/config.h b/keyboards/qpockets/wanten/keymaps/2u_bars/config.h index 51e54382af..072519ff6c 100644 --- a/keyboards/qpockets/wanten/keymaps/2u_bars/config.h +++ b/keyboards/qpockets/wanten/keymaps/2u_bars/config.h @@ -18,7 +18,6 @@ /*Modtaps*/ #define TAPPING_TERM 145 -#define IGNORE_MOD_TAP_INTERRUPT /*Combos*/ #ifdef COMBO_ENABLE diff --git a/keyboards/qpockets/wanten/keymaps/625_bar/config.h b/keyboards/qpockets/wanten/keymaps/625_bar/config.h index 51e54382af..072519ff6c 100644 --- a/keyboards/qpockets/wanten/keymaps/625_bar/config.h +++ b/keyboards/qpockets/wanten/keymaps/625_bar/config.h @@ -18,7 +18,6 @@ /*Modtaps*/ #define TAPPING_TERM 145 -#define IGNORE_MOD_TAP_INTERRUPT /*Combos*/ #ifdef COMBO_ENABLE diff --git a/keyboards/qpockets/wanten/keymaps/default/config.h b/keyboards/qpockets/wanten/keymaps/default/config.h index 51e54382af..072519ff6c 100644 --- a/keyboards/qpockets/wanten/keymaps/default/config.h +++ b/keyboards/qpockets/wanten/keymaps/default/config.h @@ -18,7 +18,6 @@ /*Modtaps*/ #define TAPPING_TERM 145 -#define IGNORE_MOD_TAP_INTERRUPT /*Combos*/ #ifdef COMBO_ENABLE diff --git a/keyboards/recompile_keys/nomu30/keymaps/center_sprit/config.h b/keyboards/recompile_keys/nomu30/keymaps/center_sprit/config.h index 8861dc5396..739186fdeb 100644 --- a/keyboards/recompile_keys/nomu30/keymaps/center_sprit/config.h +++ b/keyboards/recompile_keys/nomu30/keymaps/center_sprit/config.h @@ -22,7 +22,6 @@ along with this program. If not, see . // place overrides here #define TAPPING_TERM 200 -#define IGNORE_MOD_TAP_INTERRUPT #define TAPPING_LAYER_TERM 150 // Custom LT Tapping term #define TAPPING_TERM_PER_KEY diff --git a/keyboards/recompile_keys/nomu30/keymaps/like_jis/config.h b/keyboards/recompile_keys/nomu30/keymaps/like_jis/config.h index 8861dc5396..739186fdeb 100644 --- a/keyboards/recompile_keys/nomu30/keymaps/like_jis/config.h +++ b/keyboards/recompile_keys/nomu30/keymaps/like_jis/config.h @@ -22,7 +22,6 @@ along with this program. If not, see . // place overrides here #define TAPPING_TERM 200 -#define IGNORE_MOD_TAP_INTERRUPT #define TAPPING_LAYER_TERM 150 // Custom LT Tapping term #define TAPPING_TERM_PER_KEY diff --git a/keyboards/redox/keymaps/eightbitraptor/config.h b/keyboards/redox/keymaps/eightbitraptor/config.h index 9697f561da..045b6a2165 100644 --- a/keyboards/redox/keymaps/eightbitraptor/config.h +++ b/keyboards/redox/keymaps/eightbitraptor/config.h @@ -39,4 +39,3 @@ along with this program. If not, see . #define RGBLIGHT_VAL_STEP 8 #define RETRO_TAPPING -#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/redox/keymaps/finex/config.h b/keyboards/redox/keymaps/finex/config.h index f155c6900c..e65e610046 100644 --- a/keyboards/redox/keymaps/finex/config.h +++ b/keyboards/redox/keymaps/finex/config.h @@ -39,5 +39,4 @@ along with this program. If not, see . #define RGBLIGHT_VAL_STEP 8 // #define PERMISSIVE_HOLD -#define IGNORE_MOD_TAP_INTERRUPT #define TAPPING_TERM 200 diff --git a/keyboards/redox_w/keymaps/danielo515/config.h b/keyboards/redox_w/keymaps/danielo515/config.h index 43d4ff9cb2..df14c8c269 100644 --- a/keyboards/redox_w/keymaps/danielo515/config.h +++ b/keyboards/redox_w/keymaps/danielo515/config.h @@ -1,6 +1,5 @@ #pragma once -#define IGNORE_MOD_TAP_INTERRUPT #define TAPPING_TERM 200 #undef ONESHOT_TIMEOUT #define ONESHOT_TIMEOUT 1500 diff --git a/keyboards/rmi_kb/chevron/config.h b/keyboards/rmi_kb/chevron/config.h index 77ef2c19b8..7cc6ae4689 100644 --- a/keyboards/rmi_kb/chevron/config.h +++ b/keyboards/rmi_kb/chevron/config.h @@ -40,4 +40,3 @@ along with this program. If not, see . /* QoL improvements */ #define PERMISSIVE_HOLD -#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/rmi_kb/herringbone/pro/config.h b/keyboards/rmi_kb/herringbone/pro/config.h index 06c118b1b6..27cd8fb6b6 100644 --- a/keyboards/rmi_kb/herringbone/pro/config.h +++ b/keyboards/rmi_kb/herringbone/pro/config.h @@ -24,7 +24,6 @@ along with this program. If not, see . /* Small QoL improvements */ #define PERMISSIVE_HOLD -#define IGNORE_MOD_TAP_INTERRUPT /* * Feature disable options diff --git a/keyboards/rmi_kb/herringbone/v1/config.h b/keyboards/rmi_kb/herringbone/v1/config.h index 06c118b1b6..27cd8fb6b6 100644 --- a/keyboards/rmi_kb/herringbone/v1/config.h +++ b/keyboards/rmi_kb/herringbone/v1/config.h @@ -24,7 +24,6 @@ along with this program. If not, see . /* Small QoL improvements */ #define PERMISSIVE_HOLD -#define IGNORE_MOD_TAP_INTERRUPT /* * Feature disable options diff --git a/keyboards/rmi_kb/squishyfrl/config.h b/keyboards/rmi_kb/squishyfrl/config.h index fd42b9f29b..970cf0532c 100644 --- a/keyboards/rmi_kb/squishyfrl/config.h +++ b/keyboards/rmi_kb/squishyfrl/config.h @@ -58,4 +58,3 @@ along with this program. If not, see . /* QoL improvements */ #define PERMISSIVE_HOLD -#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/rmi_kb/squishytkl/config.h b/keyboards/rmi_kb/squishytkl/config.h index fd42b9f29b..970cf0532c 100644 --- a/keyboards/rmi_kb/squishytkl/config.h +++ b/keyboards/rmi_kb/squishytkl/config.h @@ -58,4 +58,3 @@ along with this program. If not, see . /* QoL improvements */ #define PERMISSIVE_HOLD -#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/rmi_kb/wete/v2/config.h b/keyboards/rmi_kb/wete/v2/config.h index 10d9733e05..8605706bbd 100644 --- a/keyboards/rmi_kb/wete/v2/config.h +++ b/keyboards/rmi_kb/wete/v2/config.h @@ -60,4 +60,3 @@ along with this program. If not, see . // QoL improvements #define PERMISSIVE_HOLD -#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/signum/3_0/keymaps/sgurenkov/config.h b/keyboards/signum/3_0/keymaps/sgurenkov/config.h index 7d164aa3a9..17f6d09479 100644 --- a/keyboards/signum/3_0/keymaps/sgurenkov/config.h +++ b/keyboards/signum/3_0/keymaps/sgurenkov/config.h @@ -23,9 +23,6 @@ // default but used in macros #define TAPPING_TERM 300 -// Prevent normal rollover on alphas from accidentally triggering mods. -#define IGNORE_MOD_TAP_INTERRUPT - // Auto Shift and Retro Shift (Auto Shift for Tap Hold). #define AUTO_SHIFT_TIMEOUT TAPPING_TERM diff --git a/keyboards/splitkb/aurora/corne/keymaps/x123/config.h b/keyboards/splitkb/aurora/corne/keymaps/x123/config.h index 12ca322b04..29d2337f10 100644 --- a/keyboards/splitkb/aurora/corne/keymaps/x123/config.h +++ b/keyboards/splitkb/aurora/corne/keymaps/x123/config.h @@ -21,5 +21,4 @@ along with this program. If not, see . #define TAPPING_TOGGLE 1 #define TAPPING_TERM 280 -#define IGNORE_MOD_TAP_INTERRUPT -#define UNICODE_SELECTED_MODES UNICODE_MODE_WINCOMPOSE, UNICODE_MODE_MACOS, UNICODE_MODE_LINUX \ No newline at end of file +#define UNICODE_SELECTED_MODES UNICODE_MODE_WINCOMPOSE, UNICODE_MODE_MACOS, UNICODE_MODE_LINUX diff --git a/keyboards/splitkb/kyria/keymaps/artflag/config.h b/keyboards/splitkb/kyria/keymaps/artflag/config.h index 5607926cd3..de044c8d29 100644 --- a/keyboards/splitkb/kyria/keymaps/artflag/config.h +++ b/keyboards/splitkb/kyria/keymaps/artflag/config.h @@ -18,6 +18,3 @@ #define TAPPING_TERM 175 #define TAPPING_TOGGLE 2 - -// Lets you roll mod-tap keys -#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/splitkb/kyria/keymaps/default/config.h b/keyboards/splitkb/kyria/keymaps/default/config.h index 00be07e2fa..3fcf25be13 100644 --- a/keyboards/splitkb/kyria/keymaps/default/config.h +++ b/keyboards/splitkb/kyria/keymaps/default/config.h @@ -35,5 +35,3 @@ # endif #endif -// Lets you roll mod-tap keys -#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/splitkb/kyria/keymaps/gotham/config.h b/keyboards/splitkb/kyria/keymaps/gotham/config.h index 1b0ba183d0..8feb6042f5 100644 --- a/keyboards/splitkb/kyria/keymaps/gotham/config.h +++ b/keyboards/splitkb/kyria/keymaps/gotham/config.h @@ -17,7 +17,6 @@ #pragma once #define EE_HANDS -#define IGNORE_MOD_TAP_INTERRUPT // Fix for Elite C rev3 #define SPLIT_USB_DETECT diff --git a/keyboards/splitkb/kyria/keymaps/jimmysjolund/config.h b/keyboards/splitkb/kyria/keymaps/jimmysjolund/config.h deleted file mode 100644 index 217e97f931..0000000000 --- a/keyboards/splitkb/kyria/keymaps/jimmysjolund/config.h +++ /dev/null @@ -1,20 +0,0 @@ -/* Copyright 2022 Thomas Baart - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -// Lets you roll mod-tap keys -#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/splitkb/kyria/keymaps/lw/config.h b/keyboards/splitkb/kyria/keymaps/lw/config.h index 6766ab5cdb..efacab2ffe 100644 --- a/keyboards/splitkb/kyria/keymaps/lw/config.h +++ b/keyboards/splitkb/kyria/keymaps/lw/config.h @@ -16,11 +16,8 @@ #pragma once -// Lets you roll mod-tap keys -#define IGNORE_MOD_TAP_INTERRUPT - // If you are using an Elite C rev3 on the slave side, uncomment the lines below: // #define SPLIT_USB_DETECT // #define NO_USB_STARTUP_CHECK -#define UNICODE_SELECTED_MODES UNICODE_MODE_LINUX, UNICODE_MODE_WINCOMPOSE // support for Linux and Windows unicode \ No newline at end of file +#define UNICODE_SELECTED_MODES UNICODE_MODE_LINUX, UNICODE_MODE_WINCOMPOSE // support for Linux and Windows unicode diff --git a/keyboards/splitkb/kyria/keymaps/maherma-adg/config.h b/keyboards/splitkb/kyria/keymaps/maherma-adg/config.h index 1a4c64ed13..e4146661c6 100644 --- a/keyboards/splitkb/kyria/keymaps/maherma-adg/config.h +++ b/keyboards/splitkb/kyria/keymaps/maherma-adg/config.h @@ -33,8 +33,6 @@ # define RGBLIGHT_LIMIT_VAL 150 #endif -// Lets you roll mod-tap keys -#define IGNORE_MOD_TAP_INTERRUPT // If you are using an Elite C rev3 on the slave side, uncomment the lines below: // #define SPLIT_USB_DETECT diff --git a/keyboards/splitkb/kyria/keymaps/muppetjones/config.h b/keyboards/splitkb/kyria/keymaps/muppetjones/config.h index b6351869fe..210beee0ed 100644 --- a/keyboards/splitkb/kyria/keymaps/muppetjones/config.h +++ b/keyboards/splitkb/kyria/keymaps/muppetjones/config.h @@ -39,9 +39,6 @@ // -- defined in user namespace // #define TAPPING_TERM 200 -// Prevent normal rollover on alphas from accidentally triggering mods. -#define IGNORE_MOD_TAP_INTERRUPT - // Enable rapid switch from tap to hold, disables double tap hold auto-repeat. #define QUICK_TAP_TERM 0 diff --git a/keyboards/splitkb/kyria/keymaps/ohlin/config.h b/keyboards/splitkb/kyria/keymaps/ohlin/config.h index 4451ff731c..6e07be170b 100644 --- a/keyboards/splitkb/kyria/keymaps/ohlin/config.h +++ b/keyboards/splitkb/kyria/keymaps/ohlin/config.h @@ -23,7 +23,5 @@ // Configure the global tapping term (default: 200ms) #define TAPPING_TERM 175 -// Prevent normal rollover on alphas from accidentally triggering mods. -#define IGNORE_MOD_TAP_INTERRUPT // Enable rapid switch from tap to hold, disables double tap hold auto-repeat. #define QUICK_TAP_TERM 0 diff --git a/keyboards/splitkb/kyria/keymaps/pierrec83/config.h b/keyboards/splitkb/kyria/keymaps/pierrec83/config.h index b4f3f32255..280e6b1d12 100644 --- a/keyboards/splitkb/kyria/keymaps/pierrec83/config.h +++ b/keyboards/splitkb/kyria/keymaps/pierrec83/config.h @@ -43,7 +43,6 @@ #define TAPPING_TERM 200 #define PERMISSIVE_HOLD -#define IGNORE_MOD_TAP_INTERRUPT #define QUICK_TAP_TERM 0 // Allows to use either side as the master. Look at the documentation for info: // https://docs.qmk.fm/#/config_options?id=setting-handedness diff --git a/keyboards/splitkb/kyria/keymaps/via/config.h b/keyboards/splitkb/kyria/keymaps/via/config.h index f4449ac7a0..9d1c0eee5c 100644 --- a/keyboards/splitkb/kyria/keymaps/via/config.h +++ b/keyboards/splitkb/kyria/keymaps/via/config.h @@ -18,7 +18,6 @@ #define LAYER_STATE_8BIT #define DYNAMIC_KEYMAP_LAYER_COUNT 5 -#define IGNORE_MOD_TAP_INTERRUPT #undef LOCKING_SUPPORT_ENABLE #undef LOCKING_RESYNC_ENABLE diff --git a/keyboards/splitkb/kyria/keymaps/winternebs/config.h b/keyboards/splitkb/kyria/keymaps/winternebs/config.h index f0632e90ae..95e2a04152 100755 --- a/keyboards/splitkb/kyria/keymaps/winternebs/config.h +++ b/keyboards/splitkb/kyria/keymaps/winternebs/config.h @@ -28,4 +28,3 @@ #define NO_ACTION_FUNCTION #define NO_ACTION_ONESHOT #define QUICK_TAP_TERM 0 -#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/splitkb/kyria/keymaps/zigotica/config.h b/keyboards/splitkb/kyria/keymaps/zigotica/config.h index 8c4e8dfece..9376550cab 100644 --- a/keyboards/splitkb/kyria/keymaps/zigotica/config.h +++ b/keyboards/splitkb/kyria/keymaps/zigotica/config.h @@ -23,7 +23,6 @@ along with this program. If not, see . // these should work better for homerow modifiers #define TAPPING_TERM 350 #define PERMISSIVE_HOLD -#define IGNORE_MOD_TAP_INTERRUPT #define QUICK_TAP_TERM 0 #define LEADER_PER_KEY_TIMING diff --git a/keyboards/synapse/keymaps/7u_space/config.h b/keyboards/synapse/keymaps/7u_space/config.h index 0b0e89fa1f..7fdb8504a6 100644 --- a/keyboards/synapse/keymaps/7u_space/config.h +++ b/keyboards/synapse/keymaps/7u_space/config.h @@ -18,7 +18,6 @@ /*Modtaps*/ #define TAPPING_TERM 165 -#define IGNORE_MOD_TAP_INTERRUPT /*Combos*/ #ifdef COMBO_ENABLE diff --git a/keyboards/synapse/keymaps/default/config.h b/keyboards/synapse/keymaps/default/config.h index 0b0e89fa1f..7fdb8504a6 100644 --- a/keyboards/synapse/keymaps/default/config.h +++ b/keyboards/synapse/keymaps/default/config.h @@ -18,7 +18,6 @@ /*Modtaps*/ #define TAPPING_TERM 165 -#define IGNORE_MOD_TAP_INTERRUPT /*Combos*/ #ifdef COMBO_ENABLE diff --git a/keyboards/thevankeyboards/minivan/keymaps/budi/config.h b/keyboards/thevankeyboards/minivan/keymaps/budi/config.h index dc36b73808..e6c4f24877 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/budi/config.h +++ b/keyboards/thevankeyboards/minivan/keymaps/budi/config.h @@ -17,6 +17,5 @@ #define MOUSEKEY_WHEEL_TIME_TO_MAX 120 #define TAPPING_TOGGLE 1 #define TAPPING_TERM 200 -#define IGNORE_MOD_TAP_INTERRUPT #define FORCE_NKRO #endif diff --git a/keyboards/thevankeyboards/minivan/keymaps/hvp/config.h b/keyboards/thevankeyboards/minivan/keymaps/hvp/config.h index cd2aa46c44..8b64f40337 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/hvp/config.h +++ b/keyboards/thevankeyboards/minivan/keymaps/hvp/config.h @@ -1,5 +1,4 @@ #pragma once #define TAPPING_TERM 150 -#define IGNORE_MOD_TAP_INTERRUPT #define PERMISSIVE_HOLD \ No newline at end of file diff --git a/keyboards/thevankeyboards/minivan/keymaps/like_jis/config.h b/keyboards/thevankeyboards/minivan/keymaps/like_jis/config.h index 4c4e6d37b5..910696f86c 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/like_jis/config.h +++ b/keyboards/thevankeyboards/minivan/keymaps/like_jis/config.h @@ -2,7 +2,6 @@ // place overrides here #define TAPPING_TERM 200 -#define IGNORE_MOD_TAP_INTERRUPT #define TAPPING_TERM_PER_KEY #ifdef MOUSEKEY_ENABLE diff --git a/keyboards/tominabox1/le_chiffre/keymaps/default/config.h b/keyboards/tominabox1/le_chiffre/keymaps/default/config.h index ce604301a3..67b668d4bb 100644 --- a/keyboards/tominabox1/le_chiffre/keymaps/default/config.h +++ b/keyboards/tominabox1/le_chiffre/keymaps/default/config.h @@ -15,7 +15,5 @@ */ #pragma once -#define IGNORE_MOD_TAP_INTERRUPT //helps with homerow mods - #define COMBO_COUNT 5 #define COMBO_TERM 30 diff --git a/keyboards/z34/keymaps/zigotica/config.h b/keyboards/z34/keymaps/zigotica/config.h index 545722ebde..9fe28b9675 100644 --- a/keyboards/z34/keymaps/zigotica/config.h +++ b/keyboards/z34/keymaps/zigotica/config.h @@ -22,6 +22,5 @@ along with this program. If not, see . // these should work better for homerow modifiers #define TAPPING_TERM 350 #define PERMISSIVE_HOLD -#define IGNORE_MOD_TAP_INTERRUPT #define QUICK_TAP_TERM 0 diff --git a/layouts/community/ergodox/berfarah/config.h b/layouts/community/ergodox/berfarah/config.h index 0acb95b85f..381b66edf1 100644 --- a/layouts/community/ergodox/berfarah/config.h +++ b/layouts/community/ergodox/berfarah/config.h @@ -6,4 +6,3 @@ #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.4 #define RGBLIGHT_EFFECT_BREATHE_MAX 150 -#undef IGNORE_MOD_TAP_INTERRUPT diff --git a/layouts/community/ergodox/kejadlen/config.h b/layouts/community/ergodox/kejadlen/config.h index 4e554e8a1a..4f14eff96b 100644 --- a/layouts/community/ergodox/kejadlen/config.h +++ b/layouts/community/ergodox/kejadlen/config.h @@ -3,4 +3,3 @@ #define FORCE_NKRO #undef TAPPING_TERM -#undef IGNORE_MOD_TAP_INTERRUPT diff --git a/layouts/community/ortho_4x12/junonum/config.h b/layouts/community/ortho_4x12/junonum/config.h index 91be890a8b..c16d74892d 100644 --- a/layouts/community/ortho_4x12/junonum/config.h +++ b/layouts/community/ortho_4x12/junonum/config.h @@ -38,6 +38,3 @@ // Short tap threshold #define TAPPING_TERM 250 - -// For homerow mods -#define IGNORE_MOD_TAP_INTERRUPT diff --git a/layouts/community/planck_mit/guidoism/config.h b/layouts/community/planck_mit/guidoism/config.h index e22f298035..df53dda471 100644 --- a/layouts/community/planck_mit/guidoism/config.h +++ b/layouts/community/planck_mit/guidoism/config.h @@ -20,5 +20,4 @@ along with this program. If not, see . #pragma once -#define IGNORE_MOD_TAP_INTERRUPT #define USB_MAX_POWER_CONSUMPTION 50 diff --git a/quantum/action.c b/quantum/action.c index a601737376..21fa98dc54 100644 --- a/quantum/action.c +++ b/quantum/action.c @@ -487,7 +487,7 @@ void process_action(keyrecord_t *record, action_t action) { default: if (event.pressed) { if (tap_count > 0) { -# if !defined(IGNORE_MOD_TAP_INTERRUPT) || defined(HOLD_ON_OTHER_KEY_PRESS_PER_KEY) +# ifdef HOLD_ON_OTHER_KEY_PRESS_PER_KEY if ( # ifdef HOLD_ON_OTHER_KEY_PRESS_PER_KEY get_hold_on_other_key_press(get_event_keycode(record->event, false), record) && diff --git a/quantum/action_tapping.c b/quantum/action_tapping.c index 5a38bf96e3..dbb5b8d4e5 100644 --- a/quantum/action_tapping.c +++ b/quantum/action_tapping.c @@ -11,10 +11,8 @@ # if defined(IGNORE_MOD_TAP_INTERRUPT_PER_KEY) # error "IGNORE_MOD_TAP_INTERRUPT_PER_KEY has been removed; the code needs to be ported to use HOLD_ON_OTHER_KEY_PRESS_PER_KEY instead." -# elif !defined(IGNORE_MOD_TAP_INTERRUPT) -# if !defined(PERMISSIVE_HOLD) && !defined(PERMISSIVE_HOLD_PER_KEY) && !defined(HOLD_ON_OTHER_KEY_PRESS) && !defined(HOLD_ON_OTHER_KEY_PRESS_PER_KEY) -# pragma message "The default behavior of mod-taps will change to mimic IGNORE_MOD_TAP_INTERRUPT in the future.\nIf you wish to keep the old default behavior of mod-taps, please use HOLD_ON_OTHER_KEY_PRESS." -# endif +# elif defined(IGNORE_MOD_TAP_INTERRUPT) +# error "IGNORE_MOD_TAP_INTERRUPT is no longer necessary as it is now the default behavior of mod-tap keys. Please remove it from your config." # endif # define IS_TAPPING() IS_EVENT(tapping_key.event) @@ -162,12 +160,6 @@ void action_tapping_process(keyrecord_t record) { # define TAP_GET_HOLD_ON_OTHER_KEY_PRESS false # endif -# if defined(IGNORE_MOD_TAP_INTERRUPT) -# define TAP_GET_IGNORE_MOD_TAP_INTERRUPT true -# else -# define TAP_GET_IGNORE_MOD_TAP_INTERRUPT false -# endif - /** \brief Tapping * * Rule: Tap key is typed(pressed and released) within TAPPING_TERM. @@ -217,9 +209,8 @@ bool process_tapping(keyrecord_t *keyp) { (TAP_IS_MT && TAP_GET_HOLD_ON_OTHER_KEY_PRESS) ) ) - // Makes Retro Shift ignore [IGNORE_MOD_TAP_INTERRUPT's - // effects on nested taps for MTs and the default - // behavior of LTs] below TAPPING_TERM or RETRO_SHIFT. + // Makes Retro Shift ignore the default behavior of + // MTs and LTs on nested taps below TAPPING_TERM or RETRO_SHIFT || ( TAP_IS_RETRO && (event.key.col != tapping_key.event.key.col || event.key.row != tapping_key.event.key.row) diff --git a/quantum/process_keycode/process_auto_shift.c b/quantum/process_keycode/process_auto_shift.c index aad1a164ae..62c347ae0c 100644 --- a/quantum/process_keycode/process_auto_shift.c +++ b/quantum/process_keycode/process_auto_shift.c @@ -400,12 +400,10 @@ bool process_auto_shift(uint16_t keycode, keyrecord_t *record) { // If Retro Shift is disabled, possible custom actions shouldn't happen. // clang-format off # if defined(RETRO_SHIFT) && !defined(NO_ACTION_TAPPING) -# if defined(HOLD_ON_OTHER_KEY_PRESS_PER_KEY) +# ifdef HOLD_ON_OTHER_KEY_PRESS_PER_KEY const bool is_hold_on_interrupt = get_hold_on_other_key_press(keycode, record); -# elif defined(IGNORE_MOD_TAP_INTERRUPT) - const bool is_hold_on_interrupt = false; # else - const bool is_hold_on_interrupt = IS_QK_MOD_TAP(keycode); + const bool is_hold_on_interrupt = false; # endif # endif if (IS_RETRO(keycode) @@ -443,12 +441,8 @@ bool process_auto_shift(uint16_t keycode, keyrecord_t *record) { # endif ) { // Fixes modifiers not being applied to rolls with AUTO_SHIFT_MODIFIERS set. -# if !defined(IGNORE_MOD_TAP_INTERRUPT) || defined(HOLD_ON_OTHER_KEY_PRESS_PER_KEY) - if (autoshift_flags.in_progress -# ifdef HOLD_ON_OTHER_KEY_PRESS_PER_KEY - && get_hold_on_other_key_press(keycode, record) -# endif - ) { +# ifdef HOLD_ON_OTHER_KEY_PRESS_PER_KEY + if (autoshift_flags.in_progress && get_hold_on_other_key_press(keycode, record)) { autoshift_end(KC_NO, now, false, &autoshift_lastrecord); } # endif diff --git a/tests/tap_hold_configurations/default_mod_tap/config.h b/tests/tap_hold_configurations/default_mod_tap/config.h index f22448845e..6d872dd57b 100644 --- a/tests/tap_hold_configurations/default_mod_tap/config.h +++ b/tests/tap_hold_configurations/default_mod_tap/config.h @@ -17,5 +17,3 @@ #pragma once #include "test_common.h" - -#define IGNORE_MOD_TAP_INTERRUPT diff --git a/tests/tap_hold_configurations/quick_tap/test_quick_tap.cpp b/tests/tap_hold_configurations/quick_tap/test_quick_tap.cpp index 8ec6ea62a3..dda58463fb 100644 --- a/tests/tap_hold_configurations/quick_tap/test_quick_tap.cpp +++ b/tests/tap_hold_configurations/quick_tap/test_quick_tap.cpp @@ -27,86 +27,6 @@ using testing::InSequence; class QuickTap : public TestFixture {}; -TEST_F(QuickTap, tap_regular_key_while_mod_tap_key_is_held) { - TestDriver driver; - InSequence s; - auto mod_tap_key = KeymapKey(0, 1, 0, SFT_T(KC_P)); - auto regular_key = KeymapKey(0, 2, 0, KC_A); - - set_keymap({mod_tap_key, regular_key}); - - /* Press mod-tap key. */ - EXPECT_NO_REPORT(driver); - mod_tap_key.press(); - run_one_scan_loop(); - VERIFY_AND_CLEAR(driver); - - /* Press regular key. */ - EXPECT_NO_REPORT(driver); - regular_key.press(); - run_one_scan_loop(); - VERIFY_AND_CLEAR(driver); - - /* Release regular key. */ - EXPECT_NO_REPORT(driver); - regular_key.release(); - run_one_scan_loop(); - VERIFY_AND_CLEAR(driver); - - /* Release mod-tap key. */ - EXPECT_REPORT(driver, (KC_LSFT)); - mod_tap_key.release(); - run_one_scan_loop(); - VERIFY_AND_CLEAR(driver); - - /* Idle for tapping term of mod tap hold key. */ - EXPECT_REPORT(driver, (KC_LSFT, KC_A)); - EXPECT_REPORT(driver, (KC_LSFT)); - EXPECT_EMPTY_REPORT(driver); - idle_for(TAPPING_TERM - 3); - VERIFY_AND_CLEAR(driver); -} - -TEST_F(QuickTap, tap_mod_tap_key_while_mod_tap_key_is_held) { - TestDriver driver; - InSequence s; - auto first_mod_tap_key = KeymapKey(0, 1, 0, SFT_T(KC_P)); - auto second_mod_tap_key = KeymapKey(0, 2, 0, RSFT_T(KC_A)); - - set_keymap({first_mod_tap_key, second_mod_tap_key}); - - /* Press first mod-tap key */ - EXPECT_NO_REPORT(driver); - first_mod_tap_key.press(); - run_one_scan_loop(); - VERIFY_AND_CLEAR(driver); - - /* Press second mod-tap key */ - EXPECT_NO_REPORT(driver); - second_mod_tap_key.press(); - run_one_scan_loop(); - VERIFY_AND_CLEAR(driver); - - /* Release second tap-hold key */ - EXPECT_NO_REPORT(driver); - second_mod_tap_key.release(); - run_one_scan_loop(); - VERIFY_AND_CLEAR(driver); - - /* Release first mod-tap key */ - EXPECT_REPORT(driver, (KC_LSFT)); - first_mod_tap_key.release(); - run_one_scan_loop(); - VERIFY_AND_CLEAR(driver); - - /* Idle for tapping term of first mod-tap key. */ - EXPECT_REPORT(driver, (KC_LSFT, KC_A)); - EXPECT_REPORT(driver, (KC_LSFT)); - EXPECT_EMPTY_REPORT(driver); - idle_for(TAPPING_TERM - 3); - VERIFY_AND_CLEAR(driver); -} - TEST_F(QuickTap, tap_regular_key_while_layer_tap_key_is_held) { TestDriver driver; InSequence s; diff --git a/users/curry/config.h b/users/curry/config.h index d5e1ba7bc5..94e09350cd 100644 --- a/users/curry/config.h +++ b/users/curry/config.h @@ -71,7 +71,6 @@ # define ONESHOT_TIMEOUT 3000 #endif // !ONESHOT_TIMEOUT -#define IGNORE_MOD_TAP_INTERRUPT #undef PERMISSIVE_HOLD #define FORCE_NKRO diff --git a/users/cwebster2/config.h b/users/cwebster2/config.h index 313e6d533f..caee7d184d 100644 --- a/users/cwebster2/config.h +++ b/users/cwebster2/config.h @@ -20,7 +20,6 @@ #define TAPPING_TERM_PER_KEY //#define QUICK_TAP_TERM 0 #undef PERMISSIVE_HOLD -#define IGNORE_MOD_TAP_INTERRUPT #define NO_ACTION_ONESHOT #ifdef AUTO_SHIFT_ENABLE diff --git a/users/drashna/config.h b/users/drashna/config.h index 465ea63ee2..b4aa1283eb 100644 --- a/users/drashna/config.h +++ b/users/drashna/config.h @@ -62,7 +62,6 @@ # define HOLD_ON_OTHER_KEY_PRESS_PER_KEY # define TAPPING_TERM_PER_KEY #else -# define IGNORE_MOD_TAP_INTERRUPT # undef PERMISSIVE_HOLD #endif diff --git a/users/dshields/config.h b/users/dshields/config.h index 279bcf217b..a406ff9330 100644 --- a/users/dshields/config.h +++ b/users/dshields/config.h @@ -4,7 +4,6 @@ #define USB_MAX_POWER_CONSUMPTION 100 #define ONESHOT_TAP_TOGGLE 2 #define ONESHOT_TIMEOUT 3000 -#define IGNORE_MOD_TAP_INTERRUPT #define PERMISSIVE_HOLD_PER_KEY #define QUICK_TAP_TERM_PER_KEY #define TAPPING_TERM 200 diff --git a/users/ericgebhart/config.h b/users/ericgebhart/config.h index 6cd983b37b..fe0f41327d 100644 --- a/users/ericgebhart/config.h +++ b/users/ericgebhart/config.h @@ -44,11 +44,9 @@ #undef TAPPING_TOGGLE #undef TAPPING_TERM -#undef IGNORE_MOD_TAP_INTERRUPT #define TAPPING_TOGGLE 2 #define TAPPING_TERM 200 -#define IGNORE_MOD_TAP_INTERRUPT #define TAP_HOLD_TERM 200 diff --git a/users/ericgebhart/miryoku_hd_gold_config.h b/users/ericgebhart/miryoku_hd_gold_config.h index 8b5d06da3a..9eafdd2a5a 100644 --- a/users/ericgebhart/miryoku_hd_gold_config.h +++ b/users/ericgebhart/miryoku_hd_gold_config.h @@ -56,11 +56,9 @@ #undef TAPPING_TOGGLE #undef TAPPING_TERM -#undef IGNORE_MOD_TAP_INTERRUPT #define TAPPING_TOGGLE 2 #define TAPPING_TERM 200 -#define IGNORE_MOD_TAP_INTERRUPT #define TAP_HOLD_TERM 200 diff --git a/users/ibnuda/config.h b/users/ibnuda/config.h index f9a89389b6..c4fec5bc2d 100644 --- a/users/ibnuda/config.h +++ b/users/ibnuda/config.h @@ -3,5 +3,4 @@ #define COMBO_TERM 50 #define COMBO_COUNT 50 -#define IGNORE_MOD_TAP_INTERRUPT #define PERMISSIVE_HOLD \ No newline at end of file diff --git a/users/jarred/config.h b/users/jarred/config.h index e63ec4d9b7..bea1f48310 100644 --- a/users/jarred/config.h +++ b/users/jarred/config.h @@ -37,12 +37,10 @@ #undef TAPPING_TOGGLE #undef TAPPING_TERM -#undef IGNORE_MOD_TAP_INTERRUPT #define PERMISSIVE_HOLD #define TAPPING_TOGGLE 1 #define TAPPING_TERM 200 -#define IGNORE_MOD_TAP_INTERRUPT #ifdef AUDIO_ENABLE #define STARTUP_SONG SONG(PLANCK_SOUND) diff --git a/users/kuchosauronad0/config.h b/users/kuchosauronad0/config.h index bc0fe67df8..28e41215b9 100644 --- a/users/kuchosauronad0/config.h +++ b/users/kuchosauronad0/config.h @@ -64,11 +64,6 @@ # define FORCE_NKRO #endif // !NKRO_ENABLE -// this makes it possible to do rolling combos (zx) with keys that -// convert to other keys on hold (z becomes ctrl when you hold it, -// and when this option isn't enabled, z rapidly followed by x -// actually sends Ctrl-x. That's bad.) -#define IGNORE_MOD_TAP_INTERRUPT #undef PERMISSIVE_HOLD //#define QUICK_TAP_TERM 0 //#define RETRO_TAPPING diff --git a/users/manna-harbour_miryoku/config.h b/users/manna-harbour_miryoku/config.h index 429e08493d..3656e9eded 100644 --- a/users/manna-harbour_miryoku/config.h +++ b/users/manna-harbour_miryoku/config.h @@ -11,8 +11,6 @@ #undef TAPPING_TERM #define TAPPING_TERM 200 -// Prevent normal rollover on alphas from accidentally triggering mods. -#define IGNORE_MOD_TAP_INTERRUPT // Enable rapid switch from tap to hold, disables double tap hold auto-repeat. #define QUICK_TAP_TERM 0 diff --git a/users/mattly/config.h b/users/mattly/config.h index 0f7ce4a64b..bea04255aa 100644 --- a/users/mattly/config.h +++ b/users/mattly/config.h @@ -1,6 +1,5 @@ #pragma once -#define IGNORE_MOD_TAP_INTERRUPT #define PERMISSIVE_HOLD #define TAPPING_TOGGLE 2 #define TAPPING_TERM 200 diff --git a/users/muppetjones/config.h b/users/muppetjones/config.h index 583567d4f3..cbc318d24f 100644 --- a/users/muppetjones/config.h +++ b/users/muppetjones/config.h @@ -30,9 +30,6 @@ // -- used for tap dance and other tap mods # define TAPPING_TERM 175 -// Prevent normal rollover on alphas from accidentally triggering mods. -# define IGNORE_MOD_TAP_INTERRUPT - // Enable rapid switch from tap to hold, disables double tap hold auto-repeat. # define QUICK_TAP_TERM 0 diff --git a/users/pvinis/config.h b/users/pvinis/config.h index 14ec0dc8f1..01bb47dde1 100644 --- a/users/pvinis/config.h +++ b/users/pvinis/config.h @@ -1,7 +1,5 @@ #pragma once -// allow rolling when keys have hold functionality -#define IGNORE_MOD_TAP_INTERRUPT // #define TAPPING_TERM 150 #if defined(MOUSE_KEYS) diff --git a/users/ridingqwerty/config.h b/users/ridingqwerty/config.h index 291c4877e1..2bb32a0120 100644 --- a/users/ridingqwerty/config.h +++ b/users/ridingqwerty/config.h @@ -8,4 +8,3 @@ #define QUICK_TAP_TERM_PER_KEY // testing #define TAPPING_TERM_PER_KEY -//#define IGNORE_MOD_TAP_INTERRUPT // rolling R3 "zxcv", etc... diff --git a/users/rmeli/config.h b/users/rmeli/config.h index 5c31462d35..c51093ab38 100644 --- a/users/rmeli/config.h +++ b/users/rmeli/config.h @@ -27,10 +27,6 @@ along with this program. If not, see . # define AUTO_SHIFT_REPEAT #endif -#ifdef HOME_ROW_MODS_ENABLED -# define IGNORE_MOD_TAP_INTERRUPT -#endif - #ifdef CAPS_WORD_ENABLE # define BOTH_SHIFTS_TURNS_ON_CAPS_WORD //#define DOUBLE_TAP_SHIFT_TURNS_ON_CAPS_WORD diff --git a/users/snowe/snowe.h b/users/snowe/snowe.h index 6a2fc2aba1..caba9d21bc 100644 --- a/users/snowe/snowe.h +++ b/users/snowe/snowe.h @@ -26,7 +26,6 @@ along with this program. If not, see . #include "wrappers.h" #include "keycode_aliases.h" -#define IGNORE_MOD_TAP_INTERRUPT #undef PERMISSIVE_HOLD //#if defined(RGBLIGHT_ENABLE) diff --git a/users/tominabox1/tominabox1.c b/users/tominabox1/tominabox1.c index 44f4c7795c..2c3c1ac9ff 100644 --- a/users/tominabox1/tominabox1.c +++ b/users/tominabox1/tominabox1.c @@ -100,7 +100,6 @@ tap_dance_action_t tap_dance_actions[] = { }; #define TAPPING_TERM 200 -#define IGNORE_MOD_TAP_INTERRUPT #ifdef KEYBOARD_crkbd_rev1 diff --git a/users/uqs/config.h b/users/uqs/config.h index 455aae9da8..94e50d063b 100644 --- a/users/uqs/config.h +++ b/users/uqs/config.h @@ -16,7 +16,6 @@ #define TAPPING_TERM 170 // ms to trigger tap // https://precondition.github.io/home-row-mods #define QUICK_TAP_TERM 0 // make tap-then-hold _not_ do key auto repeat -#define IGNORE_MOD_TAP_INTERRUPT #define PERMISSIVE_HOLD // I don't think this works for me, hence I rolled my own implementation. #define LEADER_TIMEOUT 400 diff --git a/users/vosechu/config.h b/users/vosechu/config.h index 81d9305d50..7f4f000c41 100644 --- a/users/vosechu/config.h +++ b/users/vosechu/config.h @@ -1,10 +1,5 @@ #pragma once -// this makes it possible to do rolling combos (zx) with keys that -// convert to other keys on hold (z becomes ctrl when you hold it, -// and when this option isn't enabled, z rapidly followed by x -// actually sends Ctrl-x. That's bad.) -#define IGNORE_MOD_TAP_INTERRUPT #undef PERMISSIVE_HOLD //#define QUICK_TAP_TERM 0 //#define RETRO_TAPPING diff --git a/users/wanleg/config.h b/users/wanleg/config.h index d29054694c..984bdf6194 100644 --- a/users/wanleg/config.h +++ b/users/wanleg/config.h @@ -40,10 +40,6 @@ #define PERMISSIVE_HOLD -//// Disable mod tap interrrupt -//#ifndef IGNORE_MOD_TAP_INTERRUPT -//#define IGNORE_MOD_TAP_INTERRUPT -//#endif // !mod tap interrrupt //set max breathing brightness on kbd6x #if defined(KEYBOARD_kbdfans_kbd6x) diff --git a/users/yet-another-developer/config.h b/users/yet-another-developer/config.h index 030872d3dd..e783d08dc5 100644 --- a/users/yet-another-developer/config.h +++ b/users/yet-another-developer/config.h @@ -25,11 +25,6 @@ #define FORCE_NKRO #endif // !NKRO_ENABLE -// this makes it possible to do rolling combos (zx) with keys that -// convert to other keys on hold (z becomes ctrl when you hold it, -// and when this option isn't enabled, z rapidly followed by x -// actually sends Ctrl-x. That's bad.) -#define IGNORE_MOD_TAP_INTERRUPT #undef PERMISSIVE_HOLD //#define QUICK_TAP_TERM 0 //#define RETRO_TAPPING diff --git a/users/zer09/config.h b/users/zer09/config.h index 0324aaa7d3..48dd17dfc3 100644 --- a/users/zer09/config.h +++ b/users/zer09/config.h @@ -1,11 +1,6 @@ #ifndef USERSPACE_CONFIG_H #define USERSPACE_CONFIG_H -// this makes it possible to do rolling combos (zx) with keys that -// convert to other keys on hold (z becomes ctrl when you hold it, -// and when this option isn't enabled, z rapidly followed by x -// actually sends Ctrl-x. That's bad.) -#define IGNORE_MOD_TAP_INTERRUPT #undef PERMISSIVE_HOLD #define STRICT_LAYER_RELEASE -- cgit 1.4.1 From fcf8b804ed95a98561bd4c1d6c85604be0f7cc7b Mon Sep 17 00:00:00 2001 From: Stefan Kerkmann Date: Mon, 3 Apr 2023 10:33:45 +0200 Subject: [Core] Refactor `keyevent_t` for 1ms timing resolution (#15847) --- docs/feature_stenography.md | 2 +- docs/ja/feature_stenography.md | 2 +- keyboards/atlantis/encoder_actions.c | 6 +- keyboards/custommk/evo70/keymaps/via/keymap.c | 16 +-- .../custommk/genesis/rev2/keymaps/via/keymap.c | 22 ++-- keyboards/dailycraft/owl8/keymaps/via/keymap.c | 28 ++--- keyboards/dailycraft/stickey4/keymaps/via/keymap.c | 28 ++--- .../dailycraft/wings42/rev2/keymaps/via/keymap.c | 56 +++++----- keyboards/gl516/n51gl/keymaps/salicylic/keymap.c | 4 +- keyboards/gl516/n51gl/keymaps/via/keymap.c | 4 +- keyboards/jones/v1/keymaps/via/keymap.c | 6 +- keyboards/kabedon/kabedon98e/kabedon98e.c | 6 +- keyboards/keebio/encoder_actions.c | 6 +- keyboards/meletrix/zoom65/zoom65.c | 8 +- .../meletrix/zoom65_lite/keymaps/via/keymap.c | 8 +- keyboards/ml/gas75/keymaps/via/keymap.c | 6 +- keyboards/monarch/keymaps/via/keymap.c | 14 +-- keyboards/mwstudio/alicekk/keymaps/via/keymap.c | 6 +- keyboards/mwstudio/mw75r2/keymaps/via/keymap.c | 6 +- keyboards/nightly_boards/adellein/encoder_action.c | 6 +- keyboards/nightly_boards/n40_o/encoder_action.c | 6 +- keyboards/nightly_boards/n60_s/encoder_action.c | 6 +- keyboards/nightly_boards/octopad/encoder_action.c | 6 +- keyboards/nullbitsco/tidbit/tidbit.c | 8 +- keyboards/rate/pistachio_mp/keymaps/via/keymap.c | 6 +- keyboards/rate/pistachio_pro/keymaps/via/keymap.c | 6 +- keyboards/rgbkb/mun/rev1/rev1.c | 8 +- keyboards/rgbkb/sol3/rev1/rev1.c | 13 +-- keyboards/rmi_kb/chevron/keymaps/via/keymap.c | 14 +-- .../rmi_kb/herringbone/pro/keymaps/via/keymap.c | 16 +-- keyboards/rmi_kb/squishytkl/keymaps/via/keymap.c | 14 +-- keyboards/rmi_kb/wete/v2/keymaps/via/keymap.c | 14 +-- .../krush/krush65/hotswap/encoder_actions.c | 8 +- keyboards/sofle/keymaps/keyhive_via/encoder.c | 5 +- keyboards/stello65/beta/encoder_actions.c | 6 +- keyboards/synthlabs/solo/keymaps/via/keymap.c | 6 +- .../spreadwriter/keymaps/via/keymap.c | 8 +- keyboards/wekey/we27/encoder_actions.c | 6 +- .../winry/winry315/keymaps/via/encoder_actions.c | 3 +- keyboards/wuque/mammoth20x/mammoth20x.c | 8 +- keyboards/wuque/mammoth75x/mammoth75x.c | 9 +- keyboards/wuque/serneity65/serneity65.c | 8 +- keyboards/yandrstudio/nz67v2/keymaps/via/keymap.c | 12 +-- quantum/action_tapping.c | 116 ++++++++++++--------- quantum/encoder.c | 4 +- quantum/keyboard.c | 2 +- quantum/keyboard.h | 59 ++++++----- quantum/process_keycode/process_combo.c | 10 +- quantum/process_keycode/process_steno.c | 6 +- 49 files changed, 360 insertions(+), 273 deletions(-) (limited to 'quantum/process_keycode') diff --git a/docs/feature_stenography.md b/docs/feature_stenography.md index 62d4dabf81..df4c9c6ad3 100644 --- a/docs/feature_stenography.md +++ b/docs/feature_stenography.md @@ -138,7 +138,7 @@ bool post_process_steno_user(uint16_t keycode, keyrecord_t *record, steno_mode_t This function is called after a key has been processed, but before any decision about whether or not to send a chord. This is where to put hooks for things like, say, live displays of steno chords or keys. -If `IS_PRESSED(record->event)` is false, and `n_pressed_keys` is 0 or 1, the chord will be sent shortly, but has not yet been sent. This relieves you of the need of keeping track of where a packet ends and another begins. +If `record->event.pressed` is false, and `n_pressed_keys` is 0 or 1, the chord will be sent shortly, but has not yet been sent. This relieves you of the need of keeping track of where a packet ends and another begins. The `chord` argument contains the packet of the current chord as specified by the protocol in use. This is *NOT* simply a list of chorded steno keys of the form `[STN_E, STN_U, STN_BR, STN_GR]`. Refer to the appropriate protocol section of this document to learn more about the format of the packets in your steno protocol/mode of choice. diff --git a/docs/ja/feature_stenography.md b/docs/ja/feature_stenography.md index b280084ae3..9551221696 100644 --- a/docs/ja/feature_stenography.md +++ b/docs/ja/feature_stenography.md @@ -80,7 +80,7 @@ bool process_steno_user(uint16_t keycode, keyrecord_t *record) { return true; } bool post_process_steno_user(uint16_t keycode, keyrecord_t *record, steno_mode_t mode, uint8_t chord[6], int8_t pressed); ``` -この関数はキーが処理された後、ただしコードを送信するかどうかを決める前に呼び出されます。`IS_PRESSED(record->event)` が false で、`pressed` が 0 または 1 の場合は、コードはまもなく送信されますが、まだ送信されてはいません。ここが速記コードあるいはキーのライブ表示などのフックを配置する場所です。 +この関数はキーが処理された後、ただしコードを送信するかどうかを決める前に呼び出されます。`record->event.pressed` が false で、`pressed` が 0 または 1 の場合は、コードはまもなく送信されますが、まだ送信されてはいません。ここが速記コードあるいはキーのライブ表示などのフックを配置する場所です。 ## キーコードリファレンス :id=keycode-reference diff --git a/keyboards/atlantis/encoder_actions.c b/keyboards/atlantis/encoder_actions.c index 5bfba6d99f..126b665a8e 100644 --- a/keyboards/atlantis/encoder_actions.c +++ b/keyboards/atlantis/encoder_actions.c @@ -28,7 +28,8 @@ void encoder_action_unregister(void) { keyevent_t encoder_event = (keyevent_t) { .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], .pressed = false, - .time = (timer_read() | 1) + .time = timer_read(), + .type = KEY_EVENT }; encoder_state[index] = 0; action_exec(encoder_event); @@ -40,7 +41,8 @@ void encoder_action_register(uint8_t index, bool clockwise) { keyevent_t encoder_event = (keyevent_t) { .key = clockwise ? encoder_cw[index] : encoder_ccw[index], .pressed = true, - .time = (timer_read() | 1) + .time = timer_read(), + .type = KEY_EVENT }; encoder_state[index] = (clockwise ^ 1) | (clockwise << 1); action_exec(encoder_event); diff --git a/keyboards/custommk/evo70/keymaps/via/keymap.c b/keyboards/custommk/evo70/keymaps/via/keymap.c index 74f68590cf..ba0d231118 100644 --- a/keyboards/custommk/evo70/keymaps/via/keymap.c +++ b/keyboards/custommk/evo70/keymaps/via/keymap.c @@ -57,12 +57,14 @@ void set_custom_encoder_mode_user(bool custom_mode) { keyevent_t encoder_ccw = { .key = (keypos_t){.row = 4, .col = 7}, - .pressed = false + .pressed = false, + .type = KEY_EVENT }; keyevent_t encoder_cw = { .key = (keypos_t){.row = 4, .col = 10}, - .pressed = false + .pressed = false, + .type = KEY_EVENT }; @@ -70,12 +72,12 @@ bool encoder_update_user(uint8_t index, bool clockwise) { if (custom_encoder_mode) { if (clockwise) { encoder_cw.pressed = true; - encoder_cw.time = (timer_read() | 1); + encoder_cw.time = timer_read(); action_exec(encoder_cw); } else { encoder_ccw.pressed = true; - encoder_ccw.time = (timer_read() | 1); + encoder_ccw.time = timer_read(); action_exec(encoder_ccw); } return false; @@ -86,13 +88,13 @@ bool encoder_update_user(uint8_t index, bool clockwise) { void matrix_scan_user(void) { if (IS_PRESSED(encoder_ccw)) { encoder_ccw.pressed = false; - encoder_ccw.time = (timer_read() | 1); + encoder_ccw.time = timer_read(); action_exec(encoder_ccw); } if (IS_PRESSED(encoder_cw)) { encoder_cw.pressed = false; - encoder_cw.time = (timer_read() | 1); + encoder_cw.time = timer_read(); action_exec(encoder_cw); } -} \ No newline at end of file +} diff --git a/keyboards/custommk/genesis/rev2/keymaps/via/keymap.c b/keyboards/custommk/genesis/rev2/keymaps/via/keymap.c index eb0f7772cf..f6a3c936df 100644 --- a/keyboards/custommk/genesis/rev2/keymaps/via/keymap.c +++ b/keyboards/custommk/genesis/rev2/keymaps/via/keymap.c @@ -95,46 +95,50 @@ void keyboard_post_init_user(void) { keyevent_t encoder_left_ccw = { .key = (keypos_t){.row = 5, .col = 0}, - .pressed = false + .pressed = false, + .type = KEY_EVENT }; keyevent_t encoder_left_cw = { .key = (keypos_t){.row = 5, .col = 1}, .pressed = false + .type = KEY_EVENT }; keyevent_t encoder_right_ccw = { .key = (keypos_t){.row = 5, .col = 2}, .pressed = false + .type = KEY_EVENT }; keyevent_t encoder_right_cw = { .key = (keypos_t){.row = 5, .col = 3}, .pressed = false + .type = KEY_EVENT }; void matrix_scan_user(void) { if (IS_PRESSED(encoder_left_ccw)) { encoder_left_ccw.pressed = false; - encoder_left_ccw.time = (timer_read() | 1); + encoder_left_ccw.time = timer_read(); action_exec(encoder_left_ccw); } if (IS_PRESSED(encoder_left_cw)) { encoder_left_cw.pressed = false; - encoder_left_cw.time = (timer_read() | 1); + encoder_left_cw.time = timer_read(); action_exec(encoder_left_cw); } if (IS_PRESSED(encoder_right_ccw)) { encoder_right_ccw.pressed = false; - encoder_right_ccw.time = (timer_read() | 1); + encoder_right_ccw.time = timer_read(); action_exec(encoder_right_ccw); } if (IS_PRESSED(encoder_right_cw)) { encoder_right_cw.pressed = false; - encoder_right_cw.time = (timer_read() | 1); + encoder_right_cw.time = timer_read(); action_exec(encoder_right_cw); } @@ -145,21 +149,21 @@ bool encoder_update_user(uint8_t index, bool clockwise) { if (index == 0) { if (clockwise) { encoder_left_cw.pressed = true; - encoder_left_cw.time = (timer_read() | 1); + encoder_left_cw.time = timer_read(); action_exec(encoder_left_cw); } else { encoder_left_ccw.pressed = true; - encoder_left_ccw.time = (timer_read() | 1); + encoder_left_ccw.time = timer_read(); action_exec(encoder_left_ccw); } } else { if (clockwise) { encoder_right_cw.pressed = true; - encoder_right_cw.time = (timer_read() | 1); + encoder_right_cw.time = timer_read(); action_exec(encoder_right_cw); } else { encoder_right_ccw.pressed = true; - encoder_right_ccw.time = (timer_read() | 1); + encoder_right_ccw.time = timer_read(); action_exec(encoder_right_ccw); } } diff --git a/keyboards/dailycraft/owl8/keymaps/via/keymap.c b/keyboards/dailycraft/owl8/keymaps/via/keymap.c index 6e3f6ea90b..667392b946 100644 --- a/keyboards/dailycraft/owl8/keymaps/via/keymap.c +++ b/keyboards/dailycraft/owl8/keymaps/via/keymap.c @@ -52,46 +52,50 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { keyevent_t encoder1_ccw = { .key = (keypos_t){.row = 0, .col = 12}, - .pressed = false + .pressed = false, + .type = KEY_EVENT }; keyevent_t encoder1_cw = { .key = (keypos_t){.row = 0, .col = 13}, - .pressed = false + .pressed = false, + .type = KEY_EVENT }; keyevent_t encoder2_ccw = { .key = (keypos_t){.row = 0, .col = 14}, - .pressed = false + .pressed = false, + .type = KEY_EVENT }; keyevent_t encoder2_cw = { .key = (keypos_t){.row = 0, .col = 15}, - .pressed = false + .pressed = false, + .type = KEY_EVENT }; void matrix_scan_user(void) { if (IS_PRESSED(encoder1_ccw)) { encoder1_ccw.pressed = false; - encoder1_ccw.time = (timer_read() | 1); + encoder1_ccw.time = timer_read(); action_exec(encoder1_ccw); } if (IS_PRESSED(encoder1_cw)) { encoder1_cw.pressed = false; - encoder1_cw.time = (timer_read() | 1); + encoder1_cw.time = timer_read(); action_exec(encoder1_cw); } if (IS_PRESSED(encoder2_ccw)) { encoder2_ccw.pressed = false; - encoder2_ccw.time = (timer_read() | 1); + encoder2_ccw.time = timer_read(); action_exec(encoder2_ccw); } if (IS_PRESSED(encoder2_cw)) { encoder2_cw.pressed = false; - encoder2_cw.time = (timer_read() | 1); + encoder2_cw.time = timer_read(); action_exec(encoder2_cw); } } @@ -100,21 +104,21 @@ bool encoder_update_user(uint8_t index, bool clockwise) { if (index == 0) { /* First encoder */ if (clockwise) { encoder1_cw.pressed = true; - encoder1_cw.time = (timer_read() | 1); + encoder1_cw.time = timer_read(); action_exec(encoder1_cw); } else { encoder1_ccw.pressed = true; - encoder1_ccw.time = (timer_read() | 1); + encoder1_ccw.time = timer_read(); action_exec(encoder1_ccw); } } else if (index == 1) { if (clockwise) { encoder2_cw.pressed = true; - encoder2_cw.time = (timer_read() | 1); + encoder2_cw.time = timer_read(); action_exec(encoder2_cw); } else { encoder2_ccw.pressed = true; - encoder2_ccw.time = (timer_read() | 1); + encoder2_ccw.time = timer_read(); action_exec(encoder2_ccw); } } diff --git a/keyboards/dailycraft/stickey4/keymaps/via/keymap.c b/keyboards/dailycraft/stickey4/keymaps/via/keymap.c index 602d3fb10d..30d8ad188e 100644 --- a/keyboards/dailycraft/stickey4/keymaps/via/keymap.c +++ b/keyboards/dailycraft/stickey4/keymaps/via/keymap.c @@ -44,46 +44,50 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { keyevent_t encoder1_ccw = { .key = (keypos_t){.row = 0, .col = 4}, - .pressed = false + .pressed = false, + .type = KEY_EVENT }; keyevent_t encoder1_cw = { .key = (keypos_t){.row = 0, .col = 5}, - .pressed = false + .pressed = false, + .type = KEY_EVENT }; keyevent_t encoder2_ccw = { .key = (keypos_t){.row = 0, .col = 6}, - .pressed = false + .pressed = false, + .type = KEY_EVENT }; keyevent_t encoder2_cw = { .key = (keypos_t){.row = 0, .col = 7}, - .pressed = false + .pressed = false, + .type = KEY_EVENT }; void matrix_scan_user(void) { if (IS_PRESSED(encoder1_ccw)) { encoder1_ccw.pressed = false; - encoder1_ccw.time = (timer_read() | 1); + encoder1_ccw.time = timer_read(); action_exec(encoder1_ccw); } if (IS_PRESSED(encoder1_cw)) { encoder1_cw.pressed = false; - encoder1_cw.time = (timer_read() | 1); + encoder1_cw.time = timer_read(); action_exec(encoder1_cw); } if (IS_PRESSED(encoder2_ccw)) { encoder2_ccw.pressed = false; - encoder2_ccw.time = (timer_read() | 1); + encoder2_ccw.time = timer_read(); action_exec(encoder2_ccw); } if (IS_PRESSED(encoder2_cw)) { encoder2_cw.pressed = false; - encoder2_cw.time = (timer_read() | 1); + encoder2_cw.time = timer_read(); action_exec(encoder2_cw); } } @@ -92,21 +96,21 @@ bool encoder_update_user(uint8_t index, bool clockwise) { if (index == 0) { /* First encoder */ if (clockwise) { encoder1_cw.pressed = true; - encoder1_cw.time = (timer_read() | 1); + encoder1_cw.time = timer_read(); action_exec(encoder1_cw); } else { encoder1_ccw.pressed = true; - encoder1_ccw.time = (timer_read() | 1); + encoder1_ccw.time = timer_read(); action_exec(encoder1_ccw); } } else if (index == 1) { if (clockwise) { encoder2_cw.pressed = true; - encoder2_cw.time = (timer_read() | 1); + encoder2_cw.time = timer_read(); action_exec(encoder2_cw); } else { encoder2_ccw.pressed = true; - encoder2_ccw.time = (timer_read() | 1); + encoder2_ccw.time = timer_read(); action_exec(encoder2_ccw); } } diff --git a/keyboards/dailycraft/wings42/rev2/keymaps/via/keymap.c b/keyboards/dailycraft/wings42/rev2/keymaps/via/keymap.c index 97f94366a8..5655d2ca48 100644 --- a/keyboards/dailycraft/wings42/rev2/keymaps/via/keymap.c +++ b/keyboards/dailycraft/wings42/rev2/keymaps/via/keymap.c @@ -82,91 +82,99 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { keyevent_t encoder1_ccw = { .key = (keypos_t){.row = 4, .col = 0}, - .pressed = false + .pressed = false, + .type = KEY_EVENT }; keyevent_t encoder1_cw = { .key = (keypos_t){.row = 4, .col = 1}, - .pressed = false + .pressed = false, + .type = KEY_EVENT }; keyevent_t encoder2_ccw = { .key = (keypos_t){.row = 4, .col = 2}, - .pressed = false + .pressed = false, + .type = KEY_EVENT }; keyevent_t encoder2_cw = { .key = (keypos_t){.row = 4, .col = 3}, - .pressed = false + .pressed = false, + .type = KEY_EVENT }; keyevent_t encoder3_ccw = { .key = (keypos_t){.row = 9, .col = 1}, - .pressed = false + .pressed = false, + .type = KEY_EVENT }; keyevent_t encoder3_cw = { .key = (keypos_t){.row = 9, .col = 0}, - .pressed = false + .pressed = false, + .type = KEY_EVENT }; keyevent_t encoder4_ccw = { .key = (keypos_t){.row = 9, .col = 3}, - .pressed = false + .pressed = false, + .type = KEY_EVENT }; keyevent_t encoder4_cw = { .key = (keypos_t){.row = 9, .col = 2}, - .pressed = false + .pressed = false, + .type = KEY_EVENT }; void matrix_scan_user(void) { if (IS_PRESSED(encoder1_ccw)) { encoder1_ccw.pressed = false; - encoder1_ccw.time = (timer_read() | 1); + encoder1_ccw.time = timer_read(); action_exec(encoder1_ccw); } if (IS_PRESSED(encoder1_cw)) { encoder1_cw.pressed = false; - encoder1_cw.time = (timer_read() | 1); + encoder1_cw.time = timer_read(); action_exec(encoder1_cw); } if (IS_PRESSED(encoder2_ccw)) { encoder2_ccw.pressed = false; - encoder2_ccw.time = (timer_read() | 1); + encoder2_ccw.time = timer_read(); action_exec(encoder2_ccw); } if (IS_PRESSED(encoder2_cw)) { encoder2_cw.pressed = false; - encoder2_cw.time = (timer_read() | 1); + encoder2_cw.time = timer_read(); action_exec(encoder2_cw); } if (IS_PRESSED(encoder3_ccw)) { encoder3_ccw.pressed = false; - encoder3_ccw.time = (timer_read() | 1); + encoder3_ccw.time = timer_read(); action_exec(encoder3_ccw); } if (IS_PRESSED(encoder3_cw)) { encoder3_cw.pressed = false; - encoder3_cw.time = (timer_read() | 1); + encoder3_cw.time = timer_read(); action_exec(encoder3_cw); } if (IS_PRESSED(encoder4_ccw)) { encoder4_ccw.pressed = false; - encoder4_ccw.time = (timer_read() | 1); + encoder4_ccw.time = timer_read(); action_exec(encoder4_ccw); } if (IS_PRESSED(encoder4_cw)) { encoder4_cw.pressed = false; - encoder4_cw.time = (timer_read() | 1); + encoder4_cw.time = timer_read(); action_exec(encoder4_cw); } } @@ -175,41 +183,41 @@ bool encoder_update_user(uint8_t index, bool clockwise) { if (index == 0) { if (clockwise) { encoder1_cw.pressed = true; - encoder1_cw.time = (timer_read() | 1); + encoder1_cw.time = timer_read(); action_exec(encoder1_cw); } else { encoder1_ccw.pressed = true; - encoder1_ccw.time = (timer_read() | 1); + encoder1_ccw.time = timer_read(); action_exec(encoder1_ccw); } } else if (index == 1) { if (clockwise) { encoder2_cw.pressed = true; - encoder2_cw.time = (timer_read() | 1); + encoder2_cw.time = timer_read(); action_exec(encoder2_cw); } else { encoder2_ccw.pressed = true; - encoder2_ccw.time = (timer_read() | 1); + encoder2_ccw.time = timer_read(); action_exec(encoder2_ccw); } } else if (index == 2) { if (clockwise) { encoder3_cw.pressed = true; - encoder3_cw.time = (timer_read() | 1); + encoder3_cw.time = timer_read(); action_exec(encoder3_cw); } else { encoder3_ccw.pressed = true; - encoder3_ccw.time = (timer_read() | 1); + encoder3_ccw.time = timer_read(); action_exec(encoder3_ccw); } } else if (index == 3) { if (clockwise) { encoder4_cw.pressed = true; - encoder4_cw.time = (timer_read() | 1); + encoder4_cw.time = timer_read(); action_exec(encoder4_cw); } else { encoder4_ccw.pressed = true; - encoder4_ccw.time = (timer_read() | 1); + encoder4_ccw.time = timer_read(); action_exec(encoder4_ccw); } } diff --git a/keyboards/gl516/n51gl/keymaps/salicylic/keymap.c b/keyboards/gl516/n51gl/keymaps/salicylic/keymap.c index 42b2204cf1..81f7b8665f 100644 --- a/keyboards/gl516/n51gl/keymaps/salicylic/keymap.c +++ b/keyboards/gl516/n51gl/keymaps/salicylic/keymap.c @@ -111,7 +111,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { key.row = 1; key.col = 0; } - action_exec((keyevent_t){.key = key, .pressed = true, .time = (timer_read() | 1)}); - action_exec((keyevent_t){.key = key, .pressed = false, .time = (timer_read() | 1)}); + action_exec(MAKE_KEYEVENT(key.row, key.col, true)); + action_exec(MAKE_KEYEVENT(key.row, key.col, false)); return true; } diff --git a/keyboards/gl516/n51gl/keymaps/via/keymap.c b/keyboards/gl516/n51gl/keymaps/via/keymap.c index a44392124c..cf1aa7d595 100644 --- a/keyboards/gl516/n51gl/keymaps/via/keymap.c +++ b/keyboards/gl516/n51gl/keymaps/via/keymap.c @@ -96,7 +96,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { key.row = 1; key.col = 0; } - action_exec((keyevent_t){.key = key, .pressed = true, .time = (timer_read() | 1)}); - action_exec((keyevent_t){.key = key, .pressed = false, .time = (timer_read() | 1)}); + action_exec(MAKE_KEYEVENT(key.row, key.col, true)); + action_exec(MAKE_KEYEVENT(key.row, key.col, false)); return true; } diff --git a/keyboards/jones/v1/keymaps/via/keymap.c b/keyboards/jones/v1/keymaps/via/keymap.c index 3304b13700..3b41c40174 100644 --- a/keyboards/jones/v1/keymaps/via/keymap.c +++ b/keyboards/jones/v1/keymaps/via/keymap.c @@ -178,7 +178,8 @@ void encoder_action_unregister(void) { keyevent_t encoder_event = (keyevent_t) { .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], .pressed = false, - .time = (timer_read() | 1) + .time = timer_read(), + .type = KEY_EVENT }; encoder_state[index] = 0; action_exec(encoder_event); @@ -190,7 +191,8 @@ void encoder_action_register(uint8_t index, bool clockwise) { keyevent_t encoder_event = (keyevent_t) { .key = clockwise ? encoder_cw[index] : encoder_ccw[index], .pressed = true, - .time = (timer_read() | 1) + .time = timer_read(), + .type = KEY_EVENT }; encoder_state[index] = (clockwise ^ 1) | (clockwise << 1); action_exec(encoder_event); diff --git a/keyboards/kabedon/kabedon98e/kabedon98e.c b/keyboards/kabedon/kabedon98e/kabedon98e.c index 7ca156eab9..6984790006 100644 --- a/keyboards/kabedon/kabedon98e/kabedon98e.c +++ b/keyboards/kabedon/kabedon98e/kabedon98e.c @@ -25,7 +25,8 @@ void encoder_action_unregister(void) { keyevent_t encoder_event = (keyevent_t) { .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], .pressed = false, - .time = (timer_read() | 1) + .time = timer_read(), + .type = KEY_EVENT }; encoder_state[index] = 0; action_exec(encoder_event); @@ -37,7 +38,8 @@ void encoder_action_register(uint8_t index, bool clockwise) { keyevent_t encoder_event = (keyevent_t) { .key = clockwise ? encoder_cw[index] : encoder_ccw[index], .pressed = true, - .time = (timer_read() | 1) + .time = timer_read(), + .type = KEY_EVENT }; encoder_state[index] = (clockwise ^ 1) | (clockwise << 1); action_exec(encoder_event); diff --git a/keyboards/keebio/encoder_actions.c b/keyboards/keebio/encoder_actions.c index ead941469a..b02881de5f 100644 --- a/keyboards/keebio/encoder_actions.c +++ b/keyboards/keebio/encoder_actions.c @@ -28,7 +28,8 @@ void encoder_action_unregister(void) { keyevent_t encoder_event = (keyevent_t) { .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], .pressed = false, - .time = (timer_read() | 1) + .time = timer_read(), + .type = KEY_EVENT }; encoder_state[index] = 0; action_exec(encoder_event); @@ -40,7 +41,8 @@ void encoder_action_register(uint8_t index, bool clockwise) { keyevent_t encoder_event = (keyevent_t) { .key = clockwise ? encoder_cw[index] : encoder_ccw[index], .pressed = true, - .time = (timer_read() | 1) + .time = timer_read(), + .type = KEY_EVENT }; encoder_state[index] = (clockwise ^ 1) | (clockwise << 1); action_exec(encoder_event); diff --git a/keyboards/meletrix/zoom65/zoom65.c b/keyboards/meletrix/zoom65/zoom65.c index ff27a4442f..7e8c6511bb 100644 --- a/keyboards/meletrix/zoom65/zoom65.c +++ b/keyboards/meletrix/zoom65/zoom65.c @@ -30,7 +30,9 @@ void encoder_action_unregister(void) keyevent_t encoder_event = (keyevent_t){ .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], .pressed = false, - .time = (timer_read() | 1)}; + .time = timer_read(), + .type = KEY_EVENT + }; encoder_state[index] = 0; action_exec(encoder_event); } @@ -41,7 +43,9 @@ void encoder_action_register(uint8_t index, bool clockwise) keyevent_t encoder_event = (keyevent_t){ .key = clockwise ? encoder_cw[index] : encoder_ccw[index], .pressed = true, - .time = (timer_read() | 1)}; + .time = timer_read(), + .type = KEY_EVENT + }; encoder_state[index] = (clockwise ^ 1) | (clockwise << 1); action_exec(encoder_event); } diff --git a/keyboards/meletrix/zoom65_lite/keymaps/via/keymap.c b/keyboards/meletrix/zoom65_lite/keymaps/via/keymap.c index 23729b4349..4adfaba69d 100644 --- a/keyboards/meletrix/zoom65_lite/keymaps/via/keymap.c +++ b/keyboards/meletrix/zoom65_lite/keymaps/via/keymap.c @@ -29,7 +29,9 @@ void encoder_action_unregister(void) keyevent_t encoder_event = (keyevent_t){ .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], .pressed = false, - .time = (timer_read() | 1)}; + .time = timer_read(), + .type = KEY_EVENT + }; encoder_state[index] = 0; action_exec(encoder_event); } @@ -40,7 +42,9 @@ void encoder_action_register(uint8_t index, bool clockwise) keyevent_t encoder_event = (keyevent_t){ .key = clockwise ? encoder_cw[index] : encoder_ccw[index], .pressed = true, - .time = (timer_read() | 1)}; + .time = timer_read(), + .type = KEY_EVENT + }; encoder_state[index] = (clockwise ^ 1) | (clockwise << 1); action_exec(encoder_event); } diff --git a/keyboards/ml/gas75/keymaps/via/keymap.c b/keyboards/ml/gas75/keymaps/via/keymap.c index b5e3055427..615e36557a 100644 --- a/keyboards/ml/gas75/keymaps/via/keymap.c +++ b/keyboards/ml/gas75/keymaps/via/keymap.c @@ -169,7 +169,8 @@ void encoder_action_unregister(void) { keyevent_t encoder_event = (keyevent_t) { .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], .pressed = false, - .time = (timer_read() | 1) + .time = timer_read(), + .type = KEY_EVENT }; encoder_state[index] = 0; action_exec(encoder_event); @@ -181,7 +182,8 @@ void encoder_action_register(uint8_t index, bool clockwise) { keyevent_t encoder_event = (keyevent_t) { .key = clockwise ? encoder_cw[index] : encoder_ccw[index], .pressed = true, - .time = (timer_read() | 1) + .time = timer_read(), + .type = KEY_EVENT }; encoder_state[index] = (clockwise ^ 1) | (clockwise << 1); action_exec(encoder_event); diff --git a/keyboards/monarch/keymaps/via/keymap.c b/keyboards/monarch/keymaps/via/keymap.c index b1b86aa015..9fded17e9e 100644 --- a/keyboards/monarch/keymaps/via/keymap.c +++ b/keyboards/monarch/keymaps/via/keymap.c @@ -54,24 +54,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { keyevent_t encoder_ccw = { .key = (keypos_t){.row = 5, .col = 0}, - .pressed = false + .pressed = false, + .type = KEY_EVENT }; keyevent_t encoder_cw = { .key = (keypos_t){.row = 5, .col = 1}, - .pressed = false + .pressed = false, + .type = KEY_EVENT }; void matrix_scan_user(void) { if (IS_PRESSED(encoder_ccw)) { encoder_ccw.pressed = false; - encoder_ccw.time = (timer_read() | 1); + encoder_ccw.time = timer_read(); action_exec(encoder_ccw); } if (IS_PRESSED(encoder_cw)) { encoder_cw.pressed = false; - encoder_cw.time = (timer_read() | 1); + encoder_cw.time = timer_read(); action_exec(encoder_cw); } } @@ -79,11 +81,11 @@ void matrix_scan_user(void) { bool encoder_update_user(uint8_t index, bool clockwise) { if (clockwise) { encoder_cw.pressed = true; - encoder_cw.time = (timer_read() | 1); + encoder_cw.time = timer_read(); action_exec(encoder_cw); } else { encoder_ccw.pressed = true; - encoder_ccw.time = (timer_read() | 1); + encoder_ccw.time = timer_read(); action_exec(encoder_ccw); } return true; diff --git a/keyboards/mwstudio/alicekk/keymaps/via/keymap.c b/keyboards/mwstudio/alicekk/keymaps/via/keymap.c index 6c21e053fa..92e893d5c5 100644 --- a/keyboards/mwstudio/alicekk/keymaps/via/keymap.c +++ b/keyboards/mwstudio/alicekk/keymaps/via/keymap.c @@ -63,7 +63,8 @@ void encoder_action_unregister(void) { keyevent_t encoder_event = (keyevent_t) { .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], .pressed = false, - .time = (timer_read() | 1) + .time = timer_read(), + .type = KEY_EVENT }; encoder_state[index] = 0; action_exec(encoder_event); @@ -75,7 +76,8 @@ void encoder_action_register(uint8_t index, bool clockwise) { keyevent_t encoder_event = (keyevent_t) { .key = clockwise ? encoder_cw[index] : encoder_ccw[index], .pressed = true, - .time = (timer_read() | 1) + .time = timer_read(), + .type = KEY_EVENT }; encoder_state[index] = (clockwise ^ 1) | (clockwise << 1); action_exec(encoder_event); diff --git a/keyboards/mwstudio/mw75r2/keymaps/via/keymap.c b/keyboards/mwstudio/mw75r2/keymaps/via/keymap.c index 7b7e1877f5..633629abc7 100644 --- a/keyboards/mwstudio/mw75r2/keymaps/via/keymap.c +++ b/keyboards/mwstudio/mw75r2/keymaps/via/keymap.c @@ -115,7 +115,8 @@ void encoder_action_unregister(void) { keyevent_t encoder_event = (keyevent_t) { .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], .pressed = false, - .time = (timer_read() | 1) + .time = timer_read(), + .type = KEY_EVENT }; encoder_state[index] = 0; action_exec(encoder_event); @@ -127,7 +128,8 @@ void encoder_action_register(uint8_t index, bool clockwise) { keyevent_t encoder_event = (keyevent_t) { .key = clockwise ? encoder_cw[index] : encoder_ccw[index], .pressed = true, - .time = (timer_read() | 1) + .time = timer_read(), + .type = KEY_EVENT }; encoder_state[index] = (clockwise ^ 1) | (clockwise << 1); action_exec(encoder_event); diff --git a/keyboards/nightly_boards/adellein/encoder_action.c b/keyboards/nightly_boards/adellein/encoder_action.c index 6b553d3969..522fb58d5a 100644 --- a/keyboards/nightly_boards/adellein/encoder_action.c +++ b/keyboards/nightly_boards/adellein/encoder_action.c @@ -26,7 +26,8 @@ void encoder_action_unregister(void) { keyevent_t encoder_event = (keyevent_t) { .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], .pressed = false, - .time = (timer_read() | 1) + .time = timer_read(), + .type = KEY_EVENT }; encoder_state[index] = 0; action_exec(encoder_event); @@ -38,7 +39,8 @@ void encoder_action_register(uint8_t index, bool clockwise) { keyevent_t encoder_event = (keyevent_t) { .key = clockwise ? encoder_cw[index] : encoder_ccw[index], .pressed = true, - .time = (timer_read() | 1) + .time = timer_read(), + .type = KEY_EVENT }; encoder_state[index] = (clockwise ^ 1) | (clockwise << 1); action_exec(encoder_event); diff --git a/keyboards/nightly_boards/n40_o/encoder_action.c b/keyboards/nightly_boards/n40_o/encoder_action.c index 6b553d3969..522fb58d5a 100644 --- a/keyboards/nightly_boards/n40_o/encoder_action.c +++ b/keyboards/nightly_boards/n40_o/encoder_action.c @@ -26,7 +26,8 @@ void encoder_action_unregister(void) { keyevent_t encoder_event = (keyevent_t) { .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], .pressed = false, - .time = (timer_read() | 1) + .time = timer_read(), + .type = KEY_EVENT }; encoder_state[index] = 0; action_exec(encoder_event); @@ -38,7 +39,8 @@ void encoder_action_register(uint8_t index, bool clockwise) { keyevent_t encoder_event = (keyevent_t) { .key = clockwise ? encoder_cw[index] : encoder_ccw[index], .pressed = true, - .time = (timer_read() | 1) + .time = timer_read(), + .type = KEY_EVENT }; encoder_state[index] = (clockwise ^ 1) | (clockwise << 1); action_exec(encoder_event); diff --git a/keyboards/nightly_boards/n60_s/encoder_action.c b/keyboards/nightly_boards/n60_s/encoder_action.c index 6b553d3969..522fb58d5a 100644 --- a/keyboards/nightly_boards/n60_s/encoder_action.c +++ b/keyboards/nightly_boards/n60_s/encoder_action.c @@ -26,7 +26,8 @@ void encoder_action_unregister(void) { keyevent_t encoder_event = (keyevent_t) { .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], .pressed = false, - .time = (timer_read() | 1) + .time = timer_read(), + .type = KEY_EVENT }; encoder_state[index] = 0; action_exec(encoder_event); @@ -38,7 +39,8 @@ void encoder_action_register(uint8_t index, bool clockwise) { keyevent_t encoder_event = (keyevent_t) { .key = clockwise ? encoder_cw[index] : encoder_ccw[index], .pressed = true, - .time = (timer_read() | 1) + .time = timer_read(), + .type = KEY_EVENT }; encoder_state[index] = (clockwise ^ 1) | (clockwise << 1); action_exec(encoder_event); diff --git a/keyboards/nightly_boards/octopad/encoder_action.c b/keyboards/nightly_boards/octopad/encoder_action.c index 6b553d3969..522fb58d5a 100644 --- a/keyboards/nightly_boards/octopad/encoder_action.c +++ b/keyboards/nightly_boards/octopad/encoder_action.c @@ -26,7 +26,8 @@ void encoder_action_unregister(void) { keyevent_t encoder_event = (keyevent_t) { .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], .pressed = false, - .time = (timer_read() | 1) + .time = timer_read(), + .type = KEY_EVENT }; encoder_state[index] = 0; action_exec(encoder_event); @@ -38,7 +39,8 @@ void encoder_action_register(uint8_t index, bool clockwise) { keyevent_t encoder_event = (keyevent_t) { .key = clockwise ? encoder_cw[index] : encoder_ccw[index], .pressed = true, - .time = (timer_read() | 1) + .time = timer_read(), + .type = KEY_EVENT }; encoder_state[index] = (clockwise ^ 1) | (clockwise << 1); action_exec(encoder_event); diff --git a/keyboards/nullbitsco/tidbit/tidbit.c b/keyboards/nullbitsco/tidbit/tidbit.c index 356c580342..d07ba12651 100644 --- a/keyboards/nullbitsco/tidbit/tidbit.c +++ b/keyboards/nullbitsco/tidbit/tidbit.c @@ -85,15 +85,11 @@ bool oled_task_kb(void) { #endif static void process_encoder_matrix(encodermap_t pos) { - action_exec((keyevent_t){ - .key = (keypos_t){.row = pos.r, .col = pos.c}, .pressed = true, .time = (timer_read() | 1) /* time should not be 0 */ - }); + action_exec(MAKE_KEYEVENT(pos.r, pos.c, true)); #if TAP_CODE_DELAY > 0 wait_ms(TAP_CODE_DELAY); #endif - action_exec((keyevent_t){ - .key = (keypos_t){.row = pos.r, .col = pos.c}, .pressed = false, .time = (timer_read() | 1) /* time should not be 0 */ - }); + action_exec(MAKE_KEYEVENT(pos.r, pos.c, false)); } bool encoder_update_kb(uint8_t index, bool clockwise) { diff --git a/keyboards/rate/pistachio_mp/keymaps/via/keymap.c b/keyboards/rate/pistachio_mp/keymaps/via/keymap.c index 293da4f569..bee139ac93 100644 --- a/keyboards/rate/pistachio_mp/keymaps/via/keymap.c +++ b/keyboards/rate/pistachio_mp/keymaps/via/keymap.c @@ -87,7 +87,8 @@ void encoder_action_unregister(void) { keyevent_t encoder_event = (keyevent_t) { .key = encoder_state >> 1 ? ENC_CW : ENC_CCW, .pressed = false, - .time = (timer_read() | 1) + .time = timer_read(), + .type = KEY_EVENT }; encoder_state = 0; action_exec(encoder_event); @@ -99,7 +100,8 @@ void encoder_action_register(uint8_t index, bool clockwise) { keyevent_t encoder_event = (keyevent_t) { .key = clockwise ? ENC_CW : ENC_CCW, .pressed = true, - .time = (timer_read() | 1) + .time = timer_read() + .type = KEY_EVENT }; encoder_state = (clockwise ^ 1) | (clockwise << 1); action_exec(encoder_event); diff --git a/keyboards/rate/pistachio_pro/keymaps/via/keymap.c b/keyboards/rate/pistachio_pro/keymaps/via/keymap.c index 3e390d442f..b5b8e3c440 100644 --- a/keyboards/rate/pistachio_pro/keymaps/via/keymap.c +++ b/keyboards/rate/pistachio_pro/keymaps/via/keymap.c @@ -135,7 +135,8 @@ void encoder_action_unregister(void) { keyevent_t encoder_event = (keyevent_t) { .key = encoder_state >> 1 ? ENC_CW : ENC_CCW, .pressed = false, - .time = (timer_read() | 1) + .time = timer_read(), + .type = KEY_EVENT }; encoder_state = 0; action_exec(encoder_event); @@ -146,7 +147,8 @@ void encoder_action_register(uint8_t index, bool clockwise) { keyevent_t encoder_event = (keyevent_t) { .key = clockwise ? ENC_CW : ENC_CCW, .pressed = true, - .time = (timer_read() | 1) + .time = timer_read(), + .type = KEY_EVENT }; encoder_state = (clockwise ^ 1) | (clockwise << 1); action_exec(encoder_event); diff --git a/keyboards/rgbkb/mun/rev1/rev1.c b/keyboards/rgbkb/mun/rev1/rev1.c index c7604510da..564ce4dfb9 100644 --- a/keyboards/rgbkb/mun/rev1/rev1.c +++ b/keyboards/rgbkb/mun/rev1/rev1.c @@ -37,15 +37,11 @@ const encodermap_t touch_encoder_map[NUMBER_OF_TOUCH_ENCODERS][TOUCH_ENCODER_OPT }; static void process_encoder_matrix(encodermap_t pos) { - action_exec((keyevent_t){ - .key = (keypos_t){.row = pos.r, .col = pos.c}, .pressed = true, .time = (timer_read() | 1) /* time should not be 0 */ - }); + action_exec(MAKE_KEYEVENT(pos.r, pos.c, true)); #if TAP_CODE_DELAY > 0 wait_ms(TAP_CODE_DELAY); #endif - action_exec((keyevent_t){ - .key = (keypos_t){.row = pos.r, .col = pos.c}, .pressed = false, .time = (timer_read() | 1) /* time should not be 0 */ - }); + action_exec(MAKE_KEYEVENT(pos.r, pos.c, false)); } bool encoder_update_kb(uint8_t index, bool clockwise) { diff --git a/keyboards/rgbkb/sol3/rev1/rev1.c b/keyboards/rgbkb/sol3/rev1/rev1.c index de5836e061..ff330a83d6 100644 --- a/keyboards/rgbkb/sol3/rev1/rev1.c +++ b/keyboards/rgbkb/sol3/rev1/rev1.c @@ -57,10 +57,7 @@ bool dip_switch_update_kb(uint8_t index, bool active) { } case 1: { // Handle RGB Encoder switch press - action_exec((keyevent_t){ - .key = (keypos_t){.row = isLeftHand ? 4 : 10, .col = 6}, - .pressed = active, .time = (timer_read() | 1) /* time should not be 0 */ - }); + action_exec(MAKE_KEYEVENT(isLeftHand ? 4 : 10, 6, active)); break; } } @@ -68,15 +65,11 @@ bool dip_switch_update_kb(uint8_t index, bool active) { } static void process_encoder_matrix(encodermap_t pos) { - action_exec((keyevent_t){ - .key = (keypos_t){.row = pos.r, .col = pos.c}, .pressed = true, .time = (timer_read() | 1) /* time should not be 0 */ - }); + action_exec(MAKE_KEYEVENT(pos.r, pos.c, true)); #if TAP_CODE_DELAY > 0 wait_ms(TAP_CODE_DELAY); #endif - action_exec((keyevent_t){ - .key = (keypos_t){.row = pos.r, .col = pos.c}, .pressed = false, .time = (timer_read() | 1) /* time should not be 0 */ - }); + action_exec(MAKE_KEYEVENT(pos.r, pos.c, false)); } bool encoder_update_kb(uint8_t index, bool clockwise) { diff --git a/keyboards/rmi_kb/chevron/keymaps/via/keymap.c b/keyboards/rmi_kb/chevron/keymaps/via/keymap.c index 190a39e257..4dd5f34817 100644 --- a/keyboards/rmi_kb/chevron/keymaps/via/keymap.c +++ b/keyboards/rmi_kb/chevron/keymaps/via/keymap.c @@ -48,24 +48,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { keyevent_t encoder_ccw = { .key = (keypos_t){.row = 4, .col = 0}, - .pressed = false + .pressed = false, + .type = KEY_EVENT }; keyevent_t encoder_cw = { .key = (keypos_t){.row = 4, .col = 1}, - .pressed = false + .pressed = false, + .type = KEY_EVENT }; void matrix_scan_user(void) { if (IS_PRESSED(encoder_ccw)) { encoder_ccw.pressed = false; - encoder_ccw.time = (timer_read() | 1); + encoder_ccw.time = timer_read(); action_exec(encoder_ccw); } if (IS_PRESSED(encoder_cw)) { encoder_cw.pressed = false; - encoder_cw.time = (timer_read() | 1); + encoder_cw.time = timer_read(); action_exec(encoder_cw); } } @@ -73,12 +75,12 @@ void matrix_scan_user(void) { bool encoder_update_user(uint8_t index, bool clockwise) { if (clockwise) { encoder_cw.pressed = true; - encoder_cw.time = (timer_read() | 1); + encoder_cw.time = timer_read(); action_exec(encoder_cw); wait_ms(20); } else { encoder_ccw.pressed = true; - encoder_ccw.time = (timer_read() | 1); + encoder_ccw.time = timer_read(); action_exec(encoder_ccw); wait_ms(20); } diff --git a/keyboards/rmi_kb/herringbone/pro/keymaps/via/keymap.c b/keyboards/rmi_kb/herringbone/pro/keymaps/via/keymap.c index 71622cddcf..fa85436e48 100644 --- a/keyboards/rmi_kb/herringbone/pro/keymaps/via/keymap.c +++ b/keyboards/rmi_kb/herringbone/pro/keymaps/via/keymap.c @@ -54,24 +54,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { keyevent_t encoder_ccw = { .key = (keypos_t){.row = 6, .col = 0}, - .pressed = false -}; + .pressed = false, + .type = KEY_EVENT + }; keyevent_t encoder_cw = { .key = (keypos_t){.row = 6, .col = 1}, - .pressed = false + .pressed = false, + .type = KEY_EVENT }; void matrix_scan_user(void) { if (IS_PRESSED(encoder_ccw)) { encoder_ccw.pressed = false; - encoder_ccw.time = (timer_read() | 1); + encoder_ccw.time = timer_read(); action_exec(encoder_ccw); } if (IS_PRESSED(encoder_cw)) { encoder_cw.pressed = false; - encoder_cw.time = (timer_read() | 1); + encoder_cw.time = timer_read(); action_exec(encoder_cw); } } @@ -86,14 +88,14 @@ uint8_t current_frame = 0; bool encoder_update_user(uint8_t index, bool clockwise) { if (clockwise) { encoder_cw.pressed = true; - encoder_cw.time = (timer_read() | 1); + encoder_cw.time = timer_read(); action_exec(encoder_cw); wait_ms(20); anim_sleep = timer_read32(); oled_on(); } else { encoder_ccw.pressed = true; - encoder_ccw.time = (timer_read() | 1); + encoder_ccw.time = timer_read(); action_exec(encoder_ccw); wait_ms(20); anim_sleep = timer_read32(); diff --git a/keyboards/rmi_kb/squishytkl/keymaps/via/keymap.c b/keyboards/rmi_kb/squishytkl/keymaps/via/keymap.c index 7bd524f9d9..825b11c95d 100644 --- a/keyboards/rmi_kb/squishytkl/keymaps/via/keymap.c +++ b/keyboards/rmi_kb/squishytkl/keymaps/via/keymap.c @@ -29,24 +29,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { keyevent_t encoder_ccw = { .key = (keypos_t){.row = 13, .col = 0}, - .pressed = false + .pressed = false, + .type = KEY_EVENT }; keyevent_t encoder_cw = { .key = (keypos_t){.row = 13, .col = 1}, - .pressed = false + .pressed = false, + .type = KEY_EVENT }; void matrix_scan_user(void) { if (IS_PRESSED(encoder_ccw)) { encoder_ccw.pressed = false; - encoder_ccw.time = (timer_read() | 1); + encoder_ccw.time = timer_read(); action_exec(encoder_ccw); } if (IS_PRESSED(encoder_cw)) { encoder_cw.pressed = false; - encoder_cw.time = (timer_read() | 1); + encoder_cw.time = timer_read(); action_exec(encoder_cw); } } @@ -54,11 +56,11 @@ void matrix_scan_user(void) { bool encoder_update_user(uint8_t index, bool clockwise) { if (clockwise) { encoder_cw.pressed = true; - encoder_cw.time = (timer_read() | 1); + encoder_cw.time = timer_read(); action_exec(encoder_cw); } else { encoder_ccw.pressed = true; - encoder_ccw.time = (timer_read() | 1); + encoder_ccw.time = timer_read(); action_exec(encoder_ccw); } return true; diff --git a/keyboards/rmi_kb/wete/v2/keymaps/via/keymap.c b/keyboards/rmi_kb/wete/v2/keymaps/via/keymap.c index 8afc6f9c25..1feb3d4686 100644 --- a/keyboards/rmi_kb/wete/v2/keymaps/via/keymap.c +++ b/keyboards/rmi_kb/wete/v2/keymaps/via/keymap.c @@ -37,24 +37,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { keyevent_t encoder_ccw = { .key = (keypos_t){.row = 12, .col = 0}, - .pressed = false + .pressed = false, + .type = KEY_EVENT }; keyevent_t encoder_cw = { .key = (keypos_t){.row = 12, .col = 1}, - .pressed = false + .pressed = false, + .type = KEY_EVENT }; void matrix_scan_user(void) { if (IS_PRESSED(encoder_ccw)) { encoder_ccw.pressed = false; - encoder_ccw.time = (timer_read() | 1); + encoder_ccw.time = timer_read(); action_exec(encoder_ccw); } if (IS_PRESSED(encoder_cw)) { encoder_cw.pressed = false; - encoder_cw.time = (timer_read() | 1); + encoder_cw.time = timer_read(); action_exec(encoder_cw); } } @@ -62,11 +64,11 @@ void matrix_scan_user(void) { bool encoder_update_user(uint8_t index, bool clockwise) { if (clockwise) { encoder_cw.pressed = true; - encoder_cw.time = (timer_read() | 1); + encoder_cw.time = timer_read(); action_exec(encoder_cw); } else { encoder_ccw.pressed = true; - encoder_ccw.time = (timer_read() | 1); + encoder_ccw.time = timer_read(); action_exec(encoder_ccw); } return true; diff --git a/keyboards/sawnsprojects/krush/krush65/hotswap/encoder_actions.c b/keyboards/sawnsprojects/krush/krush65/hotswap/encoder_actions.c index 8a91dde19a..96fcc9a614 100644 --- a/keyboards/sawnsprojects/krush/krush65/hotswap/encoder_actions.c +++ b/keyboards/sawnsprojects/krush/krush65/hotswap/encoder_actions.c @@ -30,7 +30,8 @@ void encoder_action_unregister(void) { keyevent_t encoder_event = (keyevent_t) { .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], .pressed = false, - .time = (timer_read() | 1) + .time = timer_read(), + .type = KEY_EVENT }; encoder_state[index] = 0; action_exec(encoder_event); @@ -42,10 +43,11 @@ void encoder_action_register(uint8_t index, bool clockwise) { keyevent_t encoder_event = (keyevent_t) { .key = clockwise ? encoder_cw[index] : encoder_ccw[index], .pressed = true, - .time = (timer_read() | 1) + .time = timer_read(), + .type = KEY_EVENT }; encoder_state[index] = (clockwise ^ 1) | (clockwise << 1); action_exec(encoder_event); } -#endif \ No newline at end of file +#endif diff --git a/keyboards/sofle/keymaps/keyhive_via/encoder.c b/keyboards/sofle/keymaps/keyhive_via/encoder.c index 0883c4a48a..7775cb7b86 100644 --- a/keyboards/sofle/keymaps/keyhive_via/encoder.c +++ b/keyboards/sofle/keymaps/keyhive_via/encoder.c @@ -26,7 +26,7 @@ void encoder_action_unregister(void) { for (int index = 0; index < 2; ++index) { if (encoder_state[index]) { - keyevent_t encoder_event = (keyevent_t){.key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], .pressed = false, .time = (timer_read() | 1)}; + keyevent_t encoder_event = (keyevent_t){.key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], .pressed = false, .time = timer_read(), .type = KEY_EVENT}; encoder_state[index] = 0; action_exec(encoder_event); } @@ -34,7 +34,7 @@ } void encoder_action_register(uint8_t index, bool clockwise) { - keyevent_t encoder_event = (keyevent_t){.key = clockwise ? encoder_cw[index] : encoder_ccw[index], .pressed = true, .time = (timer_read() | 1)}; + keyevent_t encoder_event = (keyevent_t){.key = clockwise ? encoder_cw[index] : encoder_ccw[index], .pressed = true, .time = timer_read(), .type = KEY_EVENT}; encoder_state[index] = (clockwise ^ 1) | (clockwise << 1); action_exec(encoder_event); } @@ -46,4 +46,3 @@ return false; }; #endif - diff --git a/keyboards/stello65/beta/encoder_actions.c b/keyboards/stello65/beta/encoder_actions.c index 72970a2ffc..87a53676e6 100644 --- a/keyboards/stello65/beta/encoder_actions.c +++ b/keyboards/stello65/beta/encoder_actions.c @@ -29,7 +29,8 @@ void encoder_action_unregister(void) { keyevent_t encoder_event = (keyevent_t) { .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], .pressed = false, - .time = (timer_read() | 1) + .time = timer_read(), + .type = KEY_EVENT }; encoder_state[index] = 0; action_exec(encoder_event); @@ -41,7 +42,8 @@ void encoder_action_register(uint8_t index, bool clockwise) { keyevent_t encoder_event = (keyevent_t) { .key = clockwise ? encoder_cw[index] : encoder_ccw[index], .pressed = true, - .time = (timer_read() | 1) + .time = timer_read(), + .type = KEY_EVENT }; encoder_state[index] = (clockwise ^ 1) | (clockwise << 1); action_exec(encoder_event); diff --git a/keyboards/synthlabs/solo/keymaps/via/keymap.c b/keyboards/synthlabs/solo/keymaps/via/keymap.c index c6634c42d4..84f99df9ab 100644 --- a/keyboards/synthlabs/solo/keymaps/via/keymap.c +++ b/keyboards/synthlabs/solo/keymaps/via/keymap.c @@ -37,7 +37,8 @@ void encoder_action_unregister(void) { keyevent_t encoder_event = (keyevent_t) { .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], .pressed = false, - .time = (timer_read() | 1) + .time = timer_read(), + .type = KEY_EVENT }; encoder_state[index] = 0; action_exec(encoder_event); @@ -49,7 +50,8 @@ void encoder_action_register(uint8_t index, bool clockwise) { keyevent_t encoder_event = (keyevent_t) { .key = clockwise ? encoder_cw[index] : encoder_ccw[index], .pressed = true, - .time = (timer_read() | 1) + .time = timer_read(), + .type = KEY_EVENT }; encoder_state[index] = (clockwise ^ 1) | (clockwise << 1); action_exec(encoder_event); diff --git a/keyboards/takashicompany/spreadwriter/keymaps/via/keymap.c b/keyboards/takashicompany/spreadwriter/keymaps/via/keymap.c index e04c1fea0d..c0d4a0003d 100644 --- a/keyboards/takashicompany/spreadwriter/keymaps/via/keymap.c +++ b/keyboards/takashicompany/spreadwriter/keymaps/via/keymap.c @@ -98,7 +98,8 @@ void encoder_action_unregister(void) { keyevent_t encoder_event = (keyevent_t) { .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], .pressed = false, - .time = (timer_read() | 1) + .time = timer_read(), + .type = KEY_EVENT }; encoder_state[index] = 0; action_exec(encoder_event); @@ -110,7 +111,8 @@ void encoder_action_register(uint8_t index, bool clockwise) { keyevent_t encoder_event = (keyevent_t) { .key = clockwise ? encoder_cw[index] : encoder_ccw[index], .pressed = true, - .time = (timer_read() | 1) + .time = timer_read(), + .type = KEY_EVENT }; encoder_state[index] = (clockwise ^ 1) | (clockwise << 1); action_exec(encoder_event); @@ -124,4 +126,4 @@ void matrix_scan_kb(void) { bool encoder_update_user(uint8_t index, bool clockwise) { encoder_action_register(index, clockwise); return true; -}; \ No newline at end of file +}; diff --git a/keyboards/wekey/we27/encoder_actions.c b/keyboards/wekey/we27/encoder_actions.c index 72970a2ffc..87a53676e6 100644 --- a/keyboards/wekey/we27/encoder_actions.c +++ b/keyboards/wekey/we27/encoder_actions.c @@ -29,7 +29,8 @@ void encoder_action_unregister(void) { keyevent_t encoder_event = (keyevent_t) { .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], .pressed = false, - .time = (timer_read() | 1) + .time = timer_read(), + .type = KEY_EVENT }; encoder_state[index] = 0; action_exec(encoder_event); @@ -41,7 +42,8 @@ void encoder_action_register(uint8_t index, bool clockwise) { keyevent_t encoder_event = (keyevent_t) { .key = clockwise ? encoder_cw[index] : encoder_ccw[index], .pressed = true, - .time = (timer_read() | 1) + .time = timer_read(), + .type = KEY_EVENT }; encoder_state[index] = (clockwise ^ 1) | (clockwise << 1); action_exec(encoder_event); diff --git a/keyboards/winry/winry315/keymaps/via/encoder_actions.c b/keyboards/winry/winry315/keymaps/via/encoder_actions.c index 9a9092effd..d24d13bb26 100644 --- a/keyboards/winry/winry315/keymaps/via/encoder_actions.c +++ b/keyboards/winry/winry315/keymaps/via/encoder_actions.c @@ -37,7 +37,8 @@ static void exec_encoder_action(uint8_t index, bool clockwise, bool pressed) { keyevent_t encoder_event = (keyevent_t) { .key = clockwise ? encoder_cw[index] : encoder_ccw[index], .pressed = pressed, - .time = (timer_read() | 1) + .time = timer_read(), + .type = KEY_EVENT }; // clang-format on action_exec(encoder_event); diff --git a/keyboards/wuque/mammoth20x/mammoth20x.c b/keyboards/wuque/mammoth20x/mammoth20x.c index 6cc1dee21a..4619ef5dde 100644 --- a/keyboards/wuque/mammoth20x/mammoth20x.c +++ b/keyboards/wuque/mammoth20x/mammoth20x.c @@ -30,7 +30,9 @@ void encoder_action_unregister(void) keyevent_t encoder_event = (keyevent_t){ .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], .pressed = false, - .time = (timer_read() | 1)}; + .time = timer_read(), + .type = KEY_EVENT + }; encoder_state[index] = 0; action_exec(encoder_event); } @@ -41,7 +43,9 @@ void encoder_action_register(uint8_t index, bool clockwise) keyevent_t encoder_event = (keyevent_t){ .key = clockwise ? encoder_cw[index] : encoder_ccw[index], .pressed = true, - .time = (timer_read() | 1)}; + .time = timer_read(), + .type = KEY_EVENT + }; encoder_state[index] = (clockwise ^ 1) | (clockwise << 1); action_exec(encoder_event); } diff --git a/keyboards/wuque/mammoth75x/mammoth75x.c b/keyboards/wuque/mammoth75x/mammoth75x.c index c2bf2bbe37..9452195752 100644 --- a/keyboards/wuque/mammoth75x/mammoth75x.c +++ b/keyboards/wuque/mammoth75x/mammoth75x.c @@ -30,7 +30,9 @@ void encoder_action_unregister(void) keyevent_t encoder_event = (keyevent_t){ .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], .pressed = false, - .time = (timer_read() | 1)}; + .time = timer_read(), + .type = KEY_EVENT + }; encoder_state[index] = 0; action_exec(encoder_event); } @@ -41,7 +43,9 @@ void encoder_action_register(uint8_t index, bool clockwise) keyevent_t encoder_event = (keyevent_t){ .key = clockwise ? encoder_cw[index] : encoder_ccw[index], .pressed = true, - .time = (timer_read() | 1)}; + .time = timer_read(), + .type = KEY_EVENT + }; encoder_state[index] = (clockwise ^ 1) | (clockwise << 1); action_exec(encoder_event); } @@ -64,4 +68,3 @@ bool encoder_update_kb(uint8_t index, bool clockwise) { return true; } #endif - diff --git a/keyboards/wuque/serneity65/serneity65.c b/keyboards/wuque/serneity65/serneity65.c index 1222722b4b..ff03a3ca5f 100644 --- a/keyboards/wuque/serneity65/serneity65.c +++ b/keyboards/wuque/serneity65/serneity65.c @@ -30,7 +30,9 @@ void encoder_action_unregister(void) keyevent_t encoder_event = (keyevent_t){ .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], .pressed = false, - .time = (timer_read() | 1)}; + .time = timer_read(), + .type = KEY_EVENT + }; encoder_state[index] = 0; action_exec(encoder_event); } @@ -41,7 +43,9 @@ void encoder_action_register(uint8_t index, bool clockwise) keyevent_t encoder_event = (keyevent_t){ .key = clockwise ? encoder_cw[index] : encoder_ccw[index], .pressed = true, - .time = (timer_read() | 1)}; + .time = timer_read(), + .type = KEY_EVENT + }; encoder_state[index] = (clockwise ^ 1) | (clockwise << 1); action_exec(encoder_event); } diff --git a/keyboards/yandrstudio/nz67v2/keymaps/via/keymap.c b/keyboards/yandrstudio/nz67v2/keymaps/via/keymap.c index 3da37b5315..ed5075636a 100644 --- a/keyboards/yandrstudio/nz67v2/keymaps/via/keymap.c +++ b/keyboards/yandrstudio/nz67v2/keymaps/via/keymap.c @@ -43,20 +43,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) }; #ifdef ENCODER_ENABLE -keyevent_t encoder1_ccw = {.key = (keypos_t){.row = 4, .col = 4}, .pressed = false}; +keyevent_t encoder1_ccw = {.key = (keypos_t){.row = 4, .col = 4}, .pressed = false, .type = KEY_EVENT}; -keyevent_t encoder1_cw = {.key = (keypos_t){.row = 4, .col = 6}, .pressed = false}; +keyevent_t encoder1_cw = {.key = (keypos_t){.row = 4, .col = 6}, .pressed = false, .type = KEY_EVENT}; void matrix_scan_user(void) { if (IS_PRESSED(encoder1_ccw)) { encoder1_ccw.pressed = false; - encoder1_ccw.time = (timer_read() | 1); + encoder1_ccw.time = timer_read(); action_exec(encoder1_ccw); } if (IS_PRESSED(encoder1_cw)) { encoder1_cw.pressed = false; - encoder1_cw.time = (timer_read() | 1); + encoder1_cw.time = timer_read(); action_exec(encoder1_cw); } } @@ -64,11 +64,11 @@ void matrix_scan_user(void) { bool encoder_update_user(uint8_t index, bool clockwise) { if (clockwise) { encoder1_cw.pressed = true; - encoder1_cw.time = (timer_read() | 1); + encoder1_cw.time = timer_read(); action_exec(encoder1_cw); } else { encoder1_ccw.pressed = true; - encoder1_ccw.time = (timer_read() | 1); + encoder1_ccw.time = timer_read(); action_exec(encoder1_ccw); } return true; diff --git a/quantum/action_tapping.c b/quantum/action_tapping.c index dbb5b8d4e5..362b15105c 100644 --- a/quantum/action_tapping.c +++ b/quantum/action_tapping.c @@ -15,14 +15,10 @@ # error "IGNORE_MOD_TAP_INTERRUPT is no longer necessary as it is now the default behavior of mod-tap keys. Please remove it from your config." # endif -# define IS_TAPPING() IS_EVENT(tapping_key.event) -# define IS_TAPPING_PRESSED() (IS_TAPPING() && tapping_key.event.pressed) -# define IS_TAPPING_RELEASED() (IS_TAPPING() && !tapping_key.event.pressed) -# define IS_TAPPING_KEY(k) (IS_TAPPING() && KEYEQ(tapping_key.event.key, (k))) # ifndef COMBO_ENABLE -# define IS_TAPPING_RECORD(r) (IS_TAPPING() && KEYEQ(tapping_key.event.key, (r->event.key))) +# define IS_TAPPING_RECORD(r) (KEYEQ(tapping_key.event.key, (r->event.key))) # else -# define IS_TAPPING_RECORD(r) (IS_TAPPING() && KEYEQ(tapping_key.event.key, (r->event.key)) && tapping_key.keycode == r->keycode) +# define IS_TAPPING_RECORD(r) (KEYEQ(tapping_key.event.key, (r->event.key)) && tapping_key.keycode == r->keycode) # endif # define WITHIN_TAPPING_TERM(e) (TIMER_DIFF_16(e.time, tapping_key.event.time) < GET_TAPPING_TERM(get_record_keycode(&tapping_key, false), &tapping_key)) # define WITHIN_QUICK_TAP_TERM(e) (TIMER_DIFF_16(e.time, tapping_key.event.time) < GET_QUICK_TAP_TERM(get_record_keycode(&tapping_key, false), &tapping_key)) @@ -94,7 +90,7 @@ void action_tapping_process(keyrecord_t record) { ac_dprintf("OVERFLOW: CLEAR ALL STATES\n"); clear_keyboard(); waiting_buffer_clear(); - tapping_key = (keyrecord_t){}; + tapping_key = (keyrecord_t){0}; } } @@ -121,7 +117,7 @@ void action_tapping_process(keyrecord_t record) { * conditional uses of it are hidden inside macros named TAP_... */ # if (defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT)) || defined(PERMISSIVE_HOLD_PER_KEY) || defined(HOLD_ON_OTHER_KEY_PRESS_PER_KEY) -# define TAP_DEFINE_KEYCODE uint16_t tapping_keycode = get_record_keycode(&tapping_key, false) +# define TAP_DEFINE_KEYCODE const uint16_t tapping_keycode = get_record_keycode(&tapping_key, false) # else # define TAP_DEFINE_KEYCODE # endif @@ -167,12 +163,37 @@ void action_tapping_process(keyrecord_t record) { */ /* return true when key event is processed or consumed. */ bool process_tapping(keyrecord_t *keyp) { - keyevent_t event = keyp->event; + const keyevent_t event = keyp->event; + + // state machine is in the "reset" state, no tapping key is to be + // processed + if (IS_NOEVENT(tapping_key.event) && IS_EVENT(event)) { + if (event.pressed && is_tap_record(keyp)) { + // the currently pressed key is a tapping key, therefore transition + // into the "pressed" tapping key state + ac_dprintf("Tapping: Start(Press tap key).\n"); + tapping_key = *keyp; + process_record_tap_hint(&tapping_key); + waiting_buffer_scan_tap(); + debug_tapping_key(); + return true; + } else { + // the current key is just a regular key, pass it on for regular + // processing + process_record(keyp); + return true; + } + } + TAP_DEFINE_KEYCODE; - // if tapping - if (IS_TAPPING_PRESSED()) { + // process "pressed" tapping key state + if (tapping_key.event.pressed) { if (WITHIN_TAPPING_TERM(event) || MAYBE_RETRO_SHIFTING(event)) { + if (IS_NOEVENT(event)) { + // early return for tick events + return true; + } if (tapping_key.tap.count == 0) { if (IS_TAPPING_RECORD(keyp) && !event.pressed) { # if defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT) @@ -196,7 +217,7 @@ bool process_tapping(keyrecord_t *keyp) { // clang-format off else if ( ( - IS_RELEASED(event) && waiting_buffer_typed(event) && + !event.pressed && waiting_buffer_typed(event) && TAP_GET_PERMISSIVE_HOLD ) // Causes nested taps to not wait past TAPPING_TERM/RETRO_SHIFT @@ -214,7 +235,7 @@ bool process_tapping(keyrecord_t *keyp) { || ( TAP_IS_RETRO && (event.key.col != tapping_key.event.key.col || event.key.row != tapping_key.event.key.row) - && IS_RELEASED(event) && waiting_buffer_typed(event) + && !event.pressed && waiting_buffer_typed(event) ) ) ) @@ -222,7 +243,7 @@ bool process_tapping(keyrecord_t *keyp) { // clang-format on ac_dprintf("Tapping: End. No tap. Interfered by typing key\n"); process_record(&tapping_key); - tapping_key = (keyrecord_t){}; + tapping_key = (keyrecord_t){0}; debug_tapping_key(); // enqueue return false; @@ -231,7 +252,7 @@ bool process_tapping(keyrecord_t *keyp) { * Without this unexpected repeating will occur with having fast repeating setting * https://github.com/tmk/tmk_keyboard/issues/60 */ - else if (IS_RELEASED(event) && !waiting_buffer_typed(event)) { + else if (!event.pressed && !waiting_buffer_typed(event)) { // Modifier/Layer should be retained till end of this tapping. action_t action = layer_switch_get_action(event.key); switch (action.kind.id) { @@ -267,7 +288,7 @@ bool process_tapping(keyrecord_t *keyp) { if (TAP_GET_HOLD_ON_OTHER_KEY_PRESS) { ac_dprintf("Tapping: End. No tap. Interfered by pressed key\n"); process_record(&tapping_key); - tapping_key = (keyrecord_t){}; + tapping_key = (keyrecord_t){0}; debug_tapping_key(); // enqueue return false; @@ -295,6 +316,7 @@ bool process_tapping(keyrecord_t *keyp) { .event.key = tapping_key.event.key, .event.time = event.time, .event.pressed = false, + .event.type = tapping_key.event.type, # ifdef COMBO_ENABLE .keycode = tapping_key.keycode, # endif @@ -307,9 +329,7 @@ bool process_tapping(keyrecord_t *keyp) { debug_tapping_key(); return true; } else { - if (IS_EVENT(event)) { - ac_dprintf("Tapping: key event while last tap(>0).\n"); - } + ac_dprintf("Tapping: key event while last tap(>0).\n"); process_record(keyp); return true; } @@ -322,15 +342,18 @@ bool process_tapping(keyrecord_t *keyp) { debug_event(event); ac_dprintf("\n"); process_record(&tapping_key); - tapping_key = (keyrecord_t){}; + tapping_key = (keyrecord_t){0}; debug_tapping_key(); return false; } else { + if (IS_NOEVENT(event)) { + return true; + } if (IS_TAPPING_RECORD(keyp) && !event.pressed) { ac_dprintf("Tapping: End. last timeout tap release(>0)."); keyp->tap = tapping_key.tap; process_record(keyp); - tapping_key = (keyrecord_t){}; + tapping_key = (keyrecord_t){0}; return true; } else if (is_tap_record(keyp) && event.pressed) { if (tapping_key.tap.count > 1) { @@ -341,6 +364,7 @@ bool process_tapping(keyrecord_t *keyp) { .event.key = tapping_key.event.key, .event.time = event.time, .event.pressed = false, + .event.type = tapping_key.event.type, # ifdef COMBO_ENABLE .keycode = tapping_key.keycode, # endif @@ -353,16 +377,20 @@ bool process_tapping(keyrecord_t *keyp) { debug_tapping_key(); return true; } else { - if (IS_EVENT(event)) { - ac_dprintf("Tapping: key event while last timeout tap(>0).\n"); - } + ac_dprintf("Tapping: key event while last timeout tap(>0).\n"); process_record(keyp); return true; } } } - } else if (IS_TAPPING_RELEASED()) { + } + // process "released" tapping key state + else { if (WITHIN_TAPPING_TERM(event) || MAYBE_RETRO_SHIFTING(event)) { + if (IS_NOEVENT(event)) { + // early return for tick events + return true; + } if (event.pressed) { if (IS_TAPPING_RECORD(keyp)) { if (WITHIN_QUICK_TAP_TERM(event) && !tapping_key.tap.interrupted && tapping_key.tap.count > 0) { @@ -393,35 +421,20 @@ bool process_tapping(keyrecord_t *keyp) { return true; } } else { - if (IS_EVENT(event)) ac_dprintf("Tapping: other key just after tap.\n"); + ac_dprintf("Tapping: other key just after tap.\n"); process_record(keyp); return true; } } else { - // FIX: process_action here? - // timeout. no sequential tap. + // Timeout - reset state machine. ac_dprintf("Tapping: End(Timeout after releasing last tap): "); debug_event(event); ac_dprintf("\n"); - tapping_key = (keyrecord_t){}; + tapping_key = (keyrecord_t){0}; debug_tapping_key(); return false; } } - // not tapping state - else { - if (event.pressed && is_tap_record(keyp)) { - ac_dprintf("Tapping: Start(Press tap key).\n"); - tapping_key = *keyp; - process_record_tap_hint(&tapping_key); - waiting_buffer_scan_tap(); - debug_tapping_key(); - return true; - } else { - process_record(keyp); - return true; - } - } } /** \brief Waiting buffer enq @@ -484,15 +497,18 @@ __attribute__((unused)) bool waiting_buffer_has_anykey_pressed(void) { * FIXME: Needs docs */ void waiting_buffer_scan_tap(void) { - // tapping already is settled - if (tapping_key.tap.count > 0) return; - // invalid state: tapping_key released && tap.count == 0 - if (!tapping_key.event.pressed) return; + // early return if: + // - tapping already is settled + // - invalid state: tapping_key released && tap.count == 0 + if ((tapping_key.tap.count > 0) || !tapping_key.event.pressed) { + return; + } for (uint8_t i = waiting_buffer_tail; i != waiting_buffer_head; i = (i + 1) % WAITING_BUFFER_SIZE) { - if (IS_TAPPING_KEY(waiting_buffer[i].event.key) && !waiting_buffer[i].event.pressed && WITHIN_TAPPING_TERM(waiting_buffer[i].event)) { - tapping_key.tap.count = 1; - waiting_buffer[i].tap.count = 1; + keyrecord_t *candidate = &waiting_buffer[i]; + if (IS_EVENT(candidate->event) && KEYEQ(candidate->event.key, tapping_key.event.key) && !candidate->event.pressed && WITHIN_TAPPING_TERM(candidate->event)) { + tapping_key.tap.count = 1; + candidate->tap.count = 1; process_record(&tapping_key); ac_dprintf("waiting_buffer_scan_tap: found at [%u]\n", i); diff --git a/quantum/encoder.c b/quantum/encoder.c index 3aee340249..8053913e8d 100644 --- a/quantum/encoder.c +++ b/quantum/encoder.c @@ -147,12 +147,12 @@ void encoder_init(void) { #ifdef ENCODER_MAP_ENABLE static void encoder_exec_mapping(uint8_t index, bool clockwise) { // The delays below cater for Windows and its wonderful requirements. - action_exec(clockwise ? ENCODER_CW_EVENT(index, true) : ENCODER_CCW_EVENT(index, true)); + action_exec(clockwise ? MAKE_ENCODER_CW_EVENT(index, true) : MAKE_ENCODER_CCW_EVENT(index, true)); # if ENCODER_MAP_KEY_DELAY > 0 wait_ms(ENCODER_MAP_KEY_DELAY); # endif // ENCODER_MAP_KEY_DELAY > 0 - action_exec(clockwise ? ENCODER_CW_EVENT(index, false) : ENCODER_CCW_EVENT(index, false)); + action_exec(clockwise ? MAKE_ENCODER_CW_EVENT(index, false) : MAKE_ENCODER_CCW_EVENT(index, false)); # if ENCODER_MAP_KEY_DELAY > 0 wait_ms(ENCODER_MAP_KEY_DELAY); # endif // ENCODER_MAP_KEY_DELAY > 0 diff --git a/quantum/keyboard.c b/quantum/keyboard.c index 6f1ad33b61..90f6d6f8da 100644 --- a/quantum/keyboard.c +++ b/quantum/keyboard.c @@ -462,7 +462,7 @@ static inline void generate_tick_event(void) { static uint16_t last_tick = 0; const uint16_t now = timer_read(); if (TIMER_DIFF_16(now, last_tick) != 0) { - action_exec(TICK_EVENT); + action_exec(MAKE_TICK_EVENT); last_tick = now; } } diff --git a/quantum/keyboard.h b/quantum/keyboard.h index f82f2fa58a..bf1890d10b 100644 --- a/quantum/keyboard.h +++ b/quantum/keyboard.h @@ -30,65 +30,64 @@ typedef struct { uint8_t row; } keypos_t; +typedef enum keyevent_type_t { TICK_EVENT = 0, KEY_EVENT = 1, ENCODER_CW_EVENT = 2, ENCODER_CCW_EVENT = 3, COMBO_EVENT = 4 } keyevent_type_t; + /* key event */ typedef struct { - keypos_t key; - bool pressed; - uint16_t time; + keypos_t key; + uint16_t time; + keyevent_type_t type; + bool pressed; } keyevent_t; /* equivalent test of keypos_t */ #define KEYEQ(keya, keyb) ((keya).row == (keyb).row && (keya).col == (keyb).col) /* special keypos_t entries */ -#define KEYLOC_TICK 255 -#define KEYLOC_COMBO 254 #define KEYLOC_ENCODER_CW 253 #define KEYLOC_ENCODER_CCW 252 -/* Rules for No Event: - * 1) (time == 0) to handle (keyevent_t){} as empty event - * 2) Matrix(255, 255) to make TICK event available - */ -static inline bool IS_NOEVENT(keyevent_t event) { - return event.time == 0 || (event.key.row == KEYLOC_TICK && event.key.col == KEYLOC_TICK); -} -static inline bool IS_EVENT(keyevent_t event) { - return !IS_NOEVENT(event); -} -static inline bool IS_KEYEVENT(keyevent_t event) { - return event.key.row < MATRIX_ROWS && event.key.col < MATRIX_COLS; +static inline bool IS_NOEVENT(const keyevent_t event) { + return event.type == TICK_EVENT; } -static inline bool IS_COMBOEVENT(keyevent_t event) { - return event.key.row == KEYLOC_COMBO; +static inline bool IS_EVENT(const keyevent_t event) { + return event.type != TICK_EVENT; } -static inline bool IS_ENCODEREVENT(keyevent_t event) { - return event.key.row == KEYLOC_ENCODER_CW || event.key.row == KEYLOC_ENCODER_CCW; +static inline bool IS_KEYEVENT(const keyevent_t event) { + return event.type == KEY_EVENT; } -static inline bool IS_PRESSED(keyevent_t event) { - return IS_EVENT(event) && event.pressed; +static inline bool IS_COMBOEVENT(const keyevent_t event) { + return event.type == COMBO_EVENT; } -static inline bool IS_RELEASED(keyevent_t event) { - return IS_EVENT(event) && !event.pressed; +static inline bool IS_ENCODEREVENT(const keyevent_t event) { + return event.type == ENCODER_CW_EVENT || event.type == ENCODER_CCW_EVENT; } -/* Common keyevent object factory */ +/* Common keypos_t object factory */ #define MAKE_KEYPOS(row_num, col_num) ((keypos_t){.row = (row_num), .col = (col_num)}) +/* Common keyevent_t object factory */ +#define MAKE_EVENT(row_num, col_num, press, event_type) ((keyevent_t){.key = MAKE_KEYPOS((row_num), (col_num)), .pressed = (press), .time = timer_read(), .type = (event_type)}) + /** * @brief Constructs a key event for a pressed or released key. */ -#define MAKE_KEYEVENT(row_num, col_num, press) ((keyevent_t){.key = MAKE_KEYPOS((row_num), (col_num)), .pressed = (press), .time = (timer_read() | 1)}) +#define MAKE_KEYEVENT(row_num, col_num, press) MAKE_EVENT((row_num), (col_num), (press), KEY_EVENT) + +/** + * @brief Constructs a combo event. + */ +#define MAKE_COMBOEVENT(press) MAKE_EVENT(0, 0, (press), COMBO_EVENT) /** * @brief Constructs a internal tick event that is used to drive the internal QMK state machine. */ -#define TICK_EVENT MAKE_KEYEVENT(KEYLOC_TICK, KEYLOC_TICK, false) +#define MAKE_TICK_EVENT MAKE_EVENT(0, 0, false, TICK_EVENT) #ifdef ENCODER_MAP_ENABLE /* Encoder events */ -# define ENCODER_CW_EVENT(enc_id, press) MAKE_KEYEVENT(KEYLOC_ENCODER_CW, (enc_id), (press)) -# define ENCODER_CCW_EVENT(enc_id, press) MAKE_KEYEVENT(KEYLOC_ENCODER_CCW, (enc_id), (press)) +# define MAKE_ENCODER_CW_EVENT(enc_id, press) MAKE_EVENT(KEYLOC_ENCODER_CW, (enc_id), (press), ENCODER_CW_EVENT) +# define MAKE_ENCODER_CCW_EVENT(enc_id, press) MAKE_EVENT(KEYLOC_ENCODER_CCW, (enc_id), (press), ENCODER_CCW_EVENT) #endif // ENCODER_MAP_ENABLE /* it runs once at early stage of startup before keyboard_init. */ diff --git a/quantum/process_keycode/process_combo.c b/quantum/process_keycode/process_combo.c index ce6725c402..b1b49d3019 100644 --- a/quantum/process_keycode/process_combo.c +++ b/quantum/process_keycode/process_combo.c @@ -145,7 +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 = MAKE_KEYEVENT(KEYLOC_COMBO, KEYLOC_COMBO, false), + .event = MAKE_COMBOEVENT(false), .keycode = combo->keycode, }; #ifndef NO_ACTION_TAPPING @@ -233,7 +233,7 @@ static inline void dump_key_buffer(void) { process_record(record); #endif } - record->event.time = 0; + record->event.type = TICK_EVENT; #if defined(CAPS_WORD_ENABLE) && defined(AUTO_SHIFT_ENABLE) // Edge case: preserve the weak Left Shift mod if both Caps Word and @@ -333,8 +333,8 @@ void apply_combo(uint16_t combo_index, combo_t *combo) { KEY_STATE_DOWN(state, key_index); 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 = MAKE_KEYPOS(KEYLOC_COMBO, KEYLOC_COMBO); + record->keycode = combo->keycode; + record->event.type = COMBO_EVENT; qrecord->combo_index = combo_index; ACTIVATE_COMBO(combo); @@ -343,7 +343,7 @@ void apply_combo(uint16_t combo_index, combo_t *combo) { } else { // key was part of the combo but not the last one, "disable" it // by making it a TICK event. - record->event.time = 0; + record->event.type = TICK_EVENT; } } drop_combo_from_buffer(combo_index); diff --git a/quantum/process_keycode/process_steno.c b/quantum/process_keycode/process_steno.c index 8ba98bd4bb..d5ad61ba85 100644 --- a/quantum/process_keycode/process_steno.c +++ b/quantum/process_keycode/process_steno.c @@ -173,13 +173,13 @@ bool process_steno(uint16_t keycode, keyrecord_t *record) { switch (keycode) { #ifdef STENO_ENABLE_ALL case QK_STENO_BOLT: - if (IS_PRESSED(record->event)) { + if (record->event.pressed) { steno_set_mode(STENO_MODE_BOLT); } return false; case QK_STENO_GEMINI: - if (IS_PRESSED(record->event)) { + if (record->event.pressed) { steno_set_mode(STENO_MODE_GEMINI); } return false; @@ -193,7 +193,7 @@ bool process_steno(uint16_t keycode, keyrecord_t *record) { } #endif // STENO_COMBINEDMAP case STN__MIN ... STN__MAX: - if (IS_PRESSED(record->event)) { + if (record->event.pressed) { n_pressed_keys++; switch (mode) { #ifdef STENO_ENABLE_BOLT -- cgit 1.4.1 From ae63c0f509fae71270fb5885d504ee26cbad95ff Mon Sep 17 00:00:00 2001 From: Pascal Getreuer <50221757+getreuer@users.noreply.github.com> Date: Mon, 3 Apr 2023 16:11:26 -0700 Subject: [Core] Caps Word "Invert on shift" option: pressing Shift inverts the shift state. (#20092) Co-authored-by: Nick Brassel --- data/mappings/info_config.hjson | 1 + data/schemas/keyboard.jsonschema | 3 +- docs/feature_caps_word.md | 20 ++ quantum/process_keycode/process_caps_word.c | 66 +++++++ tests/caps_word/caps_word_invert_on_shift/config.h | 21 ++ tests/caps_word/caps_word_invert_on_shift/test.mk | 17 ++ .../test_caps_word_invert_on_shift.cpp | 215 +++++++++++++++++++++ 7 files changed, 342 insertions(+), 1 deletion(-) create mode 100644 tests/caps_word/caps_word_invert_on_shift/config.h create mode 100644 tests/caps_word/caps_word_invert_on_shift/test.mk create mode 100644 tests/caps_word/caps_word_invert_on_shift/test_caps_word_invert_on_shift.cpp (limited to 'quantum/process_keycode') diff --git a/data/mappings/info_config.hjson b/data/mappings/info_config.hjson index bc4f46c353..7c1a4ee36b 100644 --- a/data/mappings/info_config.hjson +++ b/data/mappings/info_config.hjson @@ -28,6 +28,7 @@ "BOOTMAGIC_LITE_COLUMN_RIGHT": {"info_key": "split.bootmagic.matrix.1", "value_type": "int"}, "BOTH_SHIFTS_TURNS_ON_CAPS_WORD": {"info_key": "caps_word.both_shifts_turns_on", "value_type": "bool"}, "CAPS_WORD_IDLE_TIMEOUT": {"info_key": "caps_word.idle_timeout", "value_type": "int"}, + "CAPS_WORD_INVERT_ON_SHIFT": {"info_key": "caps_word.invert_on_shift", "value_type": "bool"}, "COMBO_COUNT": {"info_key": "combo.count", "value_type": "int"}, "COMBO_TERM": {"info_key": "combo.term", "value_type": "int"}, "DEBOUNCE": {"info_key": "debounce", "value_type": "int"}, diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema index ee6ecf28e4..6c4ff49855 100644 --- a/data/schemas/keyboard.jsonschema +++ b/data/schemas/keyboard.jsonschema @@ -227,7 +227,8 @@ "enabled": {"type": "boolean"}, "both_shifts_turns_on": {"type": "boolean"}, "double_tap_shift_turns_on": {"type": "boolean"}, - "idle_timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"} + "idle_timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"}, + "invert_on_shift": {"type": "boolean"} } }, "combo": { diff --git a/docs/feature_caps_word.md b/docs/feature_caps_word.md index c58d1a56e2..7f726b059d 100644 --- a/docs/feature_caps_word.md +++ b/docs/feature_caps_word.md @@ -90,6 +90,26 @@ by defining `IS_COMMAND()` in config.h: ## Customizing Caps Word :id=customizing-caps-word +### Invert on shift :id=invert-on-shift + +By default, Caps Word turns off when Shift keys are pressed, considering them as +word-breaking. Alternatively with the `CAPS_WORD_INVERT_ON_SHIFT` option, +pressing the Shift key continues Caps Word and inverts the shift state. This +is convenient for uncapitalizing one or a few letters within a word, for +example with Caps Word on, typing "D, B, Shift+A, Shift+A, S" produces "DBaaS", +or typing "P, D, F, Shift+S" produces "PDFs". + +Enable it by adding in config.h + +```c +#define CAPS_WORD_INVERT_ON_SHIFT +``` + +This option works with regular Shift keys `KC_LSFT` and `KC_RSFT`, mod-tap Shift +keys, and one-shot Shift keys. Note that while Caps Word is on, one-shot Shift +keys behave like regular Shift keys, and have effect only while they are held. + + ### Idle timeout :id=idle-timeout Caps Word turns off automatically if no keys are pressed for diff --git a/quantum/process_keycode/process_caps_word.c b/quantum/process_keycode/process_caps_word.c index 94302b29ae..8f2ee1db8b 100644 --- a/quantum/process_keycode/process_caps_word.c +++ b/quantum/process_keycode/process_caps_word.c @@ -14,6 +14,54 @@ #include "process_caps_word.h" +#ifdef CAPS_WORD_INVERT_ON_SHIFT +static uint8_t held_mods = 0; + +static bool handle_shift(uint16_t keycode, keyrecord_t* record) { + switch (keycode) { + case OSM(MOD_LSFT): + keycode = KC_LSFT; + break; + case OSM(MOD_RSFT): + keycode = KC_RSFT; + break; + +# ifndef NO_ACTION_TAPPING + case QK_MOD_TAP ... QK_MOD_TAP_MAX: + if (record->tap.count == 0) { // Mod-tap key is held. + switch (QK_MOD_TAP_GET_MODS(keycode)) { + case MOD_LSFT: + keycode = KC_LSFT; + break; + case MOD_RSFT: + keycode = KC_RSFT; + break; + } + } +# endif // NO_ACTION_TAPPING + } + + if (keycode == KC_LSFT || keycode == KC_RSFT) { + const uint8_t mod = MOD_BIT(keycode); + + if (is_caps_word_on()) { + if (record->event.pressed) { + held_mods |= mod; + } else { + held_mods &= ~mod; + } + return false; + } else if ((held_mods & mod) != 0) { + held_mods &= ~mod; + del_mods(mod); + return record->event.pressed; + } + } + + return true; +} +#endif // CAPS_WORD_INVERT_ON_SHIFT + bool process_caps_word(uint16_t keycode, keyrecord_t* record) { if (keycode == QK_CAPS_WORD_TOGGLE) { if (record->event.pressed) { @@ -21,6 +69,11 @@ bool process_caps_word(uint16_t keycode, keyrecord_t* record) { } return false; } +#ifdef CAPS_WORD_INVERT_ON_SHIFT + if (!handle_shift(keycode, record)) { + return false; + } +#endif // CAPS_WORD_INVERT_ON_SHIFT #ifndef NO_ACTION_ONESHOT const uint8_t mods = get_mods() | get_oneshot_mods(); @@ -111,12 +164,14 @@ bool process_caps_word(uint16_t keycode, keyrecord_t* record) { if (record->tap.count == 0) { // Mod-tap key is held. const uint8_t mods = QK_MOD_TAP_GET_MODS(keycode); switch (mods) { +# ifndef CAPS_WORD_INVERT_ON_SHIFT case MOD_LSFT: keycode = KC_LSFT; break; case MOD_RSFT: keycode = KC_RSFT; break; +# endif // CAPS_WORD_INVERT_ON_SHIFT case MOD_RSFT | MOD_RALT: keycode = RSFT(KC_RALT); break; @@ -124,6 +179,9 @@ bool process_caps_word(uint16_t keycode, keyrecord_t* record) { return true; default: caps_word_off(); +# ifdef CAPS_WORD_INVERT_ON_SHIFT + add_mods(held_mods); +# endif // CAPS_WORD_INVERT_ON_SHIFT return true; } } else { @@ -163,12 +221,20 @@ bool process_caps_word(uint16_t keycode, keyrecord_t* record) { clear_weak_mods(); #endif // AUTO_SHIFT_ENABLE if (caps_word_press_user(keycode)) { +#ifdef CAPS_WORD_INVERT_ON_SHIFT + if (held_mods) { + set_weak_mods(get_weak_mods() ^ MOD_BIT(KC_LSFT)); + } +#endif // CAPS_WORD_INVERT_ON_SHIFT send_keyboard_report(); return true; } } caps_word_off(); +#ifdef CAPS_WORD_INVERT_ON_SHIFT + add_mods(held_mods); +#endif // CAPS_WORD_INVERT_ON_SHIFT return true; } diff --git a/tests/caps_word/caps_word_invert_on_shift/config.h b/tests/caps_word/caps_word_invert_on_shift/config.h new file mode 100644 index 0000000000..7a3ec846f9 --- /dev/null +++ b/tests/caps_word/caps_word_invert_on_shift/config.h @@ -0,0 +1,21 @@ +// Copyright 2023 Google LLC +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +#pragma once + +#include "test_common.h" + +#define CAPS_WORD_INVERT_ON_SHIFT +#define PERMISSIVE_HOLD diff --git a/tests/caps_word/caps_word_invert_on_shift/test.mk b/tests/caps_word/caps_word_invert_on_shift/test.mk new file mode 100644 index 0000000000..319c04d67a --- /dev/null +++ b/tests/caps_word/caps_word_invert_on_shift/test.mk @@ -0,0 +1,17 @@ +# Copyright 2023 Google LLC +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +CAPS_WORD_ENABLE = yes + diff --git a/tests/caps_word/caps_word_invert_on_shift/test_caps_word_invert_on_shift.cpp b/tests/caps_word/caps_word_invert_on_shift/test_caps_word_invert_on_shift.cpp new file mode 100644 index 0000000000..d322448181 --- /dev/null +++ b/tests/caps_word/caps_word_invert_on_shift/test_caps_word_invert_on_shift.cpp @@ -0,0 +1,215 @@ +// Copyright 2023 Google LLC +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +#include "keyboard_report_util.hpp" +#include "keycode.h" +#include "test_common.hpp" +#include "test_fixture.hpp" +#include "test_keymap_key.hpp" + +using ::testing::_; +using ::testing::AnyNumber; +using ::testing::AnyOf; +using ::testing::InSequence; +using ::testing::TestParamInfo; + +namespace { + +struct ShiftKeyParams { + std::string name; + uint16_t keycode; + uint16_t report_shift_code; + + static const std::string& GetName(const TestParamInfo& info) { + return info.param.name; + } +}; + +class CapsWordInvertOnShift : public ::testing::WithParamInterface, public TestFixture { + void SetUp() override { + caps_word_off(); + } +}; + +// With Caps Word on, type "A, 4, Shift(A, 4, A), A, Shift(A), 4". +TEST_P(CapsWordInvertOnShift, ShiftWithinWord) { + TestDriver driver; + KeymapKey key_shift(0, 0, 0, GetParam().keycode); + KeymapKey key_a(0, 1, 0, KC_A); + KeymapKey key_4(0, 2, 0, KC_4); + set_keymap({key_shift, key_a, key_4}); + + // Allow any number of reports with no keys or only KC_LSFT. + // clang-format off + EXPECT_CALL(driver, send_keyboard_mock(AnyOf( + KeyboardReport(), + KeyboardReport(KC_LSFT)))) + .Times(AnyNumber()); + // clang-format on + + { // Expect: "A4a$aAa4" + InSequence s; + EXPECT_REPORT(driver, (KC_LSFT, KC_A)); + EXPECT_REPORT(driver, (KC_4)); + EXPECT_REPORT(driver, (KC_A)); + EXPECT_REPORT(driver, (KC_LSFT, KC_4)); + EXPECT_REPORT(driver, (KC_A)); + EXPECT_REPORT(driver, (KC_LSFT, KC_A)); + EXPECT_REPORT(driver, (KC_A)); + EXPECT_REPORT(driver, (KC_4)); + } + + caps_word_on(); + tap_keys(key_a, key_4); // Type "A, 4". + + key_shift.press(); // Type "Shift(A, 4, A)". + run_one_scan_loop(); + tap_keys(key_a, key_4, key_a); + key_shift.release(); + run_one_scan_loop(); + + tap_key(key_a); // Type "A". + + key_shift.press(); // Type "Shift(A)". + run_one_scan_loop(); + tap_key(key_a); + key_shift.release(); + run_one_scan_loop(); + + tap_key(key_4); // Type "4". + + VERIFY_AND_CLEAR(driver); +} + +TEST_P(CapsWordInvertOnShift, ShiftHeldAtWordEnd) { + TestDriver driver; + KeymapKey key_shift(0, 0, 0, GetParam().keycode); + KeymapKey key_a(0, 1, 0, KC_A); + KeymapKey key_slsh(0, 2, 0, KC_SLSH); + set_keymap({key_shift, key_a, key_slsh}); + + // Allow any number of reports with no keys or only KC_LSFT. + // clang-format off + EXPECT_CALL(driver, send_keyboard_mock(AnyOf( + KeyboardReport(), + KeyboardReport(KC_LSFT), + KeyboardReport(KC_RSFT)))) + .Times(AnyNumber()); + // clang-format on + + { // Expect: "Aa?A" + InSequence s; + EXPECT_REPORT(driver, (KC_LSFT, KC_A)); + EXPECT_REPORT(driver, (KC_A)); + EXPECT_REPORT(driver, (GetParam().report_shift_code, KC_SLSH)); + EXPECT_REPORT(driver, (GetParam().report_shift_code, KC_A)); + } + + caps_word_on(); + tap_key(key_a); + + key_shift.press(); // Press Shift. + run_one_scan_loop(); + + EXPECT_EQ(get_mods(), 0); + + tap_key(key_a); + tap_key(key_slsh); // Tap '/' key, which is word breaking, ending Caps Word. + + EXPECT_FALSE(is_caps_word_on()); + EXPECT_EQ(get_mods(), MOD_BIT(GetParam().report_shift_code)); + + tap_key(key_a); + key_shift.release(); // Release Shift. + run_one_scan_loop(); + + EXPECT_EQ(get_mods(), 0); + VERIFY_AND_CLEAR(driver); +} + +TEST_P(CapsWordInvertOnShift, TwoShiftsHeld) { + TestDriver driver; + KeymapKey key_shift1(0, 0, 0, GetParam().keycode); + KeymapKey key_shift2(0, 1, 0, GetParam().report_shift_code); + KeymapKey key_a(0, 2, 0, KC_A); + KeymapKey key_slsh(0, 3, 0, KC_SLSH); + set_keymap({key_shift1, key_shift2, key_a, key_slsh}); + + // Allow any number of reports with no keys or only KC_LSFT. + // clang-format off + EXPECT_CALL(driver, send_keyboard_mock(AnyOf( + KeyboardReport(), + KeyboardReport(KC_LSFT), + KeyboardReport(KC_RSFT)))) + .Times(AnyNumber()); + // clang-format on + + { // Expect: "Aa?a" + InSequence s; + EXPECT_REPORT(driver, (KC_LSFT, KC_A)); + EXPECT_REPORT(driver, (KC_A)); + EXPECT_REPORT(driver, (GetParam().report_shift_code, KC_SLSH)); + EXPECT_REPORT(driver, (KC_A)); + } + + caps_word_on(); + tap_key(key_a); + + key_shift1.press(); // Press shift1. + run_one_scan_loop(); + + EXPECT_EQ(get_mods(), 0); + + tap_key(key_a); + tap_key(key_slsh); // Tap '/' key, which is word breaking, ending Caps Word. + + EXPECT_FALSE(is_caps_word_on()); + EXPECT_EQ(get_mods(), MOD_BIT(GetParam().report_shift_code)); + + key_shift2.press(); // Press shift2. + run_one_scan_loop(); + + EXPECT_EQ(get_mods(), MOD_BIT(GetParam().report_shift_code)); + + key_shift1.release(); // Release shift1. + run_one_scan_loop(); + + EXPECT_EQ(get_mods(), 0); + tap_key(key_a); + + key_shift2.release(); // Release shift2. + run_one_scan_loop(); + + EXPECT_EQ(get_mods(), 0); + VERIFY_AND_CLEAR(driver); +} + +// clang-format off +INSTANTIATE_TEST_CASE_P( + Shifts, + CapsWordInvertOnShift, + ::testing::Values( + ShiftKeyParams{"KC_LSFT", KC_LSFT, KC_LSFT}, + ShiftKeyParams{"KC_RSFT", KC_RSFT, KC_RSFT}, + ShiftKeyParams{"LSFT_T", LSFT_T(KC_A), KC_LSFT}, + ShiftKeyParams{"RSFT_T", RSFT_T(KC_A), KC_RSFT}, + ShiftKeyParams{"OSM_LSFT", OSM(MOD_LSFT), KC_LSFT}, + ShiftKeyParams{"OSM_RSFT", OSM(MOD_RSFT), KC_RSFT} + ), + ShiftKeyParams::GetName + ); +// clang-format on + +} // namespace -- cgit 1.4.1 From d3b8179f467da23fec98e97b28684c43e9e8ba73 Mon Sep 17 00:00:00 2001 From: Ricardo Hermida Ruiz Date: Mon, 10 Apr 2023 09:45:25 -0300 Subject: Prevent Tri-Layer keys from stopping caps words (#20398) --- quantum/process_keycode/process_caps_word.c | 1 + tests/caps_word/test_caps_word.cpp | 5 +++++ 2 files changed, 6 insertions(+) (limited to 'quantum/process_keycode') diff --git a/quantum/process_keycode/process_caps_word.c b/quantum/process_keycode/process_caps_word.c index 8f2ee1db8b..d4382680bf 100644 --- a/quantum/process_keycode/process_caps_word.c +++ b/quantum/process_keycode/process_caps_word.c @@ -148,6 +148,7 @@ bool process_caps_word(uint16_t keycode, keyrecord_t* record) { case QK_TOGGLE_LAYER ... QK_TOGGLE_LAYER_MAX: case QK_LAYER_TAP_TOGGLE ... QK_LAYER_TAP_TOGGLE_MAX: case QK_ONE_SHOT_LAYER ... QK_ONE_SHOT_LAYER_MAX: + case QK_TRI_LAYER_LOWER ... QK_TRI_LAYER_UPPER: // Ignore AltGr. case KC_RALT: case OSM(MOD_RALT): diff --git a/tests/caps_word/test_caps_word.cpp b/tests/caps_word/test_caps_word.cpp index 6d38b383f3..802f1e960e 100644 --- a/tests/caps_word/test_caps_word.cpp +++ b/tests/caps_word/test_caps_word.cpp @@ -371,6 +371,11 @@ INSTANTIATE_TEST_CASE_P( "OSL", OSL(1), 1, KC_NO, true}, CapsWordPressUserParams{ "LT_held", LT_1_KC_A, TAPPING_TERM + 1, KC_NO, true}, + // Tri-Layer keys are ignored and continue Caps Word. + CapsWordPressUserParams{ + "TL_LOWR", TL_LOWR, 1, KC_NO, true}, + CapsWordPressUserParams{ + "TL_UPPR", TL_UPPR, 1, KC_NO, true}, // AltGr keys are ignored and continue Caps Word. CapsWordPressUserParams{ "KC_RALT", KC_RALT, 1, KC_NO, true}, -- cgit 1.4.1 From 8a332e6f0105d2db9239e3c3f997bae754522804 Mon Sep 17 00:00:00 2001 From: Pete Sevander Date: Wed, 10 May 2023 18:59:52 +0300 Subject: Fix Mod-Tap combo regression (#20669) * Add keyevent for combo keyrecord * Fix formatting * Update quantum/process_keycode/process_combo.c Co-authored-by: Sergey Vlasov * Add combo unit-tests and hot-fix process_record_tap_hint ...as this function tries to lookup the combo keys passed in. This will be refactored in a later pr. --------- Co-authored-by: Sergey Vlasov Co-authored-by: Stefan Kerkmann --- quantum/action.c | 8 +++- quantum/action_tapping.c | 10 +++-- quantum/process_keycode/process_combo.c | 1 + tests/combo/config.h | 8 ++++ tests/combo/test.mk | 4 ++ tests/combo/test_combo.cpp | 72 +++++++++++++++++++++++++++++++++ 6 files changed, 97 insertions(+), 6 deletions(-) create mode 100644 tests/combo/config.h create mode 100644 tests/combo/test.mk create mode 100644 tests/combo/test_combo.cpp (limited to 'quantum/process_keycode') diff --git a/quantum/action.c b/quantum/action.c index 9a6bbcca11..41c204f689 100644 --- a/quantum/action.c +++ b/quantum/action.c @@ -187,7 +187,7 @@ bool is_swap_hands_on(void) { */ void process_hand_swap(keyevent_t *event) { keypos_t pos = event->key; - if (pos.row < MATRIX_ROWS && pos.col < MATRIX_COLS) { + if (IS_KEYEVENT(*event) && pos.row < MATRIX_ROWS && pos.col < MATRIX_COLS) { static uint8_t matrix_swap_state[((MATRIX_ROWS * MATRIX_COLS) + (CHAR_BIT)-1) / (CHAR_BIT)]; size_t index = (size_t)(pos.row * MATRIX_COLS) + pos.col; bool do_swap = should_swap_hands(index, matrix_swap_state, event->pressed); @@ -200,7 +200,7 @@ void process_hand_swap(keyevent_t *event) { } } # ifdef ENCODER_MAP_ENABLE - else if (pos.row == KEYLOC_ENCODER_CW || pos.row == KEYLOC_ENCODER_CCW) { + else if (IS_ENCODEREVENT(*event) && pos.row == KEYLOC_ENCODER_CW || pos.row == KEYLOC_ENCODER_CCW) { static uint8_t encoder_swap_state[((NUM_ENCODERS) + (CHAR_BIT)-1) / (CHAR_BIT)]; size_t index = pos.col; bool do_swap = should_swap_hands(index, encoder_swap_state, event->pressed); @@ -242,6 +242,10 @@ __attribute__((weak)) void post_process_record_quantum(keyrecord_t *record) {} * FIXME: Needs documentation. */ void process_record_tap_hint(keyrecord_t *record) { + if (!IS_KEYEVENT(record->event)) { + return; + } + action_t action = layer_switch_get_action(record->event.key); switch (action.kind.id) { diff --git a/quantum/action_tapping.c b/quantum/action_tapping.c index 362b15105c..f94e5e6f69 100644 --- a/quantum/action_tapping.c +++ b/quantum/action_tapping.c @@ -167,8 +167,10 @@ bool process_tapping(keyrecord_t *keyp) { // state machine is in the "reset" state, no tapping key is to be // processed - if (IS_NOEVENT(tapping_key.event) && IS_EVENT(event)) { - if (event.pressed && is_tap_record(keyp)) { + if (IS_NOEVENT(tapping_key.event)) { + if (!IS_EVENT(event)) { + // early return for tick events + } else if (event.pressed && is_tap_record(keyp)) { // the currently pressed key is a tapping key, therefore transition // into the "pressed" tapping key state ac_dprintf("Tapping: Start(Press tap key).\n"); @@ -176,13 +178,13 @@ bool process_tapping(keyrecord_t *keyp) { process_record_tap_hint(&tapping_key); waiting_buffer_scan_tap(); debug_tapping_key(); - return true; } else { // the current key is just a regular key, pass it on for regular // processing process_record(keyp); - return true; } + + return true; } TAP_DEFINE_KEYCODE; diff --git a/quantum/process_keycode/process_combo.c b/quantum/process_keycode/process_combo.c index b1b49d3019..2670ccabed 100644 --- a/quantum/process_keycode/process_combo.c +++ b/quantum/process_keycode/process_combo.c @@ -335,6 +335,7 @@ void apply_combo(uint16_t combo_index, combo_t *combo) { // this in the end executes the combo when the key_buffer is dumped. record->keycode = combo->keycode; record->event.type = COMBO_EVENT; + record->event.key = MAKE_KEYPOS(0, 0); qrecord->combo_index = combo_index; ACTIVATE_COMBO(combo); diff --git a/tests/combo/config.h b/tests/combo/config.h new file mode 100644 index 0000000000..8052932634 --- /dev/null +++ b/tests/combo/config.h @@ -0,0 +1,8 @@ +// Copyright 2023 Stefan Kerkmann (@KarlK90) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "test_common.h" + +#define TAPPING_TERM 200 diff --git a/tests/combo/test.mk b/tests/combo/test.mk new file mode 100644 index 0000000000..ce6f9fc2b0 --- /dev/null +++ b/tests/combo/test.mk @@ -0,0 +1,4 @@ +# Copyright 2023 Stefan Kerkmann (@KarlK90) +# SPDX-License-Identifier: GPL-2.0-or-later + +COMBO_ENABLE = yes diff --git a/tests/combo/test_combo.cpp b/tests/combo/test_combo.cpp new file mode 100644 index 0000000000..b7aea27f4c --- /dev/null +++ b/tests/combo/test_combo.cpp @@ -0,0 +1,72 @@ +// Copyright 2023 Stefan Kerkmann (@KarlK90) +// Copyright 2023 @filterpaper +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "keyboard_report_util.hpp" +#include "quantum.h" +#include "keycode.h" +#include "test_common.h" +#include "test_driver.hpp" +#include "test_fixture.hpp" +#include "test_keymap_key.hpp" + +extern "C" { +enum combos { modtest, osmshift, COMBO_LENGTH }; +uint16_t COMBO_LEN = COMBO_LENGTH; + +uint16_t const modtest_combo[] = {KC_Y, KC_U, COMBO_END}; +uint16_t const osmshift_combo[] = {KC_Z, KC_X, COMBO_END}; + +// clang-format off +combo_t key_combos[] = { + [modtest] = COMBO(modtest_combo, RSFT_T(KC_SPACE)), + [osmshift] = COMBO(osmshift_combo, OSM(MOD_LSFT)) +}; +// clang-format on +} + +using testing::_; +using testing::InSequence; + +class Combo : public TestFixture {}; + +TEST_F(Combo, combo_modtest_tapped) { + TestDriver driver; + KeymapKey key_y(0, 0, 1, KC_Y); + KeymapKey key_u(0, 0, 2, KC_U); + set_keymap({key_y, key_u}); + + EXPECT_REPORT(driver, (KC_SPACE)); + EXPECT_EMPTY_REPORT(driver); + tap_combo({key_y, key_u}); + VERIFY_AND_CLEAR(driver); +} + +TEST_F(Combo, combo_modtest_held_longer_than_tapping_term) { + TestDriver driver; + KeymapKey key_y(0, 0, 1, KC_Y); + KeymapKey key_u(0, 0, 2, KC_U); + set_keymap({key_y, key_u}); + + EXPECT_REPORT(driver, (KC_RIGHT_SHIFT)); + EXPECT_EMPTY_REPORT(driver); + tap_combo({key_y, key_u}, TAPPING_TERM + 1); + VERIFY_AND_CLEAR(driver); +} + +TEST_F(Combo, combo_osmshift_tapped) { + TestDriver driver; + KeymapKey key_z(0, 0, 1, KC_Z); + KeymapKey key_x(0, 0, 2, KC_X); + KeymapKey key_i(0, 0, 3, KC_I); + set_keymap({key_z, key_x, key_i}); + + EXPECT_NO_REPORT(driver); + tap_combo({key_z, key_x}); + VERIFY_AND_CLEAR(driver); + + EXPECT_REPORT(driver, (KC_I, KC_LEFT_SHIFT)); + EXPECT_EMPTY_REPORT(driver); + tap_key(key_i); + VERIFY_AND_CLEAR(driver); +} -- cgit 1.4.1 From 5faa23d54ca1e3ab83097f2a07922f48800616e6 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Mon, 15 May 2023 22:27:37 +1000 Subject: Keymap introspection for combos. (#19670) --- builddefs/build_test.mk | 4 ++ data/mappings/info_config.hjson | 4 +- docs/config_options.md | 2 - docs/feature_combo.md | 33 ++--------- docs/ja/config_options.md | 2 - docs/ja/feature_combo.md | 6 +- keyboards/0xcb/splaytoraid/keymaps/pi/config.h | 1 - keyboards/0xcb/splaytoraid/keymaps/pi/keymap.c | 6 +- keyboards/3w6/keymaps/helltm/combos.h | 4 +- .../gherkin/keymaps/stevexyz/config.h | 2 - .../nori/keymaps/wings_36key/config.h | 2 - .../nori/keymaps/wings_36key/keymap.c | 4 +- .../ashpil/modelm_usbc/keymaps/ashpil/config.h | 1 - .../ashpil/modelm_usbc/keymaps/ashpil/keymap.c | 4 +- keyboards/b_sides/rev41lp/keymaps/namnlos/config.h | 2 - keyboards/b_sides/rev41lp/keymaps/namnlos/keymap.c | 2 +- keyboards/bluebell/swoop/keymaps/kyek/config.h | 1 - keyboards/bluebell/swoop/keymaps/kyek/keymap.c | 34 ++++++------ keyboards/centromere/keymaps/mini_bom/config.h | 1 - keyboards/centromere/keymaps/mini_bom/keymap.c | 14 ++--- keyboards/chord/zero/keymaps/default/keymap.c | 2 - .../converter/usb_usb/keymaps/chriskopher/combo.c | 2 +- .../converter/usb_usb/keymaps/chriskopher/config.h | 1 - keyboards/converter/usb_usb/keymaps/narze/config.h | 1 - keyboards/crkbd/keymaps/antosha417/keymap.c | 8 +-- keyboards/crkbd/keymaps/cameronjlarsen/keymap.c | 7 +-- keyboards/crkbd/keymaps/markstos/config.h | 5 +- keyboards/crkbd/keymaps/markstos/keymap.c | 4 +- keyboards/crkbd/keymaps/nimishgautam/config.h | 3 +- keyboards/crkbd/keymaps/nimishgautam/keymap.c | 64 +++++++++++----------- keyboards/crkbd/keymaps/pdl/config.h | 1 - .../drhigsby/dubba175/keymaps/default/config.h | 1 - .../drhigsby/dubba175/keymaps/default/keymap.c | 8 +-- keyboards/drhigsby/ogurec/keymaps/default/config.h | 1 - keyboards/drhigsby/ogurec/keymaps/default/keymap.c | 6 +- keyboards/drhigsby/packrat/keymaps/3uc/config.h | 1 - keyboards/drhigsby/packrat/keymaps/3uc/keymap.c | 7 +-- .../drhigsby/packrat/keymaps/default/config.h | 1 - .../drhigsby/packrat/keymaps/default/keymap.c | 5 +- .../ergodox_ez/keymaps/hacker_dvorak/config.h | 2 - keyboards/eu_isolation/keymaps/bigspace/config.h | 27 +++++---- keyboards/eu_isolation/keymaps/bigspace/keymap.c | 26 ++++----- keyboards/eu_isolation/keymaps/default/config.h | 21 ++++--- keyboards/eu_isolation/keymaps/default/keymap.c | 22 ++++---- keyboards/eu_isolation/keymaps/mit/config.h | 21 ++++--- keyboards/eu_isolation/keymaps/mit/keymap.c | 22 ++++---- keyboards/foostan/cornelius/keymaps/pdl/config.h | 1 - keyboards/free_willy/keymaps/colemak/config.h | 1 - keyboards/free_willy/keymaps/colemak/keymap.c | 2 +- keyboards/free_willy/keymaps/default/config.h | 1 - keyboards/free_willy/keymaps/default/keymap.c | 2 +- keyboards/gboards/g/keymap_combo.h | 3 - .../gmmk/pro/rev1/ansi/keymaps/mike1808/config.h | 1 - .../gmmk/pro/rev1/ansi/keymaps/mike1808/keymap.c | 2 +- keyboards/handwired/aek64/keymaps/4sstylz/config.h | 3 - keyboards/handwired/aek64/keymaps/4sstylz/keymap.c | 4 +- keyboards/ibnuda/alicia_cook/keymaps/rick/config.h | 1 - keyboards/ibnuda/alicia_cook/keymaps/rick/keymap.c | 2 +- keyboards/ibnuda/squiggle/keymaps/default/config.h | 1 - keyboards/ibnuda/squiggle/keymaps/default/keymap.c | 2 +- .../ibnuda/squiggle/keymaps/default38/config.h | 1 - .../ibnuda/squiggle/keymaps/default38/keymap.c | 2 +- .../ibnuda/squiggle/keymaps/defaultfull/config.h | 1 - .../ibnuda/squiggle/keymaps/defaultfull/keymap.c | 2 +- .../squiggle/keymaps/defaultminidox/config.h | 1 - .../squiggle/keymaps/defaultminidox/keymap.c | 2 +- .../squiggle/keymaps/rick-complicated/config.h | 1 - .../squiggle/keymaps/rick-complicated/keymap.c | 2 +- keyboards/ibnuda/squiggle/keymaps/rick/config.h | 1 - keyboards/ibnuda/squiggle/keymaps/rick/keymap.c | 2 +- keyboards/idobao/id80/v2/ansi/keymaps/msf/config.h | 1 - keyboards/idobao/id80/v2/ansi/keymaps/msf/keymap.c | 4 +- .../ergodox_infinity/keymaps/narze/config.h | 1 - keyboards/k34/keymaps/default/config.h | 24 ++++---- keyboards/k34/keymaps/default/keymap.c | 2 +- keyboards/keebformom/keymaps/default/config.h | 19 ------- keyboards/keebformom/keymaps/default/keymap.c | 8 +-- .../keycapsss/plaid_pad/keymaps/oled/config.h | 2 - .../keycapsss/plaid_pad/keymaps/oled/keymap.c | 2 +- .../kprepublic/bm40hsrgb/keymaps/34keys/config.h | 1 - .../kprepublic/bm40hsrgb/keymaps/34keys/keymap.c | 16 +++--- .../bm68hsrgb/rev1/keymaps/peepeetee/config.h | 1 - .../bm80hsrgb/keymaps/peepeetee/config.h | 3 +- .../kprepublic/jj40/keymaps/stevexyz/config.h | 2 - keyboards/lets_split/keymaps/shaymdev/config.h | 2 - keyboards/lets_split/keymaps/shaymdev/keymap.c | 38 ++++++------- keyboards/lily58/keymaps/muuko/config.h | 4 -- keyboards/lily58/keymaps/muuko/keymap.c | 2 +- keyboards/lily58/keymaps/narze/config.h | 1 - .../makenova/omega/omega4/keymaps/default/config.h | 1 - .../makenova/omega/omega4/keymaps/default/keymap.c | 4 +- .../omega/omega4/keymaps/default_10u_bar/config.h | 1 - .../omega/omega4/keymaps/default_10u_bar/keymap.c | 4 +- .../omega/omega4/keymaps/default_6u_bar/config.h | 1 - .../omega/omega4/keymaps/default_6u_bar/keymap.c | 4 +- .../minidox/keymaps/rsthd_combos/config.h | 2 - .../minidox/keymaps/rsthd_combos/keymap.c | 2 +- keyboards/massdrop/alt/keymaps/b_/config.h | 1 - keyboards/massdrop/alt/keymaps/pregame/config.h | 1 - keyboards/massdrop/ctrl/keymaps/endgame/config.h | 1 - .../massdrop/ctrl/keymaps/matthewrobo/config.h | 1 - keyboards/massdrop/ctrl/keymaps/xanimos/config.h | 1 - keyboards/maxr1998/pulse4k/config.h | 1 - .../maxr1998/pulse4k/keymaps/default/keymap.c | 2 +- .../maxr1998/pulse4k/keymaps/maxr1998/keymap.c | 2 +- keyboards/nimrod/keymaps/default/config.h | 1 - keyboards/nimrod/keymaps/default/keymap.c | 2 +- .../nimrod/keymaps/default_center_space/config.h | 1 - .../nimrod/keymaps/default_center_space/keymap.c | 2 +- .../nimrod/keymaps/default_left_space/config.h | 1 - .../nimrod/keymaps/default_left_space/keymap.c | 2 +- .../nimrod/keymaps/default_right_space/config.h | 1 - .../nimrod/keymaps/default_right_space/keymap.c | 2 +- .../nimrod/keymaps/default_split_space/config.h | 1 - .../nimrod/keymaps/default_split_space/keymap.c | 2 +- keyboards/orthodox/keymaps/shaymdev/config.h | 2 - keyboards/orthodox/keymaps/shaymdev/keymap.c | 38 ++++++------- keyboards/pierce/keymaps/durken1/config.h | 1 - keyboards/pierce/keymaps/durken1/keymap.c | 22 ++++---- keyboards/planck/keymaps/antosha417/keymap.c | 7 +-- keyboards/planck/keymaps/ariccb/keymap.c | 4 +- keyboards/planck/keymaps/dvz/config.h | 2 - keyboards/planck/keymaps/dvz/keymap.c | 2 +- keyboards/planck/keymaps/narze/config.h | 1 - keyboards/planck/keymaps/rootiest/config.h | 1 - keyboards/planck/keymaps/rootiest/keymap.c | 2 +- keyboards/preonic/keymaps/brauner/keymap.c | 5 +- .../program_yoink/ortho/keymaps/default/config.h | 3 +- .../program_yoink/ortho/keymaps/default/keymap.c | 2 +- .../ortho/keymaps/ortho_split/config.h | 3 +- .../ortho/keymaps/ortho_split/keymap.c | 2 +- .../staggered/keymaps/default/config.h | 3 +- .../staggered/keymaps/default/keymap.c | 2 +- .../staggered/keymaps/split_bar/config.h | 3 +- .../staggered/keymaps/split_bar/keymap.c | 2 +- .../projectcain/relic/keymaps/default/config.h | 1 - .../projectcain/relic/keymaps/default/keymap.c | 16 +++--- .../projectcain/vault35/keymaps/default/config.h | 1 - .../projectcain/vault35/keymaps/default/keymap.c | 48 ++++++++-------- .../projectcain/vault45/keymaps/default/config.h | 31 +++++------ .../projectcain/vault45/keymaps/default/keymap.c | 26 ++++----- keyboards/q4z/keymaps/default/config.h | 1 - keyboards/q4z/keymaps/default/keymap.c | 2 +- keyboards/q4z/keymaps/rjboone/config.h | 2 - keyboards/q4z/keymaps/rjboone/keymap.c | 2 +- keyboards/qpockets/eggman/keymaps/default/config.h | 3 +- keyboards/qpockets/eggman/keymaps/default/keymap.c | 2 +- .../space_space/rev1/keymaps/big_space/config.h | 3 +- .../space_space/rev1/keymaps/big_space/keymap.c | 2 +- .../space_space/rev1/keymaps/default/config.h | 3 +- .../space_space/rev1/keymaps/default/keymap.c | 2 +- .../space_space/rev2/keymaps/big_space/config.h | 3 +- .../space_space/rev2/keymaps/big_space/keymap.c | 8 +-- .../space_space/rev2/keymaps/default/config.h | 3 +- .../space_space/rev2/keymaps/default/keymap.c | 8 +-- .../space_space/rev2/keymaps/qpockets/config.h | 3 +- .../space_space/rev2/keymaps/qpockets/keymap.c | 10 ++-- keyboards/qpockets/wanten/keymaps/2u_bars/config.h | 3 +- keyboards/qpockets/wanten/keymaps/2u_bars/keymap.c | 11 ++-- keyboards/qpockets/wanten/keymaps/625_bar/config.h | 3 +- keyboards/qpockets/wanten/keymaps/625_bar/keymap.c | 11 ++-- keyboards/qpockets/wanten/keymaps/default/config.h | 3 +- keyboards/qpockets/wanten/keymaps/default/keymap.c | 11 ++-- .../rgbkb/zen/rev1/keymaps/cwebster2/config.h | 7 --- .../sweep/keymaps/flinguenheld/features/combo.c | 5 -- .../splitkb/kyria/keymaps/cameronjlarsen/keymap.c | 5 +- keyboards/splitkb/kyria/keymaps/cwebster2/config.h | 4 -- keyboards/splitkb/kyria/keymaps/cwebster2/keymap.c | 2 +- keyboards/synapse/keymaps/7u_space/config.h | 3 +- keyboards/synapse/keymaps/7u_space/keymap.c | 4 +- keyboards/synapse/keymaps/default/config.h | 3 +- keyboards/synapse/keymaps/default/keymap.c | 4 +- .../tominabox1/adalyn/keymaps/default/config.h | 1 - .../tominabox1/adalyn/keymaps/default/keymap.c | 2 +- .../tominabox1/le_chiffre/keymaps/default/config.h | 1 - .../tominabox1/le_chiffre/keymaps/default/keymap.c | 2 +- keyboards/tominabox1/qaz/keymaps/default/config.h | 1 - keyboards/tominabox1/qaz/keymaps/default/keymap.c | 2 +- .../qaz/keymaps/default_big_space/config.h | 1 - .../qaz/keymaps/default_big_space/keymap.c | 2 +- .../underscore33/rev1/keymaps/default/config.h | 1 - .../underscore33/rev1/keymaps/default/keymap.c | 2 +- .../rev1/keymaps/default_big_space/config.h | 1 - .../rev1/keymaps/default_big_space/keymap.c | 2 +- .../underscore33/rev2/keymaps/default/config.h | 1 - .../underscore33/rev2/keymaps/default/keymap.c | 2 +- .../rev2/keymaps/default_big_space/config.h | 1 - .../rev2/keymaps/default_big_space/keymap.c | 2 +- keyboards/xiudi/xd75/keymaps/4sstylz/config.h | 1 - keyboards/xiudi/xd75/keymaps/4sstylz/keymap.c | 2 +- keyboards/ymdk/melody96/keymaps/dvz/config.h | 1 - keyboards/ymdk/melody96/keymaps/dvz/keymap.c | 2 +- quantum/keymap_introspection.c | 21 +++++++ quantum/keymap_introspection.h | 21 +++++++ quantum/process_keycode/process_combo.c | 23 +++----- quantum/process_keycode/process_combo.h | 2 +- tests/caps_word/caps_word_combo/test.mk | 1 + .../caps_word_combo/test_caps_word_combo.cpp | 23 -------- tests/caps_word/caps_word_combo/test_combos.c | 20 +++++++ tests/combo/test.mk | 2 + tests/combo/test_combo.cpp | 15 ----- tests/combo/test_combos.c | 17 ++++++ tests/test_common/keycode_util.hpp | 1 + users/art/funcs/string_funcs.c | 48 ++++++++-------- users/danielo515/combo.c | 2 +- users/danielo515/config.h | 1 - users/ericgebhart/extensions/keymap_combo.h | 3 - users/ibnuda/combo.h | 4 +- users/ibnuda/config.h | 3 +- users/issmirnov/config.h | 1 - users/issmirnov/issmirnov.c | 4 +- users/kuchosauronad0/combo.h | 5 +- users/kuchosauronad0/config.h | 1 - users/manna-harbour_miryoku/config.h | 1 - .../manna-harbour_miryoku/manna-harbour_miryoku.c | 2 +- users/muppetjones/config.h | 2 - users/muppetjones/features/combos.c | 3 +- users/narze/superduper.c | 2 +- users/ninjonas/combos.c | 4 +- users/ninjonas/config.h | 2 - users/pdl/pdl.c | 2 +- users/talljoe/config.h | 1 - users/uqs/uqs.c | 2 - users/yet-another-developer/combo.h | 5 +- users/yet-another-developer/config.h | 1 - users/zigotica/combos.c | 5 +- 226 files changed, 533 insertions(+), 729 deletions(-) delete mode 100644 keyboards/handwired/aek64/keymaps/4sstylz/config.h delete mode 100644 keyboards/keebformom/keymaps/default/config.h create mode 100644 tests/caps_word/caps_word_combo/test_combos.c create mode 100644 tests/combo/test_combos.c (limited to 'quantum/process_keycode') diff --git a/builddefs/build_test.mk b/builddefs/build_test.mk index 4230598373..9eead77bea 100644 --- a/builddefs/build_test.mk +++ b/builddefs/build_test.mk @@ -75,6 +75,10 @@ $(TEST)_SRC += \ tests/test_common/main.cpp \ $(QUANTUM_PATH)/logging/print.c +ifneq ($(strip $(INTROSPECTION_KEYMAP_C)),) +$(TEST)_DEFS += -DINTROSPECTION_KEYMAP_C=\"$(strip $(INTROSPECTION_KEYMAP_C))\" +endif + $(TEST_OBJ)/$(TEST)_SRC := $($(TEST)_SRC) $(TEST_OBJ)/$(TEST)_INC := $($(TEST)_INC) $(VPATH) $(GTEST_INC) $(TEST_OBJ)/$(TEST)_DEFS := $($(TEST)_DEFS) diff --git a/data/mappings/info_config.hjson b/data/mappings/info_config.hjson index 4a825b7fe5..e53d90da39 100644 --- a/data/mappings/info_config.hjson +++ b/data/mappings/info_config.hjson @@ -43,7 +43,6 @@ "DOUBLE_TAP_SHIFT_TURNS_ON_CAPS_WORD": {"info_key": "caps_word.double_tap_shift_turns_on", "value_type": "bool"}, // Combos - "COMBO_COUNT": {"info_key": "combo.count", "value_type": "int"}, "COMBO_TERM": {"info_key": "combo.term", "value_type": "int"}, // Dynamic Keymap @@ -182,9 +181,10 @@ "TAPPING_FORCE_HOLD": {"info_key": "tapping.force_hold", "value_type": "bool", "deprecated": true}, "TAPPING_FORCE_HOLD_PER_KEY": {"info_key": "tapping.force_hold_per_key", "value_type": "bool", "deprecated": true}, "UNUSED_PINS": {"info_key": "_invalid.unused_pins", "deprecated": true}, + "COMBO_COUNT": {"info_key": "_invalid.combo.count", "invalid": true}, // USB params, need to mark as failure when specified in config.h, rather than deprecated - "DEVICE_VER": {"info_key": "usb.device_version", "value_type": "bcd_version", "deprecated": true, "replace_with": "`usb.device_version` in info.json"} + "DEVICE_VER": {"info_key": "usb.device_version", "value_type": "bcd_version", "deprecated": true, "replace_with": "`usb.device_version` in info.json"}, "MANUFACTURER": {"info_key": "manufacturer", "value_type": "str", "deprecated": true, "replace_with": "`manufacturer` in info.json"}, "PRODUCT": {"info_key": "keyboard_name", "warn_duplicate": false, "value_type": "str", "deprecated": true, "replace_with": "`keyboard_name` in info.json"}, "PRODUCT_ID": {"info_key": "usb.pid", "value_type": "hex", "deprecated": true, "replace_with": "`usb.pid` in info.json"}, diff --git a/docs/config_options.md b/docs/config_options.md index 5ea71d993e..4698260118 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -186,8 +186,6 @@ If you define these options you will enable the associated feature, which may in * how long before oneshot times out * `#define ONESHOT_TAP_TOGGLE 2` * how many taps before oneshot toggle is triggered -* `#define COMBO_COUNT 2` - * Set this to the number of combos that you're using in the [Combo](feature_combo.md) feature. Or leave it undefined and programmatically set the count. * `#define COMBO_TERM 200` * how long for the Combo keys to be detected. Defaults to `TAPPING_TERM` if not defined. * `#define COMBO_MUST_HOLD_MODS` diff --git a/docs/feature_combo.md b/docs/feature_combo.md index 075fe252ae..fd241061fb 100644 --- a/docs/feature_combo.md +++ b/docs/feature_combo.md @@ -4,15 +4,12 @@ The Combo feature is a chording type solution for adding custom actions. It lets To enable this feature, you need to add `COMBO_ENABLE = yes` to your `rules.mk`. -Additionally, in your `config.h`, you'll need to specify the number of combos that you'll be using, by adding `#define COMBO_COUNT 1` (replacing 1 with the number that you're using). It is also possible to not define this and instead set the variable `COMBO_LEN` yourself. There's a trick where we don't need to think about this variable at all. More on this later. - - Then, in your `keymap.c` file, you'll need to define a sequence of keys, terminated with `COMBO_END`, and a structure to list the combination of keys, and its resulting action. ```c const uint16_t PROGMEM test_combo1[] = {KC_A, KC_B, COMBO_END}; const uint16_t PROGMEM test_combo2[] = {KC_C, KC_D, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { COMBO(test_combo1, KC_ESC), COMBO(test_combo2, LCTL(KC_Z)), // keycodes with modifiers are possible too! }; @@ -33,7 +30,7 @@ It is possible to overlap combos. Before, with the example below both combos wou ```c const uint16_t PROGMEM test_combo1[] = {LSFT_T(KC_A), LT(1, KC_B), COMBO_END}; const uint16_t PROGMEM test_combo2[] = {LSFT_T(KC_A), LT(1, KC_B), KC_C, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { COMBO(test_combo1, KC_ESC) COMBO(test_combo2, KC_TAB) }; @@ -41,17 +38,15 @@ combo_t key_combos[COMBO_COUNT] = { ## Examples -A long list of combos can be defined in an `enum` list that ends with `COMBO_LENGTH` and you can leave `COMBO_COUNT` undefined: +A long list of combos can be defined in an `enum` list: ```c enum combos { AB_ESC, JK_TAB, QW_SFT, - SD_LAYER, - COMBO_LENGTH + SD_LAYER }; -uint16_t COMBO_LEN = COMBO_LENGTH; // remove the COMBO_COUNT define and use this instead! const uint16_t PROGMEM ab_combo[] = {KC_A, KC_B, COMBO_END}; const uint16_t PROGMEM jk_combo[] = {KC_J, KC_K, COMBO_END}; @@ -72,9 +67,7 @@ For a more complicated implementation, you can use the `process_combo_event` fun enum combo_events { EM_EMAIL, BSPC_LSFT_CLEAR, - COMBO_LENGTH }; -uint16_t COMBO_LEN = COMBO_LENGTH; // remove the COMBO_COUNT define and use this instead! const uint16_t PROGMEM email_combo[] = {KC_E, KC_M, COMBO_END}; const uint16_t PROGMEM clear_line_combo[] = {KC_BSPC, KC_LSFT, COMBO_END}; @@ -259,18 +252,6 @@ bool combo_should_trigger(uint16_t combo_index, combo_t *combo, uint16_t keycode } ``` -### Variable Length Combos -If you leave `COMBO_COUNT` undefined in `config.h`, it allows you to programmatically declare the size of the Combo data structure and avoid updating `COMBO_COUNT`. Instead a variable called `COMBO_LEN` has to be set. It can be set with something similar to the following in `keymap.c`: `uint16_t COMBO_LEN = ARRAY_SIZE(key_combos);` or by adding `COMBO_LENGTH` as the *last* entry in the combo enum and then `uint16_t COMBO_LEN = COMBO_LENGTH;` as such: -```c -enum myCombos { - ..., - COMBO_LENGTH -}; -uint16_t COMBO_LEN = COMBO_LENGTH; -``` -Regardless of the method used to declare `COMBO_LEN`, this also requires to convert the `combo_t key_combos[COMBO_COUNT] = {...};` line to `combo_t key_combos[] = {...};`. - - ### Combo timer Normally, the timer is started on the first key press and then reset on every subsequent key press within the `COMBO_TERM`. @@ -300,10 +281,8 @@ Here's an example where a combo resolves to two modifiers, and on key releases t ```c enum combos { - AB_MODS, - COMBO_LENGTH + AB_MODS }; -uint16_t COMBO_LEN = COMBO_LENGTH; const uint16_t PROGMEM ab_combo[] = {KC_A, KC_B, COMBO_END}; @@ -415,6 +394,4 @@ SUBS(TH_THE, "the", KC_T, KC_H) // SUBS uses SEND_STRING to output the give ... ``` -Now, you can update only one place to add or alter combos. You don't even need to remember to update the `COMBO_COUNT` or the `COMBO_LEN` variables at all. Everything is taken care of. Magic! - For small to huge ready made dictionaries of combos, you can check out http://combos.gboards.ca/. diff --git a/docs/ja/config_options.md b/docs/ja/config_options.md index 4f9f1f2770..5e98da5eee 100644 --- a/docs/ja/config_options.md +++ b/docs/ja/config_options.md @@ -176,8 +176,6 @@ QMK での全ての利用可能な設定にはデフォルトがあります。 * ワンショットがタイムアウトするまでの時間 * `#define ONESHOT_TAP_TOGGLE 2` * ワンショットトグルが引き起こされるまでのタップ数 -* `#define COMBO_COUNT 2` - * [コンボ](ja/feature_combo.md)機能で使っているコンボの数にこれを設定します。 * `#define COMBO_TERM 200` * コンボキーが検出されるまでの時間。定義されていない場合は、デフォルトは `TAPPING_TERM` です。 * `#define TAP_CODE_DELAY 100` diff --git a/docs/ja/feature_combo.md b/docs/ja/feature_combo.md index bd46e88b7f..0c0591e5f7 100644 --- a/docs/ja/feature_combo.md +++ b/docs/ja/feature_combo.md @@ -18,7 +18,7 @@ ```c const uint16_t PROGMEM test_combo[] = {KC_A, KC_B, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = {COMBO(test_combo, KC_ESC)}; +combo_t key_combos[] = {COMBO(test_combo, KC_ESC)}; ``` これは、A と B のキーを押した場合に、"Escape" を送信します。 @@ -38,7 +38,7 @@ enum combos { const uint16_t PROGMEM ab_combo[] = {KC_A, KC_B, COMBO_END}; const uint16_t PROGMEM jk_combo[] = {KC_J, KC_K, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [AB_ESC] = COMBO(ab_combo, KC_ESC), [JK_TAB] = COMBO(jk_combo, KC_TAB) }; @@ -55,7 +55,7 @@ enum combo_events { const uint16_t PROGMEM copy_combo[] = {KC_Z, KC_C, COMBO_END}; const uint16_t PROGMEM paste_combo[] = {KC_X, KC_V, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [ZC_COPY] = COMBO_ACTION(copy_combo), [XV_PASTE] = COMBO_ACTION(paste_combo), }; diff --git a/keyboards/0xcb/splaytoraid/keymaps/pi/config.h b/keyboards/0xcb/splaytoraid/keymaps/pi/config.h index 52e39aef65..1786ae776d 100644 --- a/keyboards/0xcb/splaytoraid/keymaps/pi/config.h +++ b/keyboards/0xcb/splaytoraid/keymaps/pi/config.h @@ -10,7 +10,6 @@ #ifdef COMBO_ENABLE - #define COMBO_COUNT 9 #define COMBO_TERM 20 #define COMBO_ONLY_FROM_LAYER 0 #endif diff --git a/keyboards/0xcb/splaytoraid/keymaps/pi/keymap.c b/keyboards/0xcb/splaytoraid/keymaps/pi/keymap.c index 29953eedef..07036b7245 100644 --- a/keyboards/0xcb/splaytoraid/keymaps/pi/keymap.c +++ b/keyboards/0xcb/splaytoraid/keymaps/pi/keymap.c @@ -73,7 +73,7 @@ const uint16_t PROGMEM ent_combo[] = {HM_K, HM_L, COMBO_END}; const uint16_t PROGMEM tab_combo[] = {HM_F, HM_D, COMBO_END}; const uint16_t PROGMEM esc_combo[] = {HM_D, HM_S, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { COMBO(ae_combo, RALT(KC_Q)), COMBO(ss_combo, RALT(KC_S)), COMBO(ue_combo, RALT(KC_Y)), @@ -298,7 +298,3 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { [_NUMBERS] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, [_FUNCTION] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) } }; - - - - diff --git a/keyboards/3w6/keymaps/helltm/combos.h b/keyboards/3w6/keymaps/helltm/combos.h index 85f44cd0d4..99173ecb22 100644 --- a/keyboards/3w6/keymaps/helltm/combos.h +++ b/keyboards/3w6/keymaps/helltm/combos.h @@ -19,16 +19,14 @@ #define CB(name, action, ...) C_##name, enum user_combos { #include "combos.def" - COMBO_LENGTH }; #undef CB -uint16_t COMBO_LEN = COMBO_LENGTH; #define CB(name, action, ...) const uint16_t PROGMEM name##_combo[] = {__VA_ARGS__, COMBO_END}; #include "combos.def" #undef CB -combo_t key_combos[COMBO_LENGTH] = { +combo_t key_combos[] = { #define CB(name, action, ...) COMBO(name##_combo, action), #include "combos.def" #undef CB diff --git a/keyboards/40percentclub/gherkin/keymaps/stevexyz/config.h b/keyboards/40percentclub/gherkin/keymaps/stevexyz/config.h index 589a67f03d..c97c9c2f4b 100644 --- a/keyboards/40percentclub/gherkin/keymaps/stevexyz/config.h +++ b/keyboards/40percentclub/gherkin/keymaps/stevexyz/config.h @@ -37,8 +37,6 @@ // how long before oneshot times out #define ONESHOT_TAP_TOGGLE 2 // how many taps before oneshot toggle is triggered - #define COMBO_COUNT 2 - // Set this to the number of combos that you're using in the Combo feature. #define COMBO_TERM 200 // how long for the Combo keys to be detected. Defaults to TAPPING_TERM if not defined. #define TAP_CODE_DELAY 100 diff --git a/keyboards/40percentclub/nori/keymaps/wings_36key/config.h b/keyboards/40percentclub/nori/keymaps/wings_36key/config.h index f076ded9ba..0ac12473e0 100644 --- a/keyboards/40percentclub/nori/keymaps/wings_36key/config.h +++ b/keyboards/40percentclub/nori/keymaps/wings_36key/config.h @@ -19,7 +19,5 @@ #define RETRO_TAPPING_PER_KEY #define TAPPING_TERM_PER_KEY -#define COMBO_COUNT 2 // number of combos used #define COMBO_TERM 40 // time out for combos in ms #define TAPPING_TERM 200 // time out for tap-hold in ms - diff --git a/keyboards/40percentclub/nori/keymaps/wings_36key/keymap.c b/keyboards/40percentclub/nori/keymaps/wings_36key/keymap.c index 40d59ecf76..fc6b19ff3c 100644 --- a/keyboards/40percentclub/nori/keymaps/wings_36key/keymap.c +++ b/keyboards/40percentclub/nori/keymaps/wings_36key/keymap.c @@ -99,14 +99,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { COMBO(df_tab, KC_TAB), COMBO(jk_alt, KC_LALT), }; layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); -} +} uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { switch (keycode) { diff --git a/keyboards/ashpil/modelm_usbc/keymaps/ashpil/config.h b/keyboards/ashpil/modelm_usbc/keymaps/ashpil/config.h index d5cef677e8..59cec33010 100644 --- a/keyboards/ashpil/modelm_usbc/keymaps/ashpil/config.h +++ b/keyboards/ashpil/modelm_usbc/keymaps/ashpil/config.h @@ -20,5 +20,4 @@ /* Add combos */ -#define COMBO_COUNT 1 #define COMBO_TERM 200 diff --git a/keyboards/ashpil/modelm_usbc/keymaps/ashpil/keymap.c b/keyboards/ashpil/modelm_usbc/keymaps/ashpil/keymap.c index 3556aac483..e8df1f0c81 100644 --- a/keyboards/ashpil/modelm_usbc/keymaps/ashpil/keymap.c +++ b/keyboards/ashpil/modelm_usbc/keymaps/ashpil/keymap.c @@ -32,7 +32,7 @@ enum combo_events { const uint16_t PROGMEM reset_combo[] = {KC_LCTL, KC_PAUS, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [CTRL_PAUS_RESET] = COMBO_ACTION(reset_combo), }; @@ -44,4 +44,4 @@ void process_combo_event(uint16_t combo_index, bool pressed) { } break; } -} \ No newline at end of file +} diff --git a/keyboards/b_sides/rev41lp/keymaps/namnlos/config.h b/keyboards/b_sides/rev41lp/keymaps/namnlos/config.h index 19b366f4a8..10f5ddf146 100644 --- a/keyboards/b_sides/rev41lp/keymaps/namnlos/config.h +++ b/keyboards/b_sides/rev41lp/keymaps/namnlos/config.h @@ -21,8 +21,6 @@ #define BACKLIGHT_LIMIT_VAL 255 #define BACKLIGHT_DEFAULT_LEVEL 3 -#define COMBO_COUNT 3 - #define UNICODE_SELECTED_MODES UNICODE_MODE_WINCOMPOSE, UNICODE_MODE_WINDOWS, UNICODE_MODE_MACOS, UNICODE_MODE_LINUX #define QUICK_TAP_TERM 0 diff --git a/keyboards/b_sides/rev41lp/keymaps/namnlos/keymap.c b/keyboards/b_sides/rev41lp/keymaps/namnlos/keymap.c index 0642cdc333..c90f7e25a1 100644 --- a/keyboards/b_sides/rev41lp/keymaps/namnlos/keymap.c +++ b/keyboards/b_sides/rev41lp/keymaps/namnlos/keymap.c @@ -65,7 +65,7 @@ const uint16_t PROGMEM copy_combo[] = {KC_Z, KC_C, COMBO_END}; const uint16_t PROGMEM paste_combo[] = {KC_X, KC_V, COMBO_END}; const uint16_t PROGMEM cut_combo[] = {KC_Z, KC_X, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [ZC_COPY] = COMBO_ACTION(copy_combo), [XV_PASTE] = COMBO_ACTION(paste_combo), [ZX_CUT] = COMBO_ACTION(cut_combo), diff --git a/keyboards/bluebell/swoop/keymaps/kyek/config.h b/keyboards/bluebell/swoop/keymaps/kyek/config.h index e48703e02d..6b06855a5a 100644 --- a/keyboards/bluebell/swoop/keymaps/kyek/config.h +++ b/keyboards/bluebell/swoop/keymaps/kyek/config.h @@ -15,4 +15,3 @@ */ #pragma once #define ONESHOT_TIMEOUT 1000 -#define COMBO_COUNT 2 diff --git a/keyboards/bluebell/swoop/keymaps/kyek/keymap.c b/keyboards/bluebell/swoop/keymaps/kyek/keymap.c index 10fde34180..1901c24f27 100644 --- a/keyboards/bluebell/swoop/keymaps/kyek/keymap.c +++ b/keyboards/bluebell/swoop/keymaps/kyek/keymap.c @@ -33,7 +33,7 @@ enum combos { }; const uint16_t PROGMEM accent_combo[] = {KC_SPC, MO(_SYM1), COMBO_END}; const uint16_t PROGMEM settings_combo[] = {MO(_EXT), SFT_T(KC_SPC), COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [ACC] = COMBO(accent_combo, MO(_ACC)), [SET] = COMBO(settings_combo, MO(_SET)), }; @@ -78,37 +78,37 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_EXT] = LAYOUT_split_3x5_3( KC_ESC, _______, _______, _______, _______, KC_PAGE_UP, KC_HOME, KC_UP, KC_END, KC_CAPS, OS_ALT, OS_GUI, OS_SFT, OS_CTL, OS_RALT, KC_PAGE_DOWN, KC_LEFT, KC_DOWN, KC_RIGHT, KC_DELETE, - UNDO, CUT, COPY, KC_TAB, PASTE, DEL_WORD, KC_BSPC, _______, _______, _______, + UNDO, CUT, COPY, KC_TAB, PASTE, DEL_WORD, KC_BSPC, _______, _______, _______, _______, _______, _______, KC_ENT, FNC, _______ ), [_FNC] = LAYOUT_split_3x5_3( - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, - OS_ALT, OS_GUI, OS_SFT, OS_CTL, OS_RALT, KC_F11, KC_F12, KC_PSCR, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, + OS_ALT, OS_GUI, OS_SFT, OS_CTL, OS_RALT, KC_F11, KC_F12, KC_PSCR, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), [_SYM2] = LAYOUT_split_3x5_3( - IT_CIRC, IT_UNDS, IT_PND, IT_EURO, IT_HASH, _______, _______, _______, _______, _______, - BACKTICK, TILDE, IT_BSLS, IT_PIPE, IT_AMPR, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + IT_CIRC, IT_UNDS, IT_PND, IT_EURO, IT_HASH, _______, _______, _______, _______, _______, + BACKTICK, TILDE, IT_BSLS, IT_PIPE, IT_AMPR, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), [_ACC] = LAYOUT_split_3x5_3( - _______, _______, _______, CEGR, _______, _______, _______, _______, _______, _______, - IT_AGRV, IT_IGRV, IT_OGRV, IT_EGRV, IT_EACU, _______, _______, _______, _______, _______, - _______, _______, _______, IT_UGRV, _______, _______, _______, _______, _______, _______, + _______, _______, _______, CEGR, _______, _______, _______, _______, _______, _______, + IT_AGRV, IT_IGRV, IT_OGRV, IT_EGRV, IT_EACU, _______, _______, _______, _______, _______, + _______, _______, _______, IT_UGRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), [_SET] = LAYOUT_split_3x5_3( - _______, _______, _______, RGB_RMOD, RGB_MOD, RGB_VAI, RGB_VAD, _______, _______, _______, - _______, _______, _______, RGB_M_B, RGB_M_P, RGB_HUI, RGB_HUD, _______, _______, _______, - QK_BOOT, _______, _______, RGB_M_R, RGB_TOG, RGB_SAI, RGB_SAD, _______, _______, QK_BOOT, + _______, _______, _______, RGB_RMOD, RGB_MOD, RGB_VAI, RGB_VAD, _______, _______, _______, + _______, _______, _______, RGB_M_B, RGB_M_P, RGB_HUI, RGB_HUD, _______, _______, _______, + QK_BOOT, _______, _______, RGB_M_R, RGB_TOG, RGB_SAI, RGB_SAD, _______, _______, QK_BOOT, _______, _______, _______, _______, _______, _______ ), // [_TEMP] = LAYOUT_split_3x5_3( -// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, // _______, _______, _______, _______, _______, _______ // ), }; diff --git a/keyboards/centromere/keymaps/mini_bom/config.h b/keyboards/centromere/keymaps/mini_bom/config.h index 7c40fba2a3..7a79437fab 100644 --- a/keyboards/centromere/keymaps/mini_bom/config.h +++ b/keyboards/centromere/keymaps/mini_bom/config.h @@ -17,7 +17,6 @@ #pragma once #ifdef COMBO_ENABLE -# define COMBO_COUNT 10 # define COMBO_TERM 50 #endif diff --git a/keyboards/centromere/keymaps/mini_bom/keymap.c b/keyboards/centromere/keymaps/mini_bom/keymap.c index 82e68aafa5..1dd8f60c5a 100644 --- a/keyboards/centromere/keymaps/mini_bom/keymap.c +++ b/keyboards/centromere/keymaps/mini_bom/keymap.c @@ -20,7 +20,7 @@ // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. // Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. +// entirely and just use numbers. enum centromere_layers @@ -57,7 +57,7 @@ enum centromere_layers * | | | | | | | | * '-------------------------' '-----------------' */ - + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 0: Basic layer @@ -97,7 +97,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_GRV, KC_TILD, KC_TRNS, KC_TRNS, KC_BSLS, KC_NO, KC_NO, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_BTN2, KC_PLUS, KC_MINS, KC_SLSH, KC_ASTR, KC_QUOT, KC_NO, KC_NO, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_BTN1, KC_AMPR, KC_EQL, KC_COMM, KC_DOT, KC_MINS, KC_NO, - CM_TOGG, KC_SCLN, KC_EQL, KC_EQL, KC_SCLN, KC_DEL + CM_TOGG, KC_SCLN, KC_EQL, KC_EQL, KC_SCLN, KC_DEL ), /* Keymap 2: Pad/Function layer @@ -115,7 +115,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_NUMB] = LAYOUT( KC_NO, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_NO, KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_VOLU, KC_NO, - KC_NO, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_VOLD, KC_NO, + KC_NO, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_VOLD, KC_NO, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_MPLY, KC_MNXT ), @@ -137,8 +137,8 @@ const uint16_t PROGMEM combo_less[] = {KC_H, KC_J, COMBO_END}; const uint16_t PROGMEM combo_more[] = {KC_K, KC_L, COMBO_END}; const uint16_t PROGMEM combo_quot[] = {KC_N, KC_M, COMBO_END}; const uint16_t PROGMEM combo_dash[] = {KC_X, KC_C, COMBO_END}; - -combo_t key_combos[COMBO_COUNT] = { + +combo_t key_combos[] = { [COMBO_BSPC] = COMBO(combo_bspc,KC_BSPC), [COMBO_TAB] = COMBO(combo_tab,KC_TAB), [COMBO_ESC] = COMBO(combo_esc,KC_ESC), @@ -148,6 +148,6 @@ combo_t key_combos[COMBO_COUNT] = { [COMBO_LESS] = COMBO(combo_less,KC_LT), [COMBO_MORE] = COMBO(combo_more,KC_GT), [COMBO_QUOT] = COMBO(combo_quot, KC_QUOT), - [COMBO_DASH] = COMBO(combo_dash, KC_MINS), + [COMBO_DASH] = COMBO(combo_dash, KC_MINS), }; #endif diff --git a/keyboards/chord/zero/keymaps/default/keymap.c b/keyboards/chord/zero/keymaps/default/keymap.c index 0469288fd4..a1edbe0cff 100644 --- a/keyboards/chord/zero/keymaps/default/keymap.c +++ b/keyboards/chord/zero/keymaps/default/keymap.c @@ -21,5 +21,3 @@ const uint16_t PROGMEM bootloader_combo[] = { combo_t key_combos[] = { COMBO(bootloader_combo, QK_BOOTLOADER), }; - -uint16_t COMBO_LEN = sizeof(key_combos) / sizeof(key_combos[0]); diff --git a/keyboards/converter/usb_usb/keymaps/chriskopher/combo.c b/keyboards/converter/usb_usb/keymaps/chriskopher/combo.c index 68a3eda04c..3b89488648 100644 --- a/keyboards/converter/usb_usb/keymaps/chriskopher/combo.c +++ b/keyboards/converter/usb_usb/keymaps/chriskopher/combo.c @@ -27,7 +27,7 @@ const uint16_t PROGMEM sd_combo[] = {KC_S, KC_D, COMBO_END}; // Combo: S + D fo const uint16_t PROGMEM kl_combo[] = {KC_K, KC_L, COMBO_END}; // Combo: K + L for Meh modifier // Register the combo action -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [SD_LAYER_COMBO] = COMBO_ACTION(sd_combo), [KL_MEH_COMBO] = COMBO_ACTION(kl_combo), }; diff --git a/keyboards/converter/usb_usb/keymaps/chriskopher/config.h b/keyboards/converter/usb_usb/keymaps/chriskopher/config.h index 04066edc02..8f26d25799 100644 --- a/keyboards/converter/usb_usb/keymaps/chriskopher/config.h +++ b/keyboards/converter/usb_usb/keymaps/chriskopher/config.h @@ -20,5 +20,4 @@ #define HOLD_ON_OTHER_KEY_PRESS_PER_KEY // Allows configuration of hold on other key press per key in keymap.c -#define COMBO_COUNT 2 // Number of defined combos #define COMBO_TERM 20 // Delay for combo keys to be chained together diff --git a/keyboards/converter/usb_usb/keymaps/narze/config.h b/keyboards/converter/usb_usb/keymaps/narze/config.h index fddd9cd376..a7fccc4187 100644 --- a/keyboards/converter/usb_usb/keymaps/narze/config.h +++ b/keyboards/converter/usb_usb/keymaps/narze/config.h @@ -24,7 +24,6 @@ #define TAPPING_TERM 100 #define COMBO_TERM 20 -#define COMBO_COUNT 1 #define PERMISSIVE_HOLD diff --git a/keyboards/crkbd/keymaps/antosha417/keymap.c b/keyboards/crkbd/keymaps/antosha417/keymap.c index bdee148485..47771b531e 100644 --- a/keyboards/crkbd/keymaps/antosha417/keymap.c +++ b/keyboards/crkbd/keymaps/antosha417/keymap.c @@ -165,11 +165,8 @@ enum combo_events { DELQ_COMBO, SAVEQ_COMBO, BSPCQ_COMBO, - BSPCWQ_COMBO, - - COMBO_LENGTH + BSPCWQ_COMBO }; -uint16_t COMBO_LEN = COMBO_LENGTH; const uint16_t PROGMEM ru_combo[] = {KC_R, U_CTRL, COMBO_END}; const uint16_t PROGMEM en_combo[] = {U_CTRL, S_ALT, COMBO_END}; @@ -216,7 +213,7 @@ combo_t key_combos[] = { [SAVEQ_COMBO] = COMBO(saveq_combo, VIM_SAVE), [BSPCWQ_COMBO] = COMBO(bspcwq_combo, DELETE_WORD), }; - + #ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { @@ -398,4 +395,3 @@ void matrix_scan_user(void) { #include "mod_tap_keys.h" #undef MOD_TAP_KEY } - diff --git a/keyboards/crkbd/keymaps/cameronjlarsen/keymap.c b/keyboards/crkbd/keymaps/cameronjlarsen/keymap.c index e7bccb5c73..54ad19dc0b 100644 --- a/keyboards/crkbd/keymaps/cameronjlarsen/keymap.c +++ b/keyboards/crkbd/keymaps/cameronjlarsen/keymap.c @@ -30,7 +30,7 @@ enum layers { // One shot mods enum keycodes { - OS_SHFT = QK_USER, + OS_SHFT = QK_USER, OS_CTRL, OS_ALT, OS_GUI, @@ -159,11 +159,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; enum combo_events { - CAPS_COMBO, - // Other combos... - COMBO_LENGTH + CAPS_COMBO }; -uint16_t COMBO_LEN = COMBO_LENGTH; const uint16_t PROGMEM caps_combo[] = {KC_F, KC_J, COMBO_END}; diff --git a/keyboards/crkbd/keymaps/markstos/config.h b/keyboards/crkbd/keymaps/markstos/config.h index 5644812e5e..24101724de 100644 --- a/keyboards/crkbd/keymaps/markstos/config.h +++ b/keyboards/crkbd/keymaps/markstos/config.h @@ -43,11 +43,9 @@ This is the C configuration file for the keymap #define QMK_SPEAKER C6 // When enabled, typing a mod-tap plus second within term will register as the mod-combo -// Ref: https://beta.docs.qmk.fm/using-qmk/software-features/tap_hold#permissive-hold +// Ref: https://beta.docs.qmk.fm/using-qmk/software-features/tap_hold#permissive-hold #define PERMISSIVE_HOLD -#define COMBO_COUNT 2 - // Set the COMBO_TERM so low that I won't type the keys one after each other during normal typing. // They would have be held together intentionally to trigger this. #define COMBO_TERM 40 @@ -56,4 +54,3 @@ This is the C configuration file for the keymap // I want a relatively low timeout, so if I accidentally type "Shift", I can pause just briefly and move on. #define ONESHOT_TAP_TOGGLE 3 /* Tapping this number of times holds the key until tapped once again. */ #define ONESHOT_TIMEOUT 2000 /* Time (in ms) before the one shot key is released */ - diff --git a/keyboards/crkbd/keymaps/markstos/keymap.c b/keyboards/crkbd/keymaps/markstos/keymap.c index ca5be183b1..1f95ee52b2 100644 --- a/keyboards/crkbd/keymaps/markstos/keymap.c +++ b/keyboards/crkbd/keymaps/markstos/keymap.c @@ -18,7 +18,7 @@ enum combos { const uint16_t PROGMEM df_combo[] = {KC_D, KC_F, COMBO_END}; const uint16_t PROGMEM jk_combo[] = {KC_J, KC_K, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { // Add commonly used dash to home row [DF_DASH] = COMBO(df_combo, KC_MINS), // For Vim, put Escape on the home row @@ -43,7 +43,7 @@ enum custom_layers { #define GUI_ENT GUI_T(KC_ENT) #define LOW_TAB LT(_LOWER, KC_TAB) #define RSE_BSP LT(_RAISE, KC_BSPC) -#define OSM_SFT OSM(MOD_LSFT) +#define OSM_SFT OSM(MOD_LSFT) // For _RAISE layer diff --git a/keyboards/crkbd/keymaps/nimishgautam/config.h b/keyboards/crkbd/keymaps/nimishgautam/config.h index d169988be7..b4c5bc9e0a 100644 --- a/keyboards/crkbd/keymaps/nimishgautam/config.h +++ b/keyboards/crkbd/keymaps/nimishgautam/config.h @@ -15,7 +15,6 @@ // combo -#define COMBO_COUNT 7 #define EXTRA_SHORT_COMBOS //Tapping values @@ -68,7 +67,7 @@ // NOTE: the below effects are super cool but they go absolutely nuts if you manually set hsv colors (eg with layers) //#define ENABLE_RGB_MATRIX_TYPING_HEATMAP - //#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + //#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH //#define ENABLE_RGB_MATRIX_SOLID_REACTIVE #endif diff --git a/keyboards/crkbd/keymaps/nimishgautam/keymap.c b/keyboards/crkbd/keymaps/nimishgautam/keymap.c index 0c0a3e3544..389a5bfdb1 100644 --- a/keyboards/crkbd/keymaps/nimishgautam/keymap.c +++ b/keyboards/crkbd/keymaps/nimishgautam/keymap.c @@ -20,7 +20,7 @@ enum custom_key_codes { MOVE_END_LINE_TERMINAL, // move to the end of the line in the terminal /* macros */ PASTE_VIM, // paste in vim from system register - ACIRCLE, // å + ACIRCLE, // å ADOT, // ä ODOT, // ö COMPOSE_MACRO, // compose key for mac or linux @@ -44,7 +44,7 @@ enum { #define SHOW_WINDOWS LCTL(KC_UP) //'Expose' on Mac, overview on linux. Just all the windows #define WINDOW_LEFT LCTL(LGUI(LSFT(KC_LEFT))) //custom shortcut for this feature -- make window take up 50% left screen (using gui and ctl to make it os agnostic) #define WINDOW_RIGHT LCTL(LGUI(LSFT(KC_RIGHT))) //custom shortcut for this feature -- make window take up 50% right screen (using gui and ctl to make it os agnostic)/fully custom shortcut, using ctl and gui keys so will need them both irrespective of os -#define SHOW_APP_WINDOWS LCTL(KC_DOWN) +#define SHOW_APP_WINDOWS LCTL(KC_DOWN) #define LOCK_SCREEN LCTL(LGUI(KC_Q)) //manually set this on linux to match osx default #define EURO LALT(LSFT(KC_2)) #define EMOJI_KBD LCTL(LGUI(KC_SPACE)) //manually set this on linux to match osx default, with 'emote' on linux and a custom shortcut (probably better to use compose feature) @@ -86,7 +86,7 @@ const uint16_t PROGMEM adot_combo[] = {KC_BSPC, KC_SPACE, MT(MOD_RALT,KC_L), COM // combo - press combo+ ; to get ö const uint16_t PROGMEM odot_combo[] = {KC_BSPC, KC_SPACE, MT(MOD_LCTL,KC_SCLN),COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { COMBO(compose_combo, COMPOSE_MACRO), COMBO(search_combo, FINDER), COMBO(calculator_combo, CALCULATOR), @@ -113,7 +113,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_NUMS] = LAYOUT_split_3x6_3( //numbers //,-----------------------------------------------------. ,-----------------------------------------------------. - SCREENSHOT, KC_EXCLAIM,KC_AT, KC_HASH, KC_DOLLAR,KC_PERCENT, KC_CIRCUMFLEX, KC_7, KC_8, KC_9, KC_TRANSPARENT, KC_PIPE, + SCREENSHOT, KC_EXCLAIM,KC_AT, KC_HASH, KC_DOLLAR,KC_PERCENT, KC_CIRCUMFLEX, KC_7, KC_8, KC_9, KC_TRANSPARENT, KC_PIPE, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| TO(_BASE), KC_LCTL, KC_LALT, KC_RSFT, KC_LGUI,KC_PLUS, KC_EQL, KC_4, KC_5, KC_6, KC_BSLS, KC_TRANSPARENT, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| @@ -125,7 +125,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_NUM_MASK] = LAYOUT_split_3x6_3( //NUM MASK, so I can still have backspace/enter/tab etc but with the nums, arrows and formatters too //,-----------------------------------------------------. ,-----------------------------------------------------. - KC_TRANSPARENT, KC_TRANSPARENT,KC_TRANSPARENT, KC_UP, KC_TRANSPARENT,KC_TRANSPARENT, KC_TRANSPARENT, KC_7, KC_8, KC_9, KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT,KC_TRANSPARENT, KC_UP, KC_TRANSPARENT,KC_TRANSPARENT, KC_TRANSPARENT, KC_7, KC_8, KC_9, KC_TRANSPARENT, KC_TRANSPARENT, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| TO(_BASE), KC_TRANSPARENT, KC_LEFT, KC_DOWN, KC_RIGHT,KC_TRANSPARENT, KC_TRANSPARENT, KC_4, KC_5, KC_6, KC_TRANSPARENT, KC_TRANSPARENT, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| @@ -164,7 +164,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_FN_KEYS] = LAYOUT_split_3x6_3( //fn keys, terminal text navigation keys //,-----------------------------------------------------. ,-----------------------------------------------------. - KC_TRANSPARENT, KC_LCBR,KC_LBRC, KC_RBRC, KC_RCBR, MOVE_BEGIN_LINE_TERMINAL, MOVE_END_LINE_TERMINAL, KC_F7, KC_F8, KC_F9, KC_F11, KC_TRANSPARENT, + KC_TRANSPARENT, KC_LCBR,KC_LBRC, KC_RBRC, KC_RCBR, MOVE_BEGIN_LINE_TERMINAL, MOVE_END_LINE_TERMINAL, KC_F7, KC_F8, KC_F9, KC_F11, KC_TRANSPARENT, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| TO(_BASE), KC_LCTL, KC_LALT, KC_RSFT, KC_LGUI, KC_TRANSPARENT, KC_TRANSPARENT, KC_F4, KC_F5, KC_F6, KC_F12, KC_TRANSPARENT, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| @@ -173,7 +173,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT , KC_HASH , KC_TRANSPARENT, KC_F10 //`--------------------------' `--------------------------' ) - + }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { @@ -183,19 +183,19 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // as of this writing, you can't do a layer tap (LT) // and also send a shifted code, like left parens - // If you call such a function, it'll do the layer shift but + // If you call such a function, it'll do the layer shift but // it'll ignore the key code on tap... this is the workaround - + case LT(_NUMS,KC_LPRN): // Shift to _NUMS layer on hold, but send left paren on press if (record->tap.count && record->event.pressed) { - tap_code16(KC_LPRN); - return false; + tap_code16(KC_LPRN); + return false; } break; case LT(_NUMS,KC_RPRN): // Shift to _NUMS on hold, send right parens on press if (record->tap.count && record->event.pressed) { - tap_code16(KC_RPRN); - return false; + tap_code16(KC_RPRN); + return false; } break; @@ -203,20 +203,20 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->tap.count && record->event.pressed) { tap_code16(SHOW_WINDOWS); // Intercept tap function } else if (record->event.pressed) { - tap_code16(WINDOW_LEFT); // Intercept hold function + tap_code16(WINDOW_LEFT); // Intercept hold function } return false; break; - + case LT(0, NUMERIC_WIN_RIGHT): if (record->tap.count && record->event.pressed) { layer_on(_NUM_MASK);// Intercept tap function } else if (record->event.pressed) { - tap_code16(WINDOW_RIGHT); // Intercept hold function + tap_code16(WINDOW_RIGHT); // Intercept hold function } return false; break; - + case PASTE_VIM: if (record->event.pressed){ SEND_STRING(SS_TAP(X_ESCAPE)"\"+pi"); @@ -225,7 +225,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; //only read the keymap config if it's one of the below cases (instead of every time) - case DEL_WORD: + case DEL_WORD: case SELECT_LEFT_WD: case SELECT_RIGHT_WD: case SELECT_LEFT_LINE: @@ -235,7 +235,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case MOVE_LEFT_LINE: case MOVE_RIGHT_LINE: case PASTE_NOSTYLE: - case MOVE_BEGIN_LINE_TERMINAL: + case MOVE_BEGIN_LINE_TERMINAL: case MOVE_END_LINE_TERMINAL: case ACIRCLE: case ADOT: @@ -313,28 +313,28 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if(keymap_config.swap_lctl_lgui){ //Linux tap_code16(LCTL(RSFT(KC_V))); } else { //osx - tap_code16(LGUI(LALT(LSFT(KC_V)))); + tap_code16(LGUI(LALT(LSFT(KC_V)))); } break; case MOVE_BEGIN_LINE_TERMINAL: if(keymap_config.swap_lctl_lgui){ //Linux tap_code16(KC_HOME); } else { //osx - tap_code16(LSFT(KC_HOME)); + tap_code16(LSFT(KC_HOME)); } break; case MOVE_END_LINE_TERMINAL: if(keymap_config.swap_lctl_lgui){ //Linux tap_code16(KC_END); } else { //osx - tap_code16(LSFT(KC_END)); + tap_code16(LSFT(KC_END)); } break; case ACIRCLE: // å if(keymap_config.swap_lctl_lgui){ //Linux SEND_STRING(SS_TAP(X_COMPOSE_KEY)"aa"); } else { //osx - tap_code16(LALT(KC_A)); + tap_code16(LALT(KC_A)); } break; case ADOT: // ä @@ -351,14 +351,14 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { SEND_STRING(SS_LALT("u")"o"); } break; - case COMPOSE_MACRO: + case COMPOSE_MACRO: if(keymap_config.swap_lctl_lgui){ //Linux tap_code16(COMPOSE_KEY); } else { //osx tap_code16(COMPOSE_MAC); } break; - case SCREENSHOT: + case SCREENSHOT: if(keymap_config.swap_lctl_lgui){ //Linux tap_code16(KC_PSCR); } else { //osx @@ -381,7 +381,7 @@ void dance_left_finished (tap_dance_state_t *state, void *user_data) { if(keymap_config.swap_lctl_lgui){ //Linux tap_code16(KC_HOME); } else { //osx - tap_code16(LGUI(KC_LEFT)); + tap_code16(LGUI(KC_LEFT)); } } else { //2 taps, make a circumflex tap_code16(KC_CIRC); @@ -394,7 +394,7 @@ void dance_right_finished (tap_dance_state_t *state, void *user_data) { if(keymap_config.swap_lctl_lgui){ //Linux tap_code16(KC_END); } else { //osx - tap_code16(LGUI(KC_RIGHT)); + tap_code16(LGUI(KC_RIGHT)); } } else { //2 taps, dollar tap_code16(KC_DOLLAR); @@ -429,7 +429,7 @@ void set_lighting_user(void) { led_t led_state = host_keyboard_led_state(); if(led_state.caps_lock){ rgblight_sethsv_noeeprom(HSV_RED); - } + } //rgblight_sethsv(HSV_OFF); break; case _NUMS: @@ -482,7 +482,7 @@ void oled_render_general_state(void){ else { oled_write_ln_P(PSTR("OSX"), false); } - + //oled_write_ln(get_u8_str(get_current_wpm(), '0'), false); /* led_t led_state = host_keyboard_led_state(); @@ -492,7 +492,7 @@ void oled_render_general_state(void){ //Layer color has to be handled by master - // led state doesn't have to be handled by master, but + // led state doesn't have to be handled by master, but // the keyboard will freeze if you type too fast // and have this handled on the slave side @@ -541,7 +541,7 @@ void oled_render_layer_mod_state(void) { break; case _FN_KEYS: oled_write_ln_P(PSTR("Fn"), false); - break; + break; default: break; } @@ -575,7 +575,7 @@ void oled_render_layer_mod_state(void) { bool oled_task_user(void) { if (is_keyboard_master()) { oled_render_general_state(); - } + } else { oled_render_layer_mod_state(); } diff --git a/keyboards/crkbd/keymaps/pdl/config.h b/keyboards/crkbd/keymaps/pdl/config.h index b25d48de02..f2a5a522ea 100644 --- a/keyboards/crkbd/keymaps/pdl/config.h +++ b/keyboards/crkbd/keymaps/pdl/config.h @@ -26,5 +26,4 @@ along with this program. If not, see . #define TAPPING_TERM 200 #define COMBO_PDL -#define COMBO_COUNT 28 #define COMBO_TERM 100 diff --git a/keyboards/drhigsby/dubba175/keymaps/default/config.h b/keyboards/drhigsby/dubba175/keymaps/default/config.h index 7a4761b1ae..8f9a59ed69 100644 --- a/keyboards/drhigsby/dubba175/keymaps/default/config.h +++ b/keyboards/drhigsby/dubba175/keymaps/default/config.h @@ -15,5 +15,4 @@ */ #pragma once -#define COMBO_COUNT 8 #define COMBO_TERM 40 diff --git a/keyboards/drhigsby/dubba175/keymaps/default/keymap.c b/keyboards/drhigsby/dubba175/keymaps/default/keymap.c index 37bae5b435..9a701bc9fe 100644 --- a/keyboards/drhigsby/dubba175/keymaps/default/keymap.c +++ b/keyboards/drhigsby/dubba175/keymaps/default/keymap.c @@ -42,7 +42,7 @@ const uint16_t PROGMEM lprn_combo[] = {KC_X, KC_C, COMBO_END}; const uint16_t PROGMEM rprn_combo[] = {KC_COMM, KC_DOT, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [combo_ESC] = COMBO(esc_combo, KC_ESC), [combo_BACK] = COMBO(bspc_combo, KC_BSPC), [combo_TAB] = COMBO(tab_combo, KC_TAB), @@ -71,12 +71,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_HOME, KC_END, KC_PIPE, KC_BSLS, KC_DQUO, KC_QUOT, xxx, xxx, xxx, xxx, KC_PGUP, KC_PGDN ), - + [_FN] = LAYOUT( KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, KC_F11, KC_F12, - xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, - xxx, xxx, xxx, xxx, xxx, xxx + xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, + xxx, xxx, xxx, xxx, xxx, xxx ) }; diff --git a/keyboards/drhigsby/ogurec/keymaps/default/config.h b/keyboards/drhigsby/ogurec/keymaps/default/config.h index 9ff2d89acc..5d9acf020f 100644 --- a/keyboards/drhigsby/ogurec/keymaps/default/config.h +++ b/keyboards/drhigsby/ogurec/keymaps/default/config.h @@ -15,5 +15,4 @@ */ #pragma once -#define COMBO_COUNT 7 #define COMBO_TERM 40 diff --git a/keyboards/drhigsby/ogurec/keymaps/default/keymap.c b/keyboards/drhigsby/ogurec/keymaps/default/keymap.c index 691f5c95a1..42a6f94781 100644 --- a/keyboards/drhigsby/ogurec/keymaps/default/keymap.c +++ b/keyboards/drhigsby/ogurec/keymaps/default/keymap.c @@ -40,7 +40,7 @@ const uint16_t PROGMEM lprn_combo[] = {KC_X, KC_C, COMBO_END}; const uint16_t PROGMEM rprn_combo[] = {KC_COMM, KC_DOT, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [combo_ESC] = COMBO(esc_combo, KC_ESC), [combo_BACK] = COMBO(bspc_combo, KC_BSPC), [combo_TAB] = COMBO(tab_combo, KC_TAB), @@ -68,9 +68,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_FN] = LAYOUT_ortho_3x12( - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, - KC_VOLD, KC_VOLU, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, KC_MUTE, KC_MRWD, KC_MFFD, xxx, xxx, xxx + KC_VOLD, KC_VOLU, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, KC_MUTE, KC_MRWD, KC_MFFD, xxx, xxx, xxx ) }; diff --git a/keyboards/drhigsby/packrat/keymaps/3uc/config.h b/keyboards/drhigsby/packrat/keymaps/3uc/config.h index 9ff2d89acc..5d9acf020f 100644 --- a/keyboards/drhigsby/packrat/keymaps/3uc/config.h +++ b/keyboards/drhigsby/packrat/keymaps/3uc/config.h @@ -15,5 +15,4 @@ */ #pragma once -#define COMBO_COUNT 7 #define COMBO_TERM 40 diff --git a/keyboards/drhigsby/packrat/keymaps/3uc/keymap.c b/keyboards/drhigsby/packrat/keymaps/3uc/keymap.c index f037a47acb..110d76f2cd 100644 --- a/keyboards/drhigsby/packrat/keymaps/3uc/keymap.c +++ b/keyboards/drhigsby/packrat/keymaps/3uc/keymap.c @@ -42,7 +42,7 @@ const uint16_t PROGMEM lprn_combo[] = {KC_X, KC_C, COMBO_END}; const uint16_t PROGMEM rprn_combo[] = {KC_COMM, KC_DOT, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [combo_ESC] = COMBO(esc_combo, KC_ESC), [combo_BACK] = COMBO(bspc_combo, KC_BSPC), [combo_TAB] = COMBO(tab_combo, KC_TAB), @@ -77,7 +77,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { xxx, xxx, xxx, xxx, xxx, BASE, xxx, KC_P7, KC_P8, KC_P9, KC_PPLS, xxx, xxx, xxx, xxx, xxx, xxx, xxx, KC_P4, KC_P5, KC_P6, KC_PCMM, xxx, xxx, xxx, xxx, xxx, xxx, xxx, KC_P1, KC_P2, KC_P3, KC_PEQL, - xxx, xxx, xxx, xxx, KC_P0, KC_PDOT, KC_PENT + xxx, xxx, xxx, xxx, KC_P0, KC_PDOT, KC_PENT ), @@ -85,8 +85,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, xxx, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, KC_F11, KC_F12, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, - xxx, xxx, xxx, xxx, xxx, xxx, xxx + xxx, xxx, xxx, xxx, xxx, xxx, xxx ) }; - diff --git a/keyboards/drhigsby/packrat/keymaps/default/config.h b/keyboards/drhigsby/packrat/keymaps/default/config.h index 9ff2d89acc..5d9acf020f 100644 --- a/keyboards/drhigsby/packrat/keymaps/default/config.h +++ b/keyboards/drhigsby/packrat/keymaps/default/config.h @@ -15,5 +15,4 @@ */ #pragma once -#define COMBO_COUNT 7 #define COMBO_TERM 40 diff --git a/keyboards/drhigsby/packrat/keymaps/default/keymap.c b/keyboards/drhigsby/packrat/keymaps/default/keymap.c index 74df6a73e6..fbc814b2b4 100644 --- a/keyboards/drhigsby/packrat/keymaps/default/keymap.c +++ b/keyboards/drhigsby/packrat/keymaps/default/keymap.c @@ -41,7 +41,7 @@ const uint16_t PROGMEM lprn_combo[] = {KC_X, KC_C, COMBO_END}; const uint16_t PROGMEM rprn_combo[] = {KC_COMM, KC_DOT, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [combo_ESC] = COMBO(esc_combo, KC_ESC), [combo_BACK] = COMBO(bspc_combo, KC_BSPC), [combo_TAB] = COMBO(tab_combo, KC_TAB), @@ -74,8 +74,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, xxx, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, KC_F11, KC_F12, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, - xxx, xxx, xxx, xxx, xxx, xxx + xxx, xxx, xxx, xxx, xxx, xxx ) }; - diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h b/keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h index e90d7184ee..05d30392ff 100644 --- a/keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h @@ -30,10 +30,8 @@ #undef ONESHOT_TIMEOUT #define ONESHOT_TIMEOUT 5000 -#define COMBO_COUNT 4 #define COMBO_TERM 200 - #undef RGBLIGHT_HUE_STEP #define RGBLIGHT_HUE_STEP 24 diff --git a/keyboards/eu_isolation/keymaps/bigspace/config.h b/keyboards/eu_isolation/keymaps/bigspace/config.h index 96783a4c87..ad4389af3e 100644 --- a/keyboards/eu_isolation/keymaps/bigspace/config.h +++ b/keyboards/eu_isolation/keymaps/bigspace/config.h @@ -1,19 +1,18 @@ /* Copyright 2020 Austin "TuckTuckFloof" Ashmore -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 2 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -*/ +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +*/ #pragma once -#define COMBO_COUNT 5 #define COMBO_TERM 175 diff --git a/keyboards/eu_isolation/keymaps/bigspace/keymap.c b/keyboards/eu_isolation/keymaps/bigspace/keymap.c index 8970e217fb..7568659de0 100644 --- a/keyboards/eu_isolation/keymaps/bigspace/keymap.c +++ b/keyboards/eu_isolation/keymaps/bigspace/keymap.c @@ -1,16 +1,16 @@ /* Copyright 2020 Austin "TuckTuckFloof" Ashmore -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 2 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . */ #include QMK_KEYBOARD_H @@ -31,7 +31,7 @@ enum WOMBO_COMBOS { const uint16_t PROGMEM VOLUME_UP_COMBO[] = { KC_F1, KC_F2, COMBO_END }; const uint16_t PROGMEM VOLUME_DN_COMBO[] = { KC_F3, KC_F4, COMBO_END }; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [VOLUME_UP] = COMBO(VOLUME_UP_COMBO, KC_VOLU), [VOLUME_DOWN] = COMBO(VOLUME_DN_COMBO, KC_VOLD) }; diff --git a/keyboards/eu_isolation/keymaps/default/config.h b/keyboards/eu_isolation/keymaps/default/config.h index cb82301892..ad4389af3e 100644 --- a/keyboards/eu_isolation/keymaps/default/config.h +++ b/keyboards/eu_isolation/keymaps/default/config.h @@ -1,19 +1,18 @@ /* Copyright 2020 Austin "TuckTuckFloof" Ashmore * -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 2 of the License, or -* (at your option) any later version. +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 2 of the License, or +* (at your option) any later version. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . */ #pragma once -#define COMBO_COUNT 5 #define COMBO_TERM 175 diff --git a/keyboards/eu_isolation/keymaps/default/keymap.c b/keyboards/eu_isolation/keymaps/default/keymap.c index fc433815ff..65dc381974 100644 --- a/keyboards/eu_isolation/keymaps/default/keymap.c +++ b/keyboards/eu_isolation/keymaps/default/keymap.c @@ -1,16 +1,16 @@ /* Copyright 2020 Austin "TuckTuckFloof" Ashmore * -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 2 of the License, or -* (at your option) any later version. +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 2 of the License, or +* (at your option) any later version. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . */ #include QMK_KEYBOARD_H @@ -31,7 +31,7 @@ enum WOMBO_COMBOS { const uint16_t PROGMEM VOLUME_UP_COMBO[] = { KC_F1, KC_F2, COMBO_END }; const uint16_t PROGMEM VOLUME_DN_COMBO[] = { KC_F3, KC_F4, COMBO_END }; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [VOLUME_UP] = COMBO(VOLUME_UP_COMBO, KC_VOLU), [VOLUME_DOWN] = COMBO(VOLUME_DN_COMBO, KC_VOLD) }; diff --git a/keyboards/eu_isolation/keymaps/mit/config.h b/keyboards/eu_isolation/keymaps/mit/config.h index cb82301892..ad4389af3e 100644 --- a/keyboards/eu_isolation/keymaps/mit/config.h +++ b/keyboards/eu_isolation/keymaps/mit/config.h @@ -1,19 +1,18 @@ /* Copyright 2020 Austin "TuckTuckFloof" Ashmore * -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 2 of the License, or -* (at your option) any later version. +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 2 of the License, or +* (at your option) any later version. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . */ #pragma once -#define COMBO_COUNT 5 #define COMBO_TERM 175 diff --git a/keyboards/eu_isolation/keymaps/mit/keymap.c b/keyboards/eu_isolation/keymaps/mit/keymap.c index 208e61b3e1..68cdaa750a 100644 --- a/keyboards/eu_isolation/keymaps/mit/keymap.c +++ b/keyboards/eu_isolation/keymaps/mit/keymap.c @@ -1,16 +1,16 @@ /* Copyright 2020 Austin "TuckTuckFloof" Ashmore * -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 2 of the License, or -* (at your option) any later version. +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 2 of the License, or +* (at your option) any later version. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . */ #include QMK_KEYBOARD_H @@ -31,7 +31,7 @@ enum WOMBO_COMBOS { const uint16_t PROGMEM VOLUME_UP_COMBO[] = { KC_F1, KC_F2, COMBO_END }; const uint16_t PROGMEM VOLUME_DN_COMBO[] = { KC_F3, KC_F4, COMBO_END }; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [VOLUME_UP] = COMBO(VOLUME_UP_COMBO, KC_VOLU), [VOLUME_DOWN] = COMBO(VOLUME_DN_COMBO, KC_VOLD) }; diff --git a/keyboards/foostan/cornelius/keymaps/pdl/config.h b/keyboards/foostan/cornelius/keymaps/pdl/config.h index b25d48de02..f2a5a522ea 100644 --- a/keyboards/foostan/cornelius/keymaps/pdl/config.h +++ b/keyboards/foostan/cornelius/keymaps/pdl/config.h @@ -26,5 +26,4 @@ along with this program. If not, see . #define TAPPING_TERM 200 #define COMBO_PDL -#define COMBO_COUNT 28 #define COMBO_TERM 100 diff --git a/keyboards/free_willy/keymaps/colemak/config.h b/keyboards/free_willy/keymaps/colemak/config.h index a9f255d42b..e94eb1842b 100644 --- a/keyboards/free_willy/keymaps/colemak/config.h +++ b/keyboards/free_willy/keymaps/colemak/config.h @@ -16,5 +16,4 @@ #pragma once /* Combos */ -#define COMBO_COUNT 5 #define COMBO_TERM 50 diff --git a/keyboards/free_willy/keymaps/colemak/keymap.c b/keyboards/free_willy/keymaps/colemak/keymap.c index 5be593ad50..54dba8f02e 100644 --- a/keyboards/free_willy/keymaps/colemak/keymap.c +++ b/keyboards/free_willy/keymaps/colemak/keymap.c @@ -63,7 +63,7 @@ const uint16_t PROGMEM combo_esc[] = {KC_N, KC_T, COMBO_END}; const uint16_t PROGMEM combo_del[] = {KC_MINS, KC_EQL, COMBO_END}; const uint16_t PROGMEM combo_ret[] = {KC_LGUI, KC_LALT, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { //[COMBO_BSPC] = COMBO(combo_bspc,KC_BSPC), [COMBO_NUMBAK] = COMBO(combo_numbak,KC_BSPC), [COMBO_TAB] = COMBO(combo_tab,KC_TAB), diff --git a/keyboards/free_willy/keymaps/default/config.h b/keyboards/free_willy/keymaps/default/config.h index a9f255d42b..e94eb1842b 100644 --- a/keyboards/free_willy/keymaps/default/config.h +++ b/keyboards/free_willy/keymaps/default/config.h @@ -16,5 +16,4 @@ #pragma once /* Combos */ -#define COMBO_COUNT 5 #define COMBO_TERM 50 diff --git a/keyboards/free_willy/keymaps/default/keymap.c b/keyboards/free_willy/keymaps/default/keymap.c index 0801caf412..de377d7513 100644 --- a/keyboards/free_willy/keymaps/default/keymap.c +++ b/keyboards/free_willy/keymaps/default/keymap.c @@ -63,7 +63,7 @@ const uint16_t PROGMEM combo_tab[] = {KC_Q, KC_W, COMBO_END}; const uint16_t PROGMEM combo_esc[] = {KC_J, KC_F, COMBO_END}; const uint16_t PROGMEM combo_del[] = {KC_MINS, KC_EQL, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { //[COMBO_BSPC] = COMBO(combo_bspc,KC_BSPC), [COMBO_NUMBAK] = COMBO(combo_numbak,KC_BSPC), [COMBO_TAB] = COMBO(combo_tab,KC_TAB), diff --git a/keyboards/gboards/g/keymap_combo.h b/keyboards/gboards/g/keymap_combo.h index c062a298a5..33520d18af 100644 --- a/keyboards/gboards/g/keymap_combo.h +++ b/keyboards/gboards/g/keymap_combo.h @@ -41,10 +41,7 @@ #define TOGG A_ENUM enum combos { #include "combos.def" - COMBO_LENGTH }; -// Export length to combo module -uint16_t COMBO_LEN = COMBO_LENGTH; // Bake combos into mem #undef COMB diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/config.h b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/config.h index da70d56b7b..ece08ecfee 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/config.h +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/config.h @@ -14,7 +14,6 @@ * along with this program. If not, see . */ -#define COMBO_COUNT 1 #define COMBO_TERM 100 #define RGB_MATRIX_KEYPRESSES diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/keymap.c index 30c59e941d..70b60526ce 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/keymap.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/keymap.c @@ -17,7 +17,7 @@ const uint16_t PROGMEM jk_combo[] = {KC_J, KC_K, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [JK_ESC] = COMBO(jk_combo, KC_ESC), }; diff --git a/keyboards/handwired/aek64/keymaps/4sstylz/config.h b/keyboards/handwired/aek64/keymaps/4sstylz/config.h deleted file mode 100644 index 914861332f..0000000000 --- a/keyboards/handwired/aek64/keymaps/4sstylz/config.h +++ /dev/null @@ -1,3 +0,0 @@ -#pragma once - -#define COMBO_COUNT 1 diff --git a/keyboards/handwired/aek64/keymaps/4sstylz/keymap.c b/keyboards/handwired/aek64/keymaps/4sstylz/keymap.c index bdfce062d3..8f136b51fd 100644 --- a/keyboards/handwired/aek64/keymaps/4sstylz/keymap.c +++ b/keyboards/handwired/aek64/keymaps/4sstylz/keymap.c @@ -15,7 +15,7 @@ enum custom_keycodes { }; const uint16_t PROGMEM lock_combo[] = {KC_J, KC_K, KC_L, KC_SCLN, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = {COMBO(lock_combo, LGUI(KC_O))}; +combo_t key_combos[] = {COMBO(lock_combo, LGUI(KC_O))}; // Define the keycodes for one qwerty layer and one Fn layer. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -32,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * │ Ctrl │ Alt │↯ATab │ Space │ Gui │ Alt │ Ctrl │ * └──────┴──────┴──────┴──────────────────────────────────────────────────────────────┴──────┴──────┴──────┘ * - * Hidden features :  + * Hidden features : * - Left Shift is also Home on a single tap. * - Left Ctrl is also End on a single tap. * - Right Shift is also page-up on a single tap. diff --git a/keyboards/ibnuda/alicia_cook/keymaps/rick/config.h b/keyboards/ibnuda/alicia_cook/keymaps/rick/config.h index ccfd50638b..d4b4480810 100644 --- a/keyboards/ibnuda/alicia_cook/keymaps/rick/config.h +++ b/keyboards/ibnuda/alicia_cook/keymaps/rick/config.h @@ -16,7 +16,6 @@ #pragma once #define COMBO_TERM 50 -#define COMBO_COUNT 50 #define PERMISSIVE_HOLD #define TAPPING_TERM 175 #define TAPPING_TERM 175 diff --git a/keyboards/ibnuda/alicia_cook/keymaps/rick/keymap.c b/keyboards/ibnuda/alicia_cook/keymaps/rick/keymap.c index 88c3784754..9c1f0cb63e 100644 --- a/keyboards/ibnuda/alicia_cook/keymaps/rick/keymap.c +++ b/keyboards/ibnuda/alicia_cook/keymaps/rick/keymap.c @@ -188,7 +188,7 @@ const uint16_t PROGMEM rl_r_m_i_combo[] = {RLR, RLM, RLI, COMBO_END}; // both hand combinations. const uint16_t PROGMEM bl_m_m_combo[] = {LLM, RLM, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { // left hand combinations. [L_U_PINKY_RING] = COMBO(lu_p_r_combo, KC_TAB), [L_U_RING_MIDDLE] = COMBO(lu_r_m_combo, KC_QUES), diff --git a/keyboards/ibnuda/squiggle/keymaps/default/config.h b/keyboards/ibnuda/squiggle/keymaps/default/config.h index 6411ba8c66..22ceb2f996 100644 --- a/keyboards/ibnuda/squiggle/keymaps/default/config.h +++ b/keyboards/ibnuda/squiggle/keymaps/default/config.h @@ -1,5 +1,4 @@ #pragma once #define COMBO_TERM 100 -#define COMBO_COUNT 38 #define PERMISSIVE_HOLD diff --git a/keyboards/ibnuda/squiggle/keymaps/default/keymap.c b/keyboards/ibnuda/squiggle/keymaps/default/keymap.c index c85099a144..47269b07ff 100644 --- a/keyboards/ibnuda/squiggle/keymaps/default/keymap.c +++ b/keyboards/ibnuda/squiggle/keymaps/default/keymap.c @@ -105,7 +105,7 @@ const uint16_t PROGMEM z_slash_combo[] = {KC_Z, KC_SLSH, COMBO_END}; const uint16_t PROGMEM x_comma_combo[] = {KC_X, KC_COMM, COMBO_END}; const uint16_t PROGMEM j_f_combo[] = {KC_F, KC_J, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { // left hand combinations. [Q_W] = COMBO(q_w_combo, KC_TAB), [W_E] = COMBO(w_e_combo, KC_DQT), diff --git a/keyboards/ibnuda/squiggle/keymaps/default38/config.h b/keyboards/ibnuda/squiggle/keymaps/default38/config.h index fa95320e90..822264ca78 100644 --- a/keyboards/ibnuda/squiggle/keymaps/default38/config.h +++ b/keyboards/ibnuda/squiggle/keymaps/default38/config.h @@ -20,5 +20,4 @@ along with this program. If not, see . #pragma once #define COMBO_TERM 100 -#define COMBO_COUNT 38 #define PERMISSIVE_HOLD diff --git a/keyboards/ibnuda/squiggle/keymaps/default38/keymap.c b/keyboards/ibnuda/squiggle/keymaps/default38/keymap.c index aa51f479ff..8e4685757c 100644 --- a/keyboards/ibnuda/squiggle/keymaps/default38/keymap.c +++ b/keyboards/ibnuda/squiggle/keymaps/default38/keymap.c @@ -105,7 +105,7 @@ const uint16_t PROGMEM z_slash_combo[] = {KC_Z, KC_SLSH, COMBO_END}; const uint16_t PROGMEM x_comma_combo[] = {KC_X, KC_COMM, COMBO_END}; const uint16_t PROGMEM j_f_combo[] = {KC_F, KC_J, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { // left hand combinations. [Q_W] = COMBO(q_w_combo, KC_TAB), [W_E] = COMBO(w_e_combo, KC_DQT), diff --git a/keyboards/ibnuda/squiggle/keymaps/defaultfull/config.h b/keyboards/ibnuda/squiggle/keymaps/defaultfull/config.h index 65eec1d7f8..127f7d0fb8 100644 --- a/keyboards/ibnuda/squiggle/keymaps/defaultfull/config.h +++ b/keyboards/ibnuda/squiggle/keymaps/defaultfull/config.h @@ -17,5 +17,4 @@ #pragma once #define COMBO_TERM 100 -#define COMBO_COUNT 38 #define PERMISSIVE_HOLD diff --git a/keyboards/ibnuda/squiggle/keymaps/defaultfull/keymap.c b/keyboards/ibnuda/squiggle/keymaps/defaultfull/keymap.c index 78f9617cf0..0d56ef08a8 100644 --- a/keyboards/ibnuda/squiggle/keymaps/defaultfull/keymap.c +++ b/keyboards/ibnuda/squiggle/keymaps/defaultfull/keymap.c @@ -105,7 +105,7 @@ const uint16_t PROGMEM z_slash_combo[] = {KC_Z, KC_SLSH, COMBO_END}; const uint16_t PROGMEM x_comma_combo[] = {KC_X, KC_COMM, COMBO_END}; const uint16_t PROGMEM j_f_combo[] = {KC_F, KC_J, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { // left hand combinations. [Q_W] = COMBO(q_w_combo, KC_TAB), [W_E] = COMBO(w_e_combo, KC_DQT), diff --git a/keyboards/ibnuda/squiggle/keymaps/defaultminidox/config.h b/keyboards/ibnuda/squiggle/keymaps/defaultminidox/config.h index 6411ba8c66..22ceb2f996 100644 --- a/keyboards/ibnuda/squiggle/keymaps/defaultminidox/config.h +++ b/keyboards/ibnuda/squiggle/keymaps/defaultminidox/config.h @@ -1,5 +1,4 @@ #pragma once #define COMBO_TERM 100 -#define COMBO_COUNT 38 #define PERMISSIVE_HOLD diff --git a/keyboards/ibnuda/squiggle/keymaps/defaultminidox/keymap.c b/keyboards/ibnuda/squiggle/keymaps/defaultminidox/keymap.c index 477aa2229e..171f1a373e 100644 --- a/keyboards/ibnuda/squiggle/keymaps/defaultminidox/keymap.c +++ b/keyboards/ibnuda/squiggle/keymaps/defaultminidox/keymap.c @@ -105,7 +105,7 @@ const uint16_t PROGMEM z_slash_combo[] = {KC_Z, KC_SLSH, COMBO_END}; const uint16_t PROGMEM x_comma_combo[] = {KC_X, KC_COMM, COMBO_END}; const uint16_t PROGMEM j_f_combo[] = {KC_F, KC_J, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { // left hand combinations. [Q_W] = COMBO(q_w_combo, KC_TAB), [W_E] = COMBO(w_e_combo, KC_DQT), diff --git a/keyboards/ibnuda/squiggle/keymaps/rick-complicated/config.h b/keyboards/ibnuda/squiggle/keymaps/rick-complicated/config.h index 9920602ab8..2392b46be6 100644 --- a/keyboards/ibnuda/squiggle/keymaps/rick-complicated/config.h +++ b/keyboards/ibnuda/squiggle/keymaps/rick-complicated/config.h @@ -1,7 +1,6 @@ #pragma once #define COMBO_TERM 100 -#define COMBO_COUNT 38 #define PERMISSIVE_HOLD #define LEADER_TIMEOUT 300 diff --git a/keyboards/ibnuda/squiggle/keymaps/rick-complicated/keymap.c b/keyboards/ibnuda/squiggle/keymaps/rick-complicated/keymap.c index c030738400..b28fc84499 100644 --- a/keyboards/ibnuda/squiggle/keymaps/rick-complicated/keymap.c +++ b/keyboards/ibnuda/squiggle/keymaps/rick-complicated/keymap.c @@ -121,7 +121,7 @@ const uint16_t PROGMEM m_b_combo[] = {KC_M, KC_B, COMBO_END}; // both hand combinations. const uint16_t PROGMEM j_w_combo[] = {KC_J, KC_W, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { // left hand combinations. [COLON_COMMA] = COMBO(colon_comma_combo, KC_TAB), [COMMA_DOT] = COMBO(comma_dot_combo, KC_QUES), diff --git a/keyboards/ibnuda/squiggle/keymaps/rick/config.h b/keyboards/ibnuda/squiggle/keymaps/rick/config.h index 6411ba8c66..22ceb2f996 100644 --- a/keyboards/ibnuda/squiggle/keymaps/rick/config.h +++ b/keyboards/ibnuda/squiggle/keymaps/rick/config.h @@ -1,5 +1,4 @@ #pragma once #define COMBO_TERM 100 -#define COMBO_COUNT 38 #define PERMISSIVE_HOLD diff --git a/keyboards/ibnuda/squiggle/keymaps/rick/keymap.c b/keyboards/ibnuda/squiggle/keymaps/rick/keymap.c index f0ab692f28..75ea54c548 100644 --- a/keyboards/ibnuda/squiggle/keymaps/rick/keymap.c +++ b/keyboards/ibnuda/squiggle/keymaps/rick/keymap.c @@ -121,7 +121,7 @@ const uint16_t PROGMEM m_b_combo[] = {KC_M, KC_B, COMBO_END}; // both hand combinations. const uint16_t PROGMEM j_w_combo[] = {KC_J, KC_W, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { // left hand combinations. [COLON_COMMA] = COMBO(colon_comma_combo, KC_TAB), [COMMA_DOT] = COMBO(comma_dot_combo, KC_QUES), diff --git a/keyboards/idobao/id80/v2/ansi/keymaps/msf/config.h b/keyboards/idobao/id80/v2/ansi/keymaps/msf/config.h index 4f3cc95f30..2a432a5b2e 100644 --- a/keyboards/idobao/id80/v2/ansi/keymaps/msf/config.h +++ b/keyboards/idobao/id80/v2/ansi/keymaps/msf/config.h @@ -20,5 +20,4 @@ */ #pragma once -#define COMBO_COUNT 3 #define COMBO_TERM 200 diff --git a/keyboards/idobao/id80/v2/ansi/keymaps/msf/keymap.c b/keyboards/idobao/id80/v2/ansi/keymaps/msf/keymap.c index ae8b42851c..bdcb153413 100644 --- a/keyboards/idobao/id80/v2/ansi/keymaps/msf/keymap.c +++ b/keyboards/idobao/id80/v2/ansi/keymaps/msf/keymap.c @@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, _______, RGB_TOG, _______, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, KC_DEL, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, BL_DOWN, BL_TOGG, BL_UP, NK_TOGG, _______, _______, _______, _______, _______, BL_UP, + _______, _______, _______, BL_DOWN, BL_TOGG, BL_UP, NK_TOGG, _______, _______, _______, _______, _______, BL_UP, _______, _______, _______, _______, _______, _______, BL_TOGG, BL_DOWN, BL_STEP ), [2] = LAYOUT_ansi( @@ -52,7 +52,7 @@ const uint16_t PROGMEM slashDown_combo[] = {KC_SLSH, KC_DOWN, COMBO_END}; const uint16_t PROGMEM slashUp_combo[] = {KC_SLSH, KC_UP, COMBO_END}; const uint16_t PROGMEM raltBackspace_combo[] = {KC_RALT, KC_BSPC, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [SLSHDN_PGDN] = COMBO(slashDown_combo, KC_PGDN), [SLSHUP_PGUP] = COMBO(slashUp_combo, KC_PGUP), [RALTBKSPC_DELETE] = COMBO(raltBackspace_combo, KC_DEL), diff --git a/keyboards/input_club/ergodox_infinity/keymaps/narze/config.h b/keyboards/input_club/ergodox_infinity/keymaps/narze/config.h index 3fef45f887..9c9bca5961 100644 --- a/keyboards/input_club/ergodox_infinity/keymaps/narze/config.h +++ b/keyboards/input_club/ergodox_infinity/keymaps/narze/config.h @@ -4,7 +4,6 @@ #define TAPPING_TERM 150 #define COMBO_TERM 20 -#define COMBO_COUNT 1 #define PERMISSIVE_HOLD diff --git a/keyboards/k34/keymaps/default/config.h b/keyboards/k34/keymaps/default/config.h index c86bbebdc7..f16dbc0042 100644 --- a/keyboards/k34/keymaps/default/config.h +++ b/keyboards/k34/keymaps/default/config.h @@ -1,23 +1,21 @@ /* Copyright Wong Jing Ping <@wongjingping> - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * */ #pragma once // use 1 combo -#define COMBO_COUNT 1 #define COMBO_TERM 300 // mod taps for home row mods #define TAPPING_TERM_PER_KEY - diff --git a/keyboards/k34/keymaps/default/keymap.c b/keyboards/k34/keymaps/default/keymap.c index 6bd8e402da..ae8b7dc340 100644 --- a/keyboards/k34/keymaps/default/keymap.c +++ b/keyboards/k34/keymaps/default/keymap.c @@ -33,7 +33,7 @@ enum layer_names { /* combos */ const uint16_t PROGMEM jk_combo[] = {KC_J, KC_K, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = {COMBO(jk_combo, KC_ESC)}; +combo_t key_combos[] = {COMBO(jk_combo, KC_ESC)}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Base */ diff --git a/keyboards/keebformom/keymaps/default/config.h b/keyboards/keebformom/keymaps/default/config.h deleted file mode 100644 index 2c89e93739..0000000000 --- a/keyboards/keebformom/keymaps/default/config.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2022 Sandipratama - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#pragma once - -#define COMBO_COUNT 7 diff --git a/keyboards/keebformom/keymaps/default/keymap.c b/keyboards/keebformom/keymaps/default/keymap.c index 1c8180edcc..d51dcd356a 100644 --- a/keyboards/keebformom/keymaps/default/keymap.c +++ b/keyboards/keebformom/keymaps/default/keymap.c @@ -60,7 +60,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_CIRC, KC_UNDS, KC_MINS, KC_4, KC_5, KC_6, KC_PERC, KC_AMPR, KC_LBRC, KC_RBRC, KC_ASTR, _______, _______, KC_1, KC_2, KC_3, TO(0), _______, KC_BSLS, KC_PIPE, _______, _______, _______, KC_EQL, KC_0, KC_BSPC -), +), /* THIRD * ,---------------------------------------------------------------------. @@ -75,10 +75,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_THIRD] = LAYOUT_ortho_4x10( KC_INS, KC_HOME, KC_PGUP, KC_NO, SGUI(KC_S), LCTL(KC_A), KC_NO, KC_NO, KC_UP, KC_NO, - KC_DEL, KC_END, KC_PGDN, KC_NO, LCTL(KC_S), LCTL(KC_C), KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, + KC_DEL, KC_END, KC_PGDN, KC_NO, LCTL(KC_S), LCTL(KC_C), KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, KC_NO, KC_NO, LWIN(KC_E), LCTL(KC_V), KC_NO, KC_NO, KC_NO, KC_NO, TO(0), _______, _______, _______, _______, _______, _______, KC_VOLD, _______, KC_VOLU -), +), /* FOURTH * ,---------------------------------------------------------------------. * |RGB M+| HUD | HUI | | F1 | F2 | F3 | F4 | F5 | F6 | @@ -106,7 +106,7 @@ const uint16_t PROGMEM test_combo4[] = {KC_A, KC_S, COMBO_END}; const uint16_t PROGMEM test_combo5[] = {KC_G, KC_H, COMBO_END}; const uint16_t PROGMEM test_combo6[] = {KC_B, KC_N, COMBO_END}; const uint16_t PROGMEM test_combo7[] = {KC_O, KC_P, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { COMBO(test_combo1, KC_ESC), COMBO(test_combo2, TO(3)), COMBO(test_combo3, KC_CAPS), diff --git a/keyboards/keycapsss/plaid_pad/keymaps/oled/config.h b/keyboards/keycapsss/plaid_pad/keymaps/oled/config.h index 902e9052b7..ddb539fb09 100644 --- a/keyboards/keycapsss/plaid_pad/keymaps/oled/config.h +++ b/keyboards/keycapsss/plaid_pad/keymaps/oled/config.h @@ -18,5 +18,3 @@ // place overrides here #define OLED_FONT_H "keyboards/keycapsss/plaid_pad/keymaps/oled/glcdfont.c" - -#define COMBO_COUNT 3 diff --git a/keyboards/keycapsss/plaid_pad/keymaps/oled/keymap.c b/keyboards/keycapsss/plaid_pad/keymaps/oled/keymap.c index ff5c9231ea..371e8e9941 100644 --- a/keyboards/keycapsss/plaid_pad/keymaps/oled/keymap.c +++ b/keyboards/keycapsss/plaid_pad/keymaps/oled/keymap.c @@ -72,7 +72,7 @@ const uint16_t PROGMEM zeroDot_combo[] = {KC_P0, KC_PDOT, COMBO_END}; const uint16_t PROGMEM leftDown_combo[] = {KC_LEFT, KC_DOWN, COMBO_END}; const uint16_t PROGMEM prevPlay_combo[] = {KC_MEDIA_PREV_TRACK, KC_MEDIA_PLAY_PAUSE, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [COMBO1] = COMBO_ACTION(zeroDot_combo), [COMBO2] = COMBO_ACTION(leftDown_combo), [COMBO3] = COMBO_ACTION(prevPlay_combo), diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/34keys/config.h b/keyboards/kprepublic/bm40hsrgb/keymaps/34keys/config.h index 3a48491679..72377c2701 100644 --- a/keyboards/kprepublic/bm40hsrgb/keymaps/34keys/config.h +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/34keys/config.h @@ -24,7 +24,6 @@ #define MOUSEKEY_TIME_TO_MAX 64 // The firmware is too large! -#define COMBO_COUNT 1 // number of combo #define COMBO_TERM 80 // timeout period for combos to 40ms. //disable broken animations diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/34keys/keymap.c b/keyboards/kprepublic/bm40hsrgb/keymaps/34keys/keymap.c index 423dd14325..09490aa940 100644 --- a/keyboards/kprepublic/bm40hsrgb/keymaps/34keys/keymap.c +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/34keys/keymap.c @@ -37,21 +37,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_Navi] = LAYOUT_planck_mit( KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, KC_ESC, KC_NO, KC_NO, KC_DEL, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_LSFT, HOME_S, HOME_D, HOME_F, KC_TAB, KC_NO, KC_NO, KC_ENT, KC_RSFT, HOME_K, HOME_L, HOME_QU, - KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_BTN1, KC_NO, KC_NO, KC_BTN2, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, + KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_BTN1, KC_NO, KC_NO, KC_BTN2, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_NO, KC_NO, KC_NO, KC_NO, Lay_SPC, KC_NO, KC_BSPC, KC_NO, KC_NO, KC_NO, KC_NO - ), + ), [_Numb] = LAYOUT_planck_mit( KC_LBRC, KC_7, KC_8, KC_9, KC_RBRC, KC_NO, KC_NO, KC_DEL, KC_NO, KC_NO, KC_NO, KC_NO, KC_SCLN, KC_4, KC_5, KC_6, KC_EQL, KC_NO, KC_NO, KC_ENT, KC_RSFT, HOME_K, HOME_L, HOME_QU, KC_GRV, KC_1, KC_2, KC_3, KC_BSLS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KR_HAEN, KC_NO, KC_NO, KC_NO, KC_NO, KC_0, KC_MINS, KC_NO, KC_BSPC, KC_NO, KC_NO, KC_NO, KC_NO - ), + ), [_Func] = LAYOUT_planck_mit( KC_F12, KC_F7, KC_F8, KC_F9, KC_PSCR, KC_NO, KC_NO, QK_BOOT, KC_NO, KC_NO, KC_NO, KC_NO, KC_F11, KC_F4, KC_F5, KC_F6, KC_SCRL, KC_NO, KC_NO, KC_CAPS, KC_RSFT, HOME_K, HOME_L, HOME_QU, KC_F10, KC_F1, KC_F2, KC_F3, KC_PAUS, KC_NO, KC_NO, KC_INS, KC_NO, KC_NO, KR_HAEN, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, Lay_SPC, KC_NO, KC_BSPC, KC_NO, KC_NO, KC_NO, KC_NO - ), + ), }; @@ -75,10 +75,8 @@ layer_state_t layer_state_set_user(layer_state_t state) { } // COMBO key for HOME ROW modifier -// modify `config.h` file -// by adding #define COMBO_COUNT 1 (replacing 1 with the number that you’re using). // modify `rules.mk` file -// by adding # COMBO_ENABLE = yes +// by adding # COMBO_ENABLE = yes enum combos { SFT_HAN, @@ -86,6 +84,6 @@ enum combos { const uint16_t PROGMEM sft_han_combo[] = {LSFT_T(KC_F), LT(_Func,KC_SPC), COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [SFT_HAN] = COMBO(sft_han_combo, KC_LNG1), -}; \ No newline at end of file +}; diff --git a/keyboards/kprepublic/bm68hsrgb/rev1/keymaps/peepeetee/config.h b/keyboards/kprepublic/bm68hsrgb/rev1/keymaps/peepeetee/config.h index ceb40da092..13eefdef65 100644 --- a/keyboards/kprepublic/bm68hsrgb/rev1/keymaps/peepeetee/config.h +++ b/keyboards/kprepublic/bm68hsrgb/rev1/keymaps/peepeetee/config.h @@ -49,7 +49,6 @@ // #define LEADER_KEY_STRICT_KEY_PROCESSING // Disables keycode filtering for Mod-Tap and Layer-Tap keycodes. Eg, if you enable this, you would need to specify MT(MOD_CTL, KC_A) if you want to use KC_A. // #define ONESHOT_TIMEOUT 300 // How long before oneshot times out // #define ONESHOT_TAP_TOGGLE 2 // How many taps before oneshot toggle is triggered -// #define COMBO_COUNT 2 // Set this to the number of combos that you're using in the Combo feature. // #define COMBO_TERM 200 // How long for the Combo keys to be detected. Defaults to TAPPING_TERM if not defined. // #define TAP_CODE_DELAY 100 // Sets the delay between register_code and unregister_code, if you're having issues with it registering properly (common on VUSB boards). The value is in milliseconds. // #define TAP_HOLD_CAPS_DELAY 80 // Sets the delay for Tap Hold keys (LT, MT) when using KC_CAPS_LOCK keycode, as this has some special handling on MacOS. The value is in milliseconds, and defaults to 80 ms if not defined. For macOS, you may want to set this to 200 or higher. diff --git a/keyboards/kprepublic/bm80hsrgb/keymaps/peepeetee/config.h b/keyboards/kprepublic/bm80hsrgb/keymaps/peepeetee/config.h index eaff1148d0..06a7409110 100644 --- a/keyboards/kprepublic/bm80hsrgb/keymaps/peepeetee/config.h +++ b/keyboards/kprepublic/bm80hsrgb/keymaps/peepeetee/config.h @@ -34,7 +34,6 @@ // #define LEADER_KEY_STRICT_KEY_PROCESSING // Disables keycode filtering for Mod-Tap and Layer-Tap keycodes. Eg, if you enable this, you would need to specify MT(MOD_CTL, KC_A) if you want to use KC_A. // #define ONESHOT_TIMEOUT 300 // How long before oneshot times out // #define ONESHOT_TAP_TOGGLE 2 // How many taps before oneshot toggle is triggered -// #define COMBO_COUNT 2 // Set this to the number of combos that you're using in the Combo feature. // #define COMBO_TERM 200 // How long for the Combo keys to be detected. Defaults to TAPPING_TERM if not defined. // #define TAP_CODE_DELAY 100 // Sets the delay between register_code and unregister_code, if you're having issues with it registering properly (common on VUSB boards). The value is in milliseconds. // #define TAP_HOLD_CAPS_DELAY 80 // Sets the delay for Tap Hold keys (LT, MT) when using KC_CAPS_LOCK keycode, as this has some special handling on MacOS. The value is in milliseconds, and defaults to 80 ms if not defined. For macOS, you may want to set this to 200 or higher. @@ -75,7 +74,7 @@ #define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation #define DISABLE_RGB_MATRIX_HUE_BREATHING // Hue shifts up a slight ammount at the same time, then shifts back #define DISABLE_RGB_MATRIX_HUE_PENDULUM // Hue shifts up a slight ammount in a wave to the right, then back to the left -#define DISABLE_RGB_MATRIX_HUE_WAVE // Hue shifts up a slight ammount and then back down in a wave to the right +#define DISABLE_RGB_MATRIX_HUE_WAVE // Hue shifts up a slight ammount and then back down in a wave to the right // =================================================== Requires RGB_MATRIX_FRAMEBUFFER_EFFECTS ============================================================= // #define DISABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! #define DISABLE_RGB_MATRIX_DIGITAL_RAIN // That famous computer simulation diff --git a/keyboards/kprepublic/jj40/keymaps/stevexyz/config.h b/keyboards/kprepublic/jj40/keymaps/stevexyz/config.h index 48d86aedf5..46fbfe21c3 100644 --- a/keyboards/kprepublic/jj40/keymaps/stevexyz/config.h +++ b/keyboards/kprepublic/jj40/keymaps/stevexyz/config.h @@ -32,8 +32,6 @@ // how long before oneshot times out #define ONESHOT_TAP_TOGGLE 2 // how many taps before oneshot toggle is triggered - #define COMBO_COUNT 2 - // Set this to the number of combos that you're using in the Combo feature. #define COMBO_TERM 200 // how long for the Combo keys to be detected. Defaults to TAPPING_TERM if not defined. #define TAP_CODE_DELAY 100 diff --git a/keyboards/lets_split/keymaps/shaymdev/config.h b/keyboards/lets_split/keymaps/shaymdev/config.h index a54a63fd48..3ae9165cfd 100644 --- a/keyboards/lets_split/keymaps/shaymdev/config.h +++ b/keyboards/lets_split/keymaps/shaymdev/config.h @@ -50,6 +50,4 @@ along with this program. If not, see . } #endif -#define COMBO_COUNT 1 - #define TAPPING_TERM 220 diff --git a/keyboards/lets_split/keymaps/shaymdev/keymap.c b/keyboards/lets_split/keymaps/shaymdev/keymap.c index 19a2c082df..fe919133a9 100644 --- a/keyboards/lets_split/keymaps/shaymdev/keymap.c +++ b/keyboards/lets_split/keymaps/shaymdev/keymap.c @@ -35,14 +35,14 @@ enum custom_keycodes { #define RAISE MO(_RAISE) #define RAS RAISE -enum combos //match combo_count in config.h +enum combos { EU_ENT, }; const uint16_t PROGMEM eu_combo[] = {KC_E, KC_U, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [EU_ENT] = COMBO_ACTION(eu_combo), }; @@ -58,38 +58,38 @@ void process_combo_event(uint16_t combo_index, bool pressed) { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_DVORAK] = LAYOUT( - KC_ESC, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, - KC_TAB, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, - KC_EQL, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_BSLS, - XXXXXXX, KC_ENT, KC_LALT, TT(LWR), KC_LSFT, KC_LCTL, KC_BSPC, KC_SPC, TT(RAS), KC_DEL, KC_LGUI, XXXXXXX +[_DVORAK] = LAYOUT( + KC_ESC, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, + KC_TAB, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, + KC_EQL, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_BSLS, + XXXXXXX, KC_ENT, KC_LALT, TT(LWR), KC_LSFT, KC_LCTL, KC_BSPC, KC_SPC, TT(RAS), KC_DEL, KC_LGUI, XXXXXXX ), -[_QWERTY] = LAYOUT( - KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, - KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, +[_QWERTY] = LAYOUT( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LGUI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), -[_LOWER] = LAYOUT( - _______, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_AMPR, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, _______, - _______, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_ASTR, _______, KC_P4, KC_P5, KC_P6, KC_PPLS, _______, - _______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_GRV, _______, KC_P1, KC_P2, KC_P3, KC_PENT, _______, +[_LOWER] = LAYOUT( + _______, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_AMPR, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, _______, + _______, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_ASTR, _______, KC_P4, KC_P5, KC_P6, KC_PPLS, _______, + _______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_GRV, _______, KC_P1, KC_P2, KC_P3, KC_PENT, _______, _______, _______, _______, _______, _______, _______, _______, KC_KP_0, _______, _______, _______, _______ //This kp_0 is blocking the space key.... may want to do something about that. ), -[_RAISE] = LAYOUT( +[_RAISE] = LAYOUT( _______, KC_PSCR, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_VOLU, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, KC_CAPS, KC_INS, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_VOLD, KC_F4, KC_F5, KC_F6, KC_F11, XXXXXXX, _______, KC_NUM, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MUTE, KC_F1, KC_F2, KC_F3, KC_F12, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), -[_ADJUST] = LAYOUT( - TO_DV, QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, - RGB_TOG, RGB_MOD, VK_TOGG, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, DVORAK, _______, _______, _______, - RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, +[_ADJUST] = LAYOUT( + TO_DV, QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, + RGB_TOG, RGB_MOD, VK_TOGG, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, DVORAK, _______, _______, _______, + RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) diff --git a/keyboards/lily58/keymaps/muuko/config.h b/keyboards/lily58/keymaps/muuko/config.h index 5d833d34d0..29a0801d2e 100644 --- a/keyboards/lily58/keymaps/muuko/config.h +++ b/keyboards/lily58/keymaps/muuko/config.h @@ -33,8 +33,4 @@ along with this program. If not, see . #endif #define TAPPING_TERM 120 -#ifdef COMBO_COUNT -#undef COMBO_COUNT -#endif -#define COMBO_COUNT 2 #define COMBO_TERM 20 diff --git a/keyboards/lily58/keymaps/muuko/keymap.c b/keyboards/lily58/keymaps/muuko/keymap.c index c984202b9e..b5cc97ee38 100644 --- a/keyboards/lily58/keymaps/muuko/keymap.c +++ b/keyboards/lily58/keymaps/muuko/keymap.c @@ -36,7 +36,7 @@ static long int oled_timeout = 300000; enum combos { ESCAPE_COMBO, DELETE_COMBO }; const uint16_t PROGMEM escape_combo[] = { KC_GRV, KC_1, COMBO_END }; const uint16_t PROGMEM delete_combo[] = { KC_DOT, KC_SLSH, COMBO_END }; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [ESCAPE_COMBO] = COMBO(escape_combo, KC_ESC), [DELETE_COMBO] = COMBO(delete_combo, KC_DEL) }; diff --git a/keyboards/lily58/keymaps/narze/config.h b/keyboards/lily58/keymaps/narze/config.h index 814338c18f..300321b3db 100644 --- a/keyboards/lily58/keymaps/narze/config.h +++ b/keyboards/lily58/keymaps/narze/config.h @@ -29,7 +29,6 @@ along with this program. If not, see . // #define EE_HANDS #define COMBO_TERM 20 -#define COMBO_COUNT 3 #define PERMISSIVE_HOLD diff --git a/keyboards/makenova/omega/omega4/keymaps/default/config.h b/keyboards/makenova/omega/omega4/keymaps/default/config.h index c60e064e21..067267521d 100644 --- a/keyboards/makenova/omega/omega4/keymaps/default/config.h +++ b/keyboards/makenova/omega/omega4/keymaps/default/config.h @@ -4,7 +4,6 @@ #pragma once #ifdef COMBO_ENABLE -# define COMBO_COUNT 4 # define COMBO_TERM 50 #endif diff --git a/keyboards/makenova/omega/omega4/keymaps/default/keymap.c b/keyboards/makenova/omega/omega4/keymaps/default/keymap.c index 583d5a8a3d..cfe3233145 100644 --- a/keyboards/makenova/omega/omega4/keymaps/default/keymap.c +++ b/keyboards/makenova/omega/omega4/keymaps/default/keymap.c @@ -28,7 +28,7 @@ const uint16_t PROGMEM combo_ent[] = {ALT_D, GUI_F, COMBO_END}; const uint16_t PROGMEM combo_tab[] = {KC_C, KC_V, COMBO_END}; const uint16_t PROGMEM combo_del[] = {KC_M, KC_COMM, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { COMBO(combo_bspc,KC_BSPC), // 1 COMBO(combo_ent,KC_ENT), // 2 COMBO(combo_tab,KC_TAB), // 3 @@ -61,4 +61,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_TRNS, QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ) -}; \ No newline at end of file +}; diff --git a/keyboards/makenova/omega/omega4/keymaps/default_10u_bar/config.h b/keyboards/makenova/omega/omega4/keymaps/default_10u_bar/config.h index c60e064e21..067267521d 100644 --- a/keyboards/makenova/omega/omega4/keymaps/default_10u_bar/config.h +++ b/keyboards/makenova/omega/omega4/keymaps/default_10u_bar/config.h @@ -4,7 +4,6 @@ #pragma once #ifdef COMBO_ENABLE -# define COMBO_COUNT 4 # define COMBO_TERM 50 #endif diff --git a/keyboards/makenova/omega/omega4/keymaps/default_10u_bar/keymap.c b/keyboards/makenova/omega/omega4/keymaps/default_10u_bar/keymap.c index 2cbc706ee4..b443a57a65 100644 --- a/keyboards/makenova/omega/omega4/keymaps/default_10u_bar/keymap.c +++ b/keyboards/makenova/omega/omega4/keymaps/default_10u_bar/keymap.c @@ -29,7 +29,7 @@ const uint16_t PROGMEM combo_ent[] = {ALT_D, GUI_F, COMBO_END}; const uint16_t PROGMEM combo_tab[] = {KC_C, KC_V, COMBO_END}; const uint16_t PROGMEM combo_del[] = {KC_M, KC_COMM, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { COMBO(combo_bspc,KC_BSPC), // 1 COMBO(combo_ent,KC_ENT), // 2 COMBO(combo_tab,KC_TAB), // 3 @@ -62,4 +62,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_TRNS, QK_BOOT ) -}; \ No newline at end of file +}; diff --git a/keyboards/makenova/omega/omega4/keymaps/default_6u_bar/config.h b/keyboards/makenova/omega/omega4/keymaps/default_6u_bar/config.h index c60e064e21..067267521d 100644 --- a/keyboards/makenova/omega/omega4/keymaps/default_6u_bar/config.h +++ b/keyboards/makenova/omega/omega4/keymaps/default_6u_bar/config.h @@ -4,7 +4,6 @@ #pragma once #ifdef COMBO_ENABLE -# define COMBO_COUNT 4 # define COMBO_TERM 50 #endif diff --git a/keyboards/makenova/omega/omega4/keymaps/default_6u_bar/keymap.c b/keyboards/makenova/omega/omega4/keymaps/default_6u_bar/keymap.c index e5e9cc05a6..00c135b3f3 100644 --- a/keyboards/makenova/omega/omega4/keymaps/default_6u_bar/keymap.c +++ b/keyboards/makenova/omega/omega4/keymaps/default_6u_bar/keymap.c @@ -28,7 +28,7 @@ const uint16_t PROGMEM combo_ent[] = {ALT_D, GUI_F, COMBO_END}; const uint16_t PROGMEM combo_tab[] = {KC_C, KC_V, COMBO_END}; const uint16_t PROGMEM combo_del[] = {KC_M, KC_COMM, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { COMBO(combo_bspc,KC_BSPC), // 1 COMBO(combo_ent,KC_ENT), // 2 COMBO(combo_tab,KC_TAB), // 3 @@ -61,4 +61,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_TRNS, QK_BOOT, KC_TRNS, KC_TRNS ) -}; \ No newline at end of file +}; diff --git a/keyboards/maple_computing/minidox/keymaps/rsthd_combos/config.h b/keyboards/maple_computing/minidox/keymaps/rsthd_combos/config.h index 98f8d6b071..a7d11feca5 100644 --- a/keyboards/maple_computing/minidox/keymaps/rsthd_combos/config.h +++ b/keyboards/maple_computing/minidox/keymaps/rsthd_combos/config.h @@ -2,6 +2,4 @@ #define EE_HANDS - -#define COMBO_COUNT 10 #define COMBO_TERM 100 diff --git a/keyboards/maple_computing/minidox/keymaps/rsthd_combos/keymap.c b/keyboards/maple_computing/minidox/keymaps/rsthd_combos/keymap.c index e795e76207..33bfc7340e 100644 --- a/keyboards/maple_computing/minidox/keymaps/rsthd_combos/keymap.c +++ b/keyboards/maple_computing/minidox/keymaps/rsthd_combos/keymap.c @@ -32,7 +32,7 @@ const uint16_t PROGMEM kz_combo[] = {KC_K, KC_Z, COMBO_END}; const uint16_t PROGMEM dm_combo[] = {KC_D, KC_M, COMBO_END}; const uint16_t PROGMEM bx_combo[] = {KC_B, KC_X, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [TOP_L] = COMBO(fk_combo, KC_ESC), [TOP_R] = COMBO(zl_combo, KC_AT), [MID_L] = COMBO(hd_combo, KC_TAB), diff --git a/keyboards/massdrop/alt/keymaps/b_/config.h b/keyboards/massdrop/alt/keymaps/b_/config.h index d87bdade68..8607cd8186 100644 --- a/keyboards/massdrop/alt/keymaps/b_/config.h +++ b/keyboards/massdrop/alt/keymaps/b_/config.h @@ -37,7 +37,6 @@ // #define LEADER_KEY_STRICT_KEY_PROCESSING // Disables keycode filtering for Mod-Tap and Layer-Tap keycodes. Eg, if you enable this, you would need to specify MT(MOD_CTL, KC_A) if you want to use KC_A. // #define ONESHOT_TIMEOUT 3000 // How long before oneshot times out // #define ONESHOT_TAP_TOGGLE 2 // How many taps before oneshot toggle is triggered -// #define COMBO_COUNT 2 // Set this to the number of combos that you're using in the Combo feature. // #define COMBO_TERM 200 // How long for the Combo keys to be detected. Defaults to TAPPING_TERM if not defined. // #define TAP_CODE_DELAY 100 // Sets the delay between register_code and unregister_code, if you're having issues with it registering properly (common on VUSB boards). The value is in milliseconds. #define TAP_CODE_DELAY 25 // Sets the delay between register_code and unregister_code, if you're having issues with it registering properly (common on VUSB boards). The value is in milliseconds. diff --git a/keyboards/massdrop/alt/keymaps/pregame/config.h b/keyboards/massdrop/alt/keymaps/pregame/config.h index 331b34c9b0..27bf1a8332 100644 --- a/keyboards/massdrop/alt/keymaps/pregame/config.h +++ b/keyboards/massdrop/alt/keymaps/pregame/config.h @@ -50,7 +50,6 @@ // #define LEADER_KEY_STRICT_KEY_PROCESSING // Disables keycode filtering for Mod-Tap and Layer-Tap keycodes. Eg, if you enable this, you would need to specify MT(MOD_CTL, KC_A) if you want to use KC_A. // #define ONESHOT_TIMEOUT 3000 // How long before oneshot times out // #define ONESHOT_TAP_TOGGLE 2 // How many taps before oneshot toggle is triggered -// #define COMBO_COUNT 2 // Set this to the number of combos that you're using in the Combo feature. // #define COMBO_TERM 200 // How long for the Combo keys to be detected. Defaults to TAPPING_TERM if not defined. // #define TAP_CODE_DELAY 100 // Sets the delay between register_code and unregister_code, if you're having issues with it registering properly (common on VUSB boards). The value is in milliseconds. // #define TAP_HOLD_CAPS_DELAY 80 // Sets the delay for Tap Hold keys (LT, MT) when using KC_CAPS_LOCK keycode, as this has some special handling on MacOS. The value is in milliseconds, and defaults to 80 ms if not defined. For macOS, you may want to set this to 200 or higher. diff --git a/keyboards/massdrop/ctrl/keymaps/endgame/config.h b/keyboards/massdrop/ctrl/keymaps/endgame/config.h index c8fa629552..34aa3cd666 100644 --- a/keyboards/massdrop/ctrl/keymaps/endgame/config.h +++ b/keyboards/massdrop/ctrl/keymaps/endgame/config.h @@ -34,7 +34,6 @@ // #define LEADER_KEY_STRICT_KEY_PROCESSING // Disables keycode filtering for Mod-Tap and Layer-Tap keycodes. Eg, if you enable this, you would need to specify MT(MOD_CTL, KC_A) if you want to use KC_A. // #define ONESHOT_TIMEOUT 300 // How long before oneshot times out // #define ONESHOT_TAP_TOGGLE 2 // How many taps before oneshot toggle is triggered -// #define COMBO_COUNT 2 // Set this to the number of combos that you're using in the Combo feature. // #define COMBO_TERM 200 // How long for the Combo keys to be detected. Defaults to TAPPING_TERM if not defined. // #define TAP_CODE_DELAY 100 // Sets the delay between register_code and unregister_code, if you're having issues with it registering properly (common on VUSB boards). The value is in milliseconds. // #define TAP_HOLD_CAPS_DELAY 80 // Sets the delay for Tap Hold keys (LT, MT) when using KC_CAPS_LOCK keycode, as this has some special handling on MacOS. The value is in milliseconds, and defaults to 80 ms if not defined. For macOS, you may want to set this to 200 or higher. diff --git a/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h b/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h index a17ad45c4c..a17e3e76bf 100644 --- a/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h +++ b/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h @@ -52,7 +52,6 @@ along with this program. If not, see . // #define LEADER_KEY_STRICT_KEY_PROCESSING // Disables keycode filtering for Mod-Tap and Layer-Tap keycodes. Eg, if you enable this, you would need to specify MT(MOD_CTL, KC_A) if you want to use KC_A. // #define ONESHOT_TIMEOUT 300 // How long before oneshot times out // #define ONESHOT_TAP_TOGGLE 2 // How many taps before oneshot toggle is triggered -// #define COMBO_COUNT 2 // Set this to the number of combos that you're using in the Combo feature. // #define COMBO_TERM 200 // How long for the Combo keys to be detected. Defaults to TAPPING_TERM if not defined. // #define TAP_CODE_DELAY 100 // Sets the delay between register_code and unregister_code, if you're having issues with it registering properly (common on VUSB boards). The value is in milliseconds. // #define TAP_HOLD_CAPS_DELAY 80 // Sets the delay for Tap Hold keys (LT, MT) when using KC_CAPS_LOCK keycode, as this has some special handling on MacOS. The value is in milliseconds, and defaults to 80 ms if not defined. For macOS, you may want to set this to 200 or higher. diff --git a/keyboards/massdrop/ctrl/keymaps/xanimos/config.h b/keyboards/massdrop/ctrl/keymaps/xanimos/config.h index 2166f67e8c..0c08219181 100644 --- a/keyboards/massdrop/ctrl/keymaps/xanimos/config.h +++ b/keyboards/massdrop/ctrl/keymaps/xanimos/config.h @@ -50,7 +50,6 @@ // #define LEADER_KEY_STRICT_KEY_PROCESSING // Disables keycode filtering for Mod-Tap and Layer-Tap keycodes. Eg, if you enable this, you would need to specify MT(MOD_CTL, KC_A) if you want to use KC_A. // #define ONESHOT_TIMEOUT 300 // How long before oneshot times out // #define ONESHOT_TAP_TOGGLE 2 // How many taps before oneshot toggle is triggered -// #define COMBO_COUNT 2 // Set this to the number of combos that you're using in the Combo feature. // #define COMBO_TERM 200 // How long for the Combo keys to be detected. Defaults to TAPPING_TERM if not defined. // #define TAP_CODE_DELAY 100 // Sets the delay between register_code and unregister_code, if you're having issues with it registering properly (common on VUSB boards). The value is in milliseconds. // #define TAP_HOLD_CAPS_DELAY 80 // Sets the delay for Tap Hold keys (LT, MT) when using KC_CAPS_LOCK keycode, as this has some special handling on MacOS. The value is in milliseconds, and defaults to 80 ms if not defined. For macOS, you may want to set this to 200 or higher. diff --git a/keyboards/maxr1998/pulse4k/config.h b/keyboards/maxr1998/pulse4k/config.h index 5da4e44855..0b552acfda 100644 --- a/keyboards/maxr1998/pulse4k/config.h +++ b/keyboards/maxr1998/pulse4k/config.h @@ -18,7 +18,6 @@ #pragma once /* Combo setup */ -#define COMBO_COUNT 1 #define COMBO_TERM 150 /* RGB LED Setup */ diff --git a/keyboards/maxr1998/pulse4k/keymaps/default/keymap.c b/keyboards/maxr1998/pulse4k/keymaps/default/keymap.c index 243a96ba74..b190159f24 100644 --- a/keyboards/maxr1998/pulse4k/keymaps/default/keymap.c +++ b/keyboards/maxr1998/pulse4k/keymaps/default/keymap.c @@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [LED_ADJUST] = COMBO_ACTION(led_adjust_combo) }; diff --git a/keyboards/maxr1998/pulse4k/keymaps/maxr1998/keymap.c b/keyboards/maxr1998/pulse4k/keymaps/maxr1998/keymap.c index 2aad1fa346..3f1dfbee3f 100644 --- a/keyboards/maxr1998/pulse4k/keymaps/maxr1998/keymap.c +++ b/keyboards/maxr1998/pulse4k/keymaps/maxr1998/keymap.c @@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [LED_ADJUST] = COMBO_ACTION(led_adjust_combo) }; diff --git a/keyboards/nimrod/keymaps/default/config.h b/keyboards/nimrod/keymaps/default/config.h index 9684b5caed..8cafd470cd 100644 --- a/keyboards/nimrod/keymaps/default/config.h +++ b/keyboards/nimrod/keymaps/default/config.h @@ -16,6 +16,5 @@ #pragma once #ifdef COMBO_ENABLE -# define COMBO_COUNT 3 # define COMBO_TERM 150 #endif diff --git a/keyboards/nimrod/keymaps/default/keymap.c b/keyboards/nimrod/keymaps/default/keymap.c index 47b8f4ac78..a0a2aec6fe 100644 --- a/keyboards/nimrod/keymaps/default/keymap.c +++ b/keyboards/nimrod/keymaps/default/keymap.c @@ -51,7 +51,7 @@ const uint16_t PROGMEM combo_tab[] = {KC_Q, KC_W, COMBO_END}; const uint16_t PROGMEM combo_esc[] = {KC_E, KC_W, COMBO_END}; const uint16_t PROGMEM combo_del[] = {KC_MINS, KC_EQL, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [COMBO_TAB] = COMBO(combo_tab,KC_TAB), [COMBO_ESC] = COMBO(combo_esc,KC_ESC), [COMBO_DEL] = COMBO(combo_del,KC_DEL), diff --git a/keyboards/nimrod/keymaps/default_center_space/config.h b/keyboards/nimrod/keymaps/default_center_space/config.h index 9684b5caed..8cafd470cd 100644 --- a/keyboards/nimrod/keymaps/default_center_space/config.h +++ b/keyboards/nimrod/keymaps/default_center_space/config.h @@ -16,6 +16,5 @@ #pragma once #ifdef COMBO_ENABLE -# define COMBO_COUNT 3 # define COMBO_TERM 150 #endif diff --git a/keyboards/nimrod/keymaps/default_center_space/keymap.c b/keyboards/nimrod/keymaps/default_center_space/keymap.c index c87ab2cb46..c41f986c7c 100644 --- a/keyboards/nimrod/keymaps/default_center_space/keymap.c +++ b/keyboards/nimrod/keymaps/default_center_space/keymap.c @@ -59,7 +59,7 @@ const uint16_t PROGMEM combo_tab[] = {KC_Q, KC_W, COMBO_END}; const uint16_t PROGMEM combo_esc[] = {KC_E, KC_W, COMBO_END}; const uint16_t PROGMEM combo_del[] = {KC_MINS, KC_EQL, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [COMBO_TAB] = COMBO(combo_tab,KC_TAB), [COMBO_ESC] = COMBO(combo_esc,KC_ESC), [COMBO_DEL] = COMBO(combo_del,KC_DEL), diff --git a/keyboards/nimrod/keymaps/default_left_space/config.h b/keyboards/nimrod/keymaps/default_left_space/config.h index 9684b5caed..8cafd470cd 100644 --- a/keyboards/nimrod/keymaps/default_left_space/config.h +++ b/keyboards/nimrod/keymaps/default_left_space/config.h @@ -16,6 +16,5 @@ #pragma once #ifdef COMBO_ENABLE -# define COMBO_COUNT 3 # define COMBO_TERM 150 #endif diff --git a/keyboards/nimrod/keymaps/default_left_space/keymap.c b/keyboards/nimrod/keymaps/default_left_space/keymap.c index c1bbd129d9..cf1346cb7f 100644 --- a/keyboards/nimrod/keymaps/default_left_space/keymap.c +++ b/keyboards/nimrod/keymaps/default_left_space/keymap.c @@ -59,7 +59,7 @@ const uint16_t PROGMEM combo_tab[] = {KC_Q, KC_W, COMBO_END}; const uint16_t PROGMEM combo_esc[] = {KC_E, KC_W, COMBO_END}; const uint16_t PROGMEM combo_del[] = {KC_MINS, KC_EQL, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [COMBO_TAB] = COMBO(combo_tab,KC_TAB), [COMBO_ESC] = COMBO(combo_esc,KC_ESC), [COMBO_DEL] = COMBO(combo_del,KC_DEL), diff --git a/keyboards/nimrod/keymaps/default_right_space/config.h b/keyboards/nimrod/keymaps/default_right_space/config.h index 9684b5caed..8cafd470cd 100644 --- a/keyboards/nimrod/keymaps/default_right_space/config.h +++ b/keyboards/nimrod/keymaps/default_right_space/config.h @@ -16,6 +16,5 @@ #pragma once #ifdef COMBO_ENABLE -# define COMBO_COUNT 3 # define COMBO_TERM 150 #endif diff --git a/keyboards/nimrod/keymaps/default_right_space/keymap.c b/keyboards/nimrod/keymaps/default_right_space/keymap.c index 4bcd41c57b..dcc9358610 100644 --- a/keyboards/nimrod/keymaps/default_right_space/keymap.c +++ b/keyboards/nimrod/keymaps/default_right_space/keymap.c @@ -59,7 +59,7 @@ const uint16_t PROGMEM combo_tab[] = {KC_Q, KC_W, COMBO_END}; const uint16_t PROGMEM combo_esc[] = {KC_E, KC_W, COMBO_END}; const uint16_t PROGMEM combo_del[] = {KC_MINS, KC_EQL, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [COMBO_TAB] = COMBO(combo_tab,KC_TAB), [COMBO_ESC] = COMBO(combo_esc,KC_ESC), [COMBO_DEL] = COMBO(combo_del,KC_DEL), diff --git a/keyboards/nimrod/keymaps/default_split_space/config.h b/keyboards/nimrod/keymaps/default_split_space/config.h index ad0cd6ffdd..8cafd470cd 100644 --- a/keyboards/nimrod/keymaps/default_split_space/config.h +++ b/keyboards/nimrod/keymaps/default_split_space/config.h @@ -16,6 +16,5 @@ #pragma once #ifdef COMBO_ENABLE -# define COMBO_COUNT 5 # define COMBO_TERM 150 #endif diff --git a/keyboards/nimrod/keymaps/default_split_space/keymap.c b/keyboards/nimrod/keymaps/default_split_space/keymap.c index e0667e4b5a..2b8c5f8125 100644 --- a/keyboards/nimrod/keymaps/default_split_space/keymap.c +++ b/keyboards/nimrod/keymaps/default_split_space/keymap.c @@ -69,7 +69,7 @@ const uint16_t PROGMEM combo_tab[] = {KC_Q, KC_W, COMBO_END}; const uint16_t PROGMEM combo_esc[] = {KC_E, KC_W, COMBO_END}; const uint16_t PROGMEM combo_del[] = {KC_MINS, KC_EQL, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [COMBO_BSPC] = COMBO(combo_bspc,KC_BSPC), [COMBO_NUMBAK] = COMBO(combo_numbak,KC_BSPC), [COMBO_TAB] = COMBO(combo_tab,KC_TAB), diff --git a/keyboards/orthodox/keymaps/shaymdev/config.h b/keyboards/orthodox/keymaps/shaymdev/config.h index 7852878ee7..79d7cddec0 100644 --- a/keyboards/orthodox/keymaps/shaymdev/config.h +++ b/keyboards/orthodox/keymaps/shaymdev/config.h @@ -48,6 +48,4 @@ along with this program. If not, see . } #endif -#define COMBO_COUNT 1 - #define TAPPING_TERM 220 diff --git a/keyboards/orthodox/keymaps/shaymdev/keymap.c b/keyboards/orthodox/keymaps/shaymdev/keymap.c index 495a61c2e4..24fca7661e 100644 --- a/keyboards/orthodox/keymaps/shaymdev/keymap.c +++ b/keyboards/orthodox/keymaps/shaymdev/keymap.c @@ -21,7 +21,7 @@ along with this program. If not, see . #include QMK_KEYBOARD_H -enum orthodox_layers +enum orthodox_layers { _DVORAK, _QWERTY, @@ -30,14 +30,14 @@ enum orthodox_layers _ADJUST, }; -enum combos //match combo_count in config.h +enum combos { EU_ENT, }; const uint16_t PROGMEM eu_combo[] = {KC_E, KC_U, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [EU_ENT] = COMBO_ACTION(eu_combo), }; @@ -66,33 +66,33 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DVORAK] = LAYOUT( - KC_ESC, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, - KC_TAB, GUI_T(KC_A), ALT_T(KC_O), KC_E, KC_U, KC_I, KC_ENT, KC_LALT, KC_DEL, KC_LGUI, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, - KC_EQL, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, TT(LOWER), KC_LSFT, KC_LCTL, KC_BSPC, ALT_T(KC_SPC), TT(RAISE), KC_B, KC_M, KC_W, KC_V, KC_Z, KC_BSLS + KC_ESC, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, + KC_TAB, GUI_T(KC_A), ALT_T(KC_O), KC_E, KC_U, KC_I, KC_ENT, KC_LALT, KC_DEL, KC_LGUI, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, + KC_EQL, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, TT(LOWER), KC_LSFT, KC_LCTL, KC_BSPC, ALT_T(KC_SPC), TT(RAISE), KC_B, KC_M, KC_W, KC_V, KC_Z, KC_BSLS ), -[_QWERTY] = LAYOUT( - KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, - KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, _______, _______, _______, _______, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, _______, _______, _______, _______, _______, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT +[_QWERTY] = LAYOUT( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, _______, _______, _______, _______, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, _______, _______, _______, _______, _______, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT ), -[_LOWER] = LAYOUT( - _______, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_AMPR, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, _______, - _______, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_ASTR, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_PPLS, _______, - _______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_GRV, _______, _______, _______, _______, _______, KC_KP_0, _______, KC_P1, KC_P2, KC_P3, KC_PENT, _______ +[_LOWER] = LAYOUT( + _______, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_AMPR, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, _______, + _______, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_ASTR, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_PPLS, _______, + _______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_GRV, _______, _______, _______, _______, _______, KC_KP_0, _______, KC_P1, KC_P2, KC_P3, KC_PENT, _______ ), -[_RAISE] = LAYOUT( +[_RAISE] = LAYOUT( _______, KC_PSCR, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_VOLU, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, KC_CAPS, KC_INS, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, _______, _______, KC_VOLD, KC_F4, KC_F5, KC_F6, KC_F11, XXXXXXX, _______, KC_NUM, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_F1, KC_F2, KC_F3, KC_F12, XXXXXXX ), -[_ADJUST] = LAYOUT( - TO_DV, QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_SLEP, - RGB_TOG, RGB_MOD, VK_TOGG, AU_ON, AU_OFF, AG_NORM, _______, _______, _______, _______, AG_SWAP, QWERTY, DVORAK, _______, _______, _______, - RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +[_ADJUST] = LAYOUT( + TO_DV, QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_SLEP, + RGB_TOG, RGB_MOD, VK_TOGG, AU_ON, AU_OFF, AG_NORM, _______, _______, _______, _______, AG_SWAP, QWERTY, DVORAK, _______, _______, _______, + RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY ) diff --git a/keyboards/pierce/keymaps/durken1/config.h b/keyboards/pierce/keymaps/durken1/config.h index 8ff2df3709..ecc59f31bd 100644 --- a/keyboards/pierce/keymaps/durken1/config.h +++ b/keyboards/pierce/keymaps/durken1/config.h @@ -25,7 +25,6 @@ #define PERMISSIVE_HOLD // Combo settings -#define COMBO_COUNT 3 #define COMBO_TERM 35 #ifdef PS2_DRIVER_USART diff --git a/keyboards/pierce/keymaps/durken1/keymap.c b/keyboards/pierce/keymaps/durken1/keymap.c index a4f77753a8..5bc2f4d307 100644 --- a/keyboards/pierce/keymaps/durken1/keymap.c +++ b/keyboards/pierce/keymaps/durken1/keymap.c @@ -17,25 +17,25 @@ #include QMK_KEYBOARD_H #include "keymap_swedish.h" -enum layers { - BASE, - MBO, - SYM, - NUM, +enum layers { + BASE, + MBO, + SYM, + NUM, FN }; -enum combos { - WF_ARNG, - EI_ADIA, - UK_ODIA +enum combos { + WF_ARNG, + EI_ADIA, + UK_ODIA }; #if defined PS2_MOUSE_ENABLE #include "ps2_mouse.h" #endif -#if defined AUTO_BUTTONS && defined PS2_MOUSE_ENABLE +#if defined AUTO_BUTTONS && defined PS2_MOUSE_ENABLE static uint16_t auto_buttons_timer; extern int tp_buttons; // mousekey button state set in action.c and used in ps2_mouse.c @@ -82,7 +82,7 @@ const uint16_t PROGMEM arng_combo[] = {ALT_R, SFT_S, COMBO_END}; const uint16_t PROGMEM adia_combo[] = {SFT_E, ALT_I, COMBO_END}; const uint16_t PROGMEM odia_combo[] = {SE_U, SE_K, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [WF_ARNG] = COMBO(arng_combo, SE_ARNG), [EI_ADIA] = COMBO(adia_combo, SE_ADIA), [UK_ODIA] = COMBO(odia_combo, SE_ODIA) diff --git a/keyboards/planck/keymaps/antosha417/keymap.c b/keyboards/planck/keymaps/antosha417/keymap.c index 2a6caca201..06bc0b8657 100644 --- a/keyboards/planck/keymaps/antosha417/keymap.c +++ b/keyboards/planck/keymaps/antosha417/keymap.c @@ -397,11 +397,8 @@ enum combo_events { DELQ_COMBO, SAVEQ_COMBO, BSPCQ_COMBO, - BSPCWQ_COMBO, - - COMBO_LENGTH + BSPCWQ_COMBO }; -uint16_t COMBO_LEN = COMBO_LENGTH; const uint16_t PROGMEM ru_combo[] = {KC_R, U_CTRL, COMBO_END}; const uint16_t PROGMEM en_combo[] = {U_CTRL, S_ALT, COMBO_END}; @@ -448,5 +445,3 @@ combo_t key_combos[] = { [SAVEQ_COMBO] = COMBO(saveq_combo, VIM_SAVE), [BSPCWQ_COMBO] = COMBO(bspcwq_combo, A(KC_BSPC)), }; - - diff --git a/keyboards/planck/keymaps/ariccb/keymap.c b/keyboards/planck/keymaps/ariccb/keymap.c index 4237955bb5..5caaf1922e 100644 --- a/keyboards/planck/keymaps/ariccb/keymap.c +++ b/keyboards/planck/keymaps/ariccb/keymap.c @@ -511,10 +511,8 @@ enum combo_events { CSS_STYLE, HTML_GENERIC_TAG, CTLRGHT, - CTLLEFT, - COMBO_LENGTH + CTLLEFT }; -uint16_t COMBO_LEN = COMBO_LENGTH; // remove the COMBO_COUNT define and use this instead! const uint16_t PROGMEM email_combo[] = {KC_E, KC_M, COMBO_END}; const uint16_t PROGMEM email_work_combo[] = {KC_E, KC_K, COMBO_END}; diff --git a/keyboards/planck/keymaps/dvz/config.h b/keyboards/planck/keymaps/dvz/config.h index bcdc3e57d6..ab925009ed 100644 --- a/keyboards/planck/keymaps/dvz/config.h +++ b/keyboards/planck/keymaps/dvz/config.h @@ -50,8 +50,6 @@ // Most tactile encoders have detents every 4 stages #define ENCODER_RESOLUTION 4 -#define COMBO_COUNT 4 - #ifdef AUDIO_ENABLE #define DAC_SAMPLE_MAX 65535/2 #endif diff --git a/keyboards/planck/keymaps/dvz/keymap.c b/keyboards/planck/keymaps/dvz/keymap.c index d69bf18620..ff57d28cf8 100644 --- a/keyboards/planck/keymaps/dvz/keymap.c +++ b/keyboards/planck/keymaps/dvz/keymap.c @@ -30,7 +30,7 @@ const uint16_t PROGMEM oe_combo[] = {KC_O, KC_E, COMBO_END}; const uint16_t PROGMEM ue_combo[] = {KC_U, KC_E, COMBO_END}; const uint16_t PROGMEM sz_combo[] = {KC_S, DE_Z, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [AE] = COMBO(ae_combo, DE_AE), [OE] = COMBO(oe_combo, DE_OE), [UE] = COMBO(ue_combo, DE_UE), diff --git a/keyboards/planck/keymaps/narze/config.h b/keyboards/planck/keymaps/narze/config.h index fddd9cd376..a7fccc4187 100644 --- a/keyboards/planck/keymaps/narze/config.h +++ b/keyboards/planck/keymaps/narze/config.h @@ -24,7 +24,6 @@ #define TAPPING_TERM 100 #define COMBO_TERM 20 -#define COMBO_COUNT 1 #define PERMISSIVE_HOLD diff --git a/keyboards/planck/keymaps/rootiest/config.h b/keyboards/planck/keymaps/rootiest/config.h index 1cca7e5ba9..3d2d3f38a6 100644 --- a/keyboards/planck/keymaps/rootiest/config.h +++ b/keyboards/planck/keymaps/rootiest/config.h @@ -111,7 +111,6 @@ /* * COMBO-KEY options */ -#define COMBO_COUNT 2 #define COMBO_TERM 300 /* * MACRO per-key options diff --git a/keyboards/planck/keymaps/rootiest/keymap.c b/keyboards/planck/keymaps/rootiest/keymap.c index ce3b69ed1f..7e3b8af367 100644 --- a/keyboards/planck/keymaps/rootiest/keymap.c +++ b/keyboards/planck/keymaps/rootiest/keymap.c @@ -168,7 +168,7 @@ enum combo_events { ZC_COPY, XV_PASTE }; const uint16_t PROGMEM copy_combo[] = {KC_Z, KC_C, COMBO_END}; const uint16_t PROGMEM paste_combo[] = {KC_X, KC_V, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [ZC_COPY] = COMBO_ACTION(copy_combo), [XV_PASTE] = COMBO_ACTION(paste_combo), }; diff --git a/keyboards/preonic/keymaps/brauner/keymap.c b/keyboards/preonic/keymaps/brauner/keymap.c index 24a350e6d4..398abfa741 100644 --- a/keyboards/preonic/keymaps/brauner/keymap.c +++ b/keyboards/preonic/keymaps/brauner/keymap.c @@ -56,17 +56,14 @@ enum combos { COMBO_LBRC_RBRC, /* [|] */ COMBO_LCBR_RCBR, /* {|} */ COMBO_LT_GT, /* <|> */ - COMBO_MAX, }; -uint16_t COMBO_LEN = COMBO_MAX; - const uint16_t PROGMEM combo_lprn_rprn[] = {KC_LPRN, KC_RPRN, COMBO_END}; const uint16_t PROGMEM combo_lbrc_rbrc[] = {KC_LBRC, KC_RBRC, COMBO_END}; const uint16_t PROGMEM combo_lcbr_rcbr[] = {KC_LCBR, KC_RCBR, COMBO_END}; const uint16_t PROGMEM combo_lt_gt[] = {KC_LT, KC_GT, COMBO_END}; -combo_t key_combos[COMBO_MAX] = { +combo_t key_combos[] = { [COMBO_LPRN_RPRN] = COMBO_ACTION(combo_lprn_rprn), [COMBO_LBRC_RBRC] = COMBO_ACTION(combo_lbrc_rbrc), [COMBO_LCBR_RCBR] = COMBO_ACTION(combo_lcbr_rcbr), diff --git a/keyboards/program_yoink/ortho/keymaps/default/config.h b/keyboards/program_yoink/ortho/keymaps/default/config.h index ea7075aecb..eb4161b940 100644 --- a/keyboards/program_yoink/ortho/keymaps/default/config.h +++ b/keyboards/program_yoink/ortho/keymaps/default/config.h @@ -20,6 +20,5 @@ #define TAPPING_TERM 200 #ifdef COMBO_ENABLE -# define COMBO_COUNT 10 # define COMBO_TERM 60 -#endif \ No newline at end of file +#endif diff --git a/keyboards/program_yoink/ortho/keymaps/default/keymap.c b/keyboards/program_yoink/ortho/keymaps/default/keymap.c index 6719a38b0a..35f58efc4f 100644 --- a/keyboards/program_yoink/ortho/keymaps/default/keymap.c +++ b/keyboards/program_yoink/ortho/keymaps/default/keymap.c @@ -66,7 +66,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { const uint16_t PROGMEM combo_ent[] = {KC_DOT, KC_SLSH, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [COMBO_ENT] = COMBO(combo_ent,KC_ENT), }; diff --git a/keyboards/program_yoink/ortho/keymaps/ortho_split/config.h b/keyboards/program_yoink/ortho/keymaps/ortho_split/config.h index ea7075aecb..eb4161b940 100644 --- a/keyboards/program_yoink/ortho/keymaps/ortho_split/config.h +++ b/keyboards/program_yoink/ortho/keymaps/ortho_split/config.h @@ -20,6 +20,5 @@ #define TAPPING_TERM 200 #ifdef COMBO_ENABLE -# define COMBO_COUNT 10 # define COMBO_TERM 60 -#endif \ No newline at end of file +#endif diff --git a/keyboards/program_yoink/ortho/keymaps/ortho_split/keymap.c b/keyboards/program_yoink/ortho/keymaps/ortho_split/keymap.c index 837dc1e754..7e14d95efc 100644 --- a/keyboards/program_yoink/ortho/keymaps/ortho_split/keymap.c +++ b/keyboards/program_yoink/ortho/keymaps/ortho_split/keymap.c @@ -66,7 +66,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { const uint16_t PROGMEM combo_ent[] = {KC_K, KC_L, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [COMBO_ENT] = COMBO(combo_ent,KC_ENT), }; diff --git a/keyboards/program_yoink/staggered/keymaps/default/config.h b/keyboards/program_yoink/staggered/keymaps/default/config.h index c4b4470e96..8759b84226 100644 --- a/keyboards/program_yoink/staggered/keymaps/default/config.h +++ b/keyboards/program_yoink/staggered/keymaps/default/config.h @@ -20,6 +20,5 @@ #define TAPPING_TERM 200 #ifdef COMBO_ENABLE -# define COMBO_COUNT 10 # define COMBO_TERM 200 -#endif \ No newline at end of file +#endif diff --git a/keyboards/program_yoink/staggered/keymaps/default/keymap.c b/keyboards/program_yoink/staggered/keymaps/default/keymap.c index 8780cad06e..aa7a288705 100644 --- a/keyboards/program_yoink/staggered/keymaps/default/keymap.c +++ b/keyboards/program_yoink/staggered/keymaps/default/keymap.c @@ -68,7 +68,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { const uint16_t PROGMEM combo_slsh[] = {MT(MOD_RSFT, KC_DOT), KC_COMM, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [COMBO_SLSH] = COMBO(combo_slsh,KC_SLSH), }; diff --git a/keyboards/program_yoink/staggered/keymaps/split_bar/config.h b/keyboards/program_yoink/staggered/keymaps/split_bar/config.h index 842b3b8011..8759b84226 100644 --- a/keyboards/program_yoink/staggered/keymaps/split_bar/config.h +++ b/keyboards/program_yoink/staggered/keymaps/split_bar/config.h @@ -20,6 +20,5 @@ #define TAPPING_TERM 200 #ifdef COMBO_ENABLE -# define COMBO_COUNT 10 # define COMBO_TERM 200 -#endif +#endif diff --git a/keyboards/program_yoink/staggered/keymaps/split_bar/keymap.c b/keyboards/program_yoink/staggered/keymaps/split_bar/keymap.c index d37722e7bc..1053fb7aa4 100644 --- a/keyboards/program_yoink/staggered/keymaps/split_bar/keymap.c +++ b/keyboards/program_yoink/staggered/keymaps/split_bar/keymap.c @@ -66,7 +66,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { const uint16_t PROGMEM combo_slsh[] = {MT(MOD_RSFT, KC_DOT), KC_COMM, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [COMBO_SLSH] = COMBO(combo_slsh,KC_SLSH), }; diff --git a/keyboards/projectcain/relic/keymaps/default/config.h b/keyboards/projectcain/relic/keymaps/default/config.h index ebe839c4c4..c1d6e02d40 100644 --- a/keyboards/projectcain/relic/keymaps/default/config.h +++ b/keyboards/projectcain/relic/keymaps/default/config.h @@ -17,7 +17,6 @@ #pragma once #define ENCODER_RESOLUTION 2 -#define COMBO_COUNT 6 #define COMBO_TERM 50 #define QUICK_TAP_TERM 0 #define DISABLE_LEADER diff --git a/keyboards/projectcain/relic/keymaps/default/keymap.c b/keyboards/projectcain/relic/keymaps/default/keymap.c index f2e61c4b1c..58d36d4e27 100644 --- a/keyboards/projectcain/relic/keymaps/default/keymap.c +++ b/keyboards/projectcain/relic/keymaps/default/keymap.c @@ -25,22 +25,22 @@ enum layers{ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT_all( KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, - KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOTE, - KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOTE, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(1), KC_LCTL, MO(1), SFT_T(KC_BSPC), KC_SPACE, KC_SPACE, MO(2), KC_LALT, MO(2) ), [NUM] = LAYOUT_all( KC_Q, KC_W, KC_E, KC_R, KC_T, KC_KP_SLASH, KC_7, KC_8, KC_9, KC_MINUS, KC_BSPC, - KC_A, KC_S, KC_D, KC_F, KC_G, KC_KP_ASTERISK, KC_4, KC_5, KC_6, KC_PLUS, - SC_LCPO, KC_X, KC_C, KC_V, KC_B, KC_0, KC_1, KC_2, KC_3, SC_RCPC, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_KP_ASTERISK, KC_4, KC_5, KC_6, KC_PLUS, + SC_LCPO, KC_X, KC_C, KC_V, KC_B, KC_0, KC_1, KC_2, KC_3, SC_RCPC, MO(1), KC_LCTL, KC_TRNS, SFT_T(KC_BSPC), KC_TRNS, KC_SPACE, KC_TRNS, KC_LALT, MO(2) ), - + [SYM] = LAYOUT_all( S(KC_GRV), KC_GRV, KC_TRNS, S(KC_BSLS), KC_BSLS, KC_TRNS, S(KC_MINS), KC_EQL, KC_TRNS, C(KC_W), QK_BOOT, - S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), KC_SCLN, S(KC_SCLN), - S(KC_LBRC), KC_LBRC, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_RBRC, S(KC_RBRC), + S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), KC_SCLN, S(KC_SCLN), + S(KC_LBRC), KC_LBRC, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_RBRC, S(KC_RBRC), MO(1), KC_LCTL, KC_TRNS, SFT_T(KC_BSPC), KC_TRNS, KC_SPACE, KC_TRNS, KC_LALT, MO(2) ), @@ -64,7 +64,7 @@ const uint16_t PROGMEM qw_combo[] = {KC_Q, KC_W, COMBO_END}; const uint16_t PROGMEM as_combo[] = {KC_A, KC_S, COMBO_END}; const uint16_t PROGMEM fj_combo[] = {KC_F, KC_J, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [KL_SLSH] = COMBO(kl_combo, S(KC_SLSH)), [JK_MINUS] = COMBO(jk_combo, KC_MINUS), [LQUOTE_ENTER] = COMBO(lquote_combo, KC_ENTER), diff --git a/keyboards/projectcain/vault35/keymaps/default/config.h b/keyboards/projectcain/vault35/keymaps/default/config.h index 885d5ad9cb..672d4a1dde 100644 --- a/keyboards/projectcain/vault35/keymaps/default/config.h +++ b/keyboards/projectcain/vault35/keymaps/default/config.h @@ -16,6 +16,5 @@ #pragma once -#define COMBO_COUNT 2 #define COMBO_TERM 50 #define QUICK_TAP_TERM 0 diff --git a/keyboards/projectcain/vault35/keymaps/default/keymap.c b/keyboards/projectcain/vault35/keymaps/default/keymap.c index 4244edd999..5bb3a622b2 100644 --- a/keyboards/projectcain/vault35/keymaps/default/keymap.c +++ b/keyboards/projectcain/vault35/keymaps/default/keymap.c @@ -1,18 +1,18 @@ - /* Copyright 2021 projectcain - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + /* Copyright 2021 projectcain + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ #include QMK_KEYBOARD_H @@ -28,24 +28,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT_split_4space( KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, - KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOTE, - KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOTE, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, LALT(KC_TAB), MO(1), SFT_T(KC_BSPC), KC_SPACE, MO(2), QK_BOOT ), [NUM] = LAYOUT_split_4space( - KC_PGUP, KC_HOME, KC_UP, KC_END, KC_WBAK, KC_PSLS, KC_7, KC_8, KC_9, KC_PMNS, KC_DEL, - KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_WFWD, KC_PAST, KC_4, KC_5, KC_6, KC_PPLS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_1, KC_2, KC_3, KC_PDOT, + KC_PGUP, KC_HOME, KC_UP, KC_END, KC_WBAK, KC_PSLS, KC_7, KC_8, KC_9, KC_PMNS, KC_DEL, + KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_WFWD, KC_PAST, KC_4, KC_5, KC_6, KC_PPLS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_1, KC_2, KC_3, KC_PDOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RALT(KC_F4), RALT(KC_F4) ), - + [SYM] = LAYOUT_split_4space( - S(KC_GRV), KC_GRV, KC_BSLS, S(KC_BSLS), KC_TRNS, KC_TRNS, S(KC_MINS), KC_EQL, KC_TRNS, C(KC_W), C(KC_T), - S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), KC_SCLN, S(KC_SCLN), - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, + S(KC_GRV), KC_GRV, KC_BSLS, S(KC_BSLS), KC_TRNS, KC_TRNS, S(KC_MINS), KC_EQL, KC_TRNS, C(KC_W), C(KC_T), + S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), KC_SCLN, S(KC_SCLN), + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NUM, KC_TRNS ), @@ -60,7 +60,7 @@ enum combos { const uint16_t PROGMEM kl_combo[] = {KC_K, KC_L, COMBO_END}; const uint16_t PROGMEM jk_combo[] = {KC_J, KC_K, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [KL_SLSH] = COMBO(kl_combo, S(KC_SLSH)), [JK_MINUS] = COMBO(jk_combo, KC_MINUS) }; diff --git a/keyboards/projectcain/vault45/keymaps/default/config.h b/keyboards/projectcain/vault45/keymaps/default/config.h index 4a98bb89d4..6fd8ebf9d5 100644 --- a/keyboards/projectcain/vault45/keymaps/default/config.h +++ b/keyboards/projectcain/vault45/keymaps/default/config.h @@ -1,21 +1,20 @@ - /* Copyright 2021 projectcain - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + /* Copyright 2021 projectcain + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #pragma once -#define COMBO_COUNT 2 #define COMBO_TERM 50 #define QUICK_TAP_TERM 0 diff --git a/keyboards/projectcain/vault45/keymaps/default/keymap.c b/keyboards/projectcain/vault45/keymaps/default/keymap.c index ec8de8b604..87baccad04 100644 --- a/keyboards/projectcain/vault45/keymaps/default/keymap.c +++ b/keyboards/projectcain/vault45/keymaps/default/keymap.c @@ -1,14 +1,14 @@ - /* Copyright 2021 projectcain - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + /* Copyright 2021 projectcain + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * */ #include QMK_KEYBOARD_H @@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LBRC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_1, KC_2, KC_3, KC_PDOT, KC_RBRC, KC_PSCR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, S(KC_RCTL), RALT(KC_F4), RALT(KC_F4) ), - + [SYM] = LAYOUT_split_4space( RGB_TOG, S(KC_GRV), KC_GRV, KC_BSLS, S(KC_BSLS), KC_TRNS, KC_TRNS, S(KC_MINS), KC_EQL, KC_TRNS, C(KC_W), C(KC_T), KC_TRNS, KC_TRNS, S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), KC_SCLN, S(KC_SCLN), KC_TRNS, @@ -53,7 +53,7 @@ enum combos { const uint16_t PROGMEM kl_combo[] = {KC_K, KC_L, COMBO_END}; const uint16_t PROGMEM jk_combo[] = {KC_J, KC_K, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [KL_SLSH] = COMBO(kl_combo, S(KC_SLSH)), [JK_MINUS] = COMBO(jk_combo, KC_MINUS) }; diff --git a/keyboards/q4z/keymaps/default/config.h b/keyboards/q4z/keymaps/default/config.h index c129199230..88392557de 100644 --- a/keyboards/q4z/keymaps/default/config.h +++ b/keyboards/q4z/keymaps/default/config.h @@ -16,6 +16,5 @@ #pragma once #ifdef COMBO_ENABLE -#define COMBO_COUNT 5 #define COMBO_TERM 200 #endif diff --git a/keyboards/q4z/keymaps/default/keymap.c b/keyboards/q4z/keymaps/default/keymap.c index 45fe8c2dd5..4a7c28acb1 100644 --- a/keyboards/q4z/keymaps/default/keymap.c +++ b/keyboards/q4z/keymaps/default/keymap.c @@ -74,7 +74,7 @@ const uint16_t PROGMEM combo_tab[] = {KC_A, KC_S, COMBO_END}; const uint16_t PROGMEM combo_esc[] = {KC_Q, KC_W, COMBO_END}; const uint16_t PROGMEM combo_del[] = {KC_MINS, KC_EQL, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [COMBO_BSPC] = COMBO(combo_bspc,KC_BSPC), [COMBO_NUMBAK] = COMBO(combo_numbak,KC_BSPC), [COMBO_TAB] = COMBO(combo_tab,KC_TAB), diff --git a/keyboards/q4z/keymaps/rjboone/config.h b/keyboards/q4z/keymaps/rjboone/config.h index 7530b24262..9264f33bae 100644 --- a/keyboards/q4z/keymaps/rjboone/config.h +++ b/keyboards/q4z/keymaps/rjboone/config.h @@ -18,6 +18,4 @@ #undef TAPPING_TERM #define TAPPING_TERM 300 -#undef COMBO_COUNT -#define COMBO_COUNT 5 #define COMBO_TERM 50 diff --git a/keyboards/q4z/keymaps/rjboone/keymap.c b/keyboards/q4z/keymaps/rjboone/keymap.c index 8e764e4735..c54ec014ec 100644 --- a/keyboards/q4z/keymaps/rjboone/keymap.c +++ b/keyboards/q4z/keymaps/rjboone/keymap.c @@ -80,7 +80,7 @@ const uint16_t PROGMEM combo_tab[] = {KC_A, KC_S, COMBO_END}; const uint16_t PROGMEM combo_esc[] = {KC_Q, KC_W, COMBO_END}; const uint16_t PROGMEM combo_del[] = {KC_MINS, KC_EQL, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [COMBO_BSPC] = COMBO(combo_bspc,KC_BSPC), [COMBO_NUMBAK] = COMBO(combo_numbak,KC_BSPC), [COMBO_TAB] = COMBO(combo_tab,KC_TAB), diff --git a/keyboards/qpockets/eggman/keymaps/default/config.h b/keyboards/qpockets/eggman/keymaps/default/config.h index 90d12ee7da..cc4b487fe8 100644 --- a/keyboards/qpockets/eggman/keymaps/default/config.h +++ b/keyboards/qpockets/eggman/keymaps/default/config.h @@ -21,6 +21,5 @@ /*Combos*/ #ifdef COMBO_ENABLE -# define COMBO_COUNT 5 # define COMBO_TERM 50 -#endif +#endif diff --git a/keyboards/qpockets/eggman/keymaps/default/keymap.c b/keyboards/qpockets/eggman/keymaps/default/keymap.c index 13a34c14b0..9e6ec192c2 100644 --- a/keyboards/qpockets/eggman/keymaps/default/keymap.c +++ b/keyboards/qpockets/eggman/keymaps/default/keymap.c @@ -84,7 +84,7 @@ const uint16_t PROGMEM combo_tab[] = {KC_S, KC_D, COMBO_END}; const uint16_t PROGMEM combo_esc[] = {KC_T, KC_Y, COMBO_END}; const uint16_t PROGMEM combo_del[] = {KC_Q, KC_W, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [COMBO_BSPC] = COMBO(combo_bspc,KC_BSPC), [COMBO_ENT] = COMBO(combo_ent,KC_ENT), [COMBO_TAB] = COMBO(combo_tab,KC_TAB), diff --git a/keyboards/qpockets/space_space/rev1/keymaps/big_space/config.h b/keyboards/qpockets/space_space/rev1/keymaps/big_space/config.h index fd24168f47..40d4cc44c4 100644 --- a/keyboards/qpockets/space_space/rev1/keymaps/big_space/config.h +++ b/keyboards/qpockets/space_space/rev1/keymaps/big_space/config.h @@ -21,6 +21,5 @@ /*Combos*/ #ifdef COMBO_ENABLE -# define COMBO_COUNT 5 # define COMBO_TERM 50 -#endif \ No newline at end of file +#endif diff --git a/keyboards/qpockets/space_space/rev1/keymaps/big_space/keymap.c b/keyboards/qpockets/space_space/rev1/keymaps/big_space/keymap.c index 9755cdec3f..1bbdd632e8 100644 --- a/keyboards/qpockets/space_space/rev1/keymaps/big_space/keymap.c +++ b/keyboards/qpockets/space_space/rev1/keymaps/big_space/keymap.c @@ -120,7 +120,7 @@ const uint16_t PROGMEM combo_tab[] = {KC_S, KC_D, COMBO_END}; const uint16_t PROGMEM combo_esc[] = {KC_T, KC_Y, COMBO_END}; const uint16_t PROGMEM combo_del[] = {KC_Q, KC_W, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [COMBO_BSPC] = COMBO(combo_bspc,KC_BSPC), [COMBO_ENT] = COMBO(combo_ent,KC_ENT), [COMBO_TAB] = COMBO(combo_tab,KC_TAB), diff --git a/keyboards/qpockets/space_space/rev1/keymaps/default/config.h b/keyboards/qpockets/space_space/rev1/keymaps/default/config.h index fd24168f47..40d4cc44c4 100644 --- a/keyboards/qpockets/space_space/rev1/keymaps/default/config.h +++ b/keyboards/qpockets/space_space/rev1/keymaps/default/config.h @@ -21,6 +21,5 @@ /*Combos*/ #ifdef COMBO_ENABLE -# define COMBO_COUNT 5 # define COMBO_TERM 50 -#endif \ No newline at end of file +#endif diff --git a/keyboards/qpockets/space_space/rev1/keymaps/default/keymap.c b/keyboards/qpockets/space_space/rev1/keymaps/default/keymap.c index 09b74316a8..4b0262d4ed 100644 --- a/keyboards/qpockets/space_space/rev1/keymaps/default/keymap.c +++ b/keyboards/qpockets/space_space/rev1/keymaps/default/keymap.c @@ -122,7 +122,7 @@ const uint16_t PROGMEM combo_tab[] = {KC_S, KC_D, COMBO_END}; const uint16_t PROGMEM combo_esc[] = {KC_T, KC_Y, COMBO_END}; const uint16_t PROGMEM combo_del[] = {KC_Q, KC_W, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [COMBO_BSPC] = COMBO(combo_bspc,KC_BSPC), [COMBO_ENT] = COMBO(combo_ent,KC_ENT), [COMBO_TAB] = COMBO(combo_tab,KC_TAB), diff --git a/keyboards/qpockets/space_space/rev2/keymaps/big_space/config.h b/keyboards/qpockets/space_space/rev2/keymaps/big_space/config.h index fd24168f47..40d4cc44c4 100644 --- a/keyboards/qpockets/space_space/rev2/keymaps/big_space/config.h +++ b/keyboards/qpockets/space_space/rev2/keymaps/big_space/config.h @@ -21,6 +21,5 @@ /*Combos*/ #ifdef COMBO_ENABLE -# define COMBO_COUNT 5 # define COMBO_TERM 50 -#endif \ No newline at end of file +#endif diff --git a/keyboards/qpockets/space_space/rev2/keymaps/big_space/keymap.c b/keyboards/qpockets/space_space/rev2/keymaps/big_space/keymap.c index afde5f7b20..3c8b875d47 100644 --- a/keyboards/qpockets/space_space/rev2/keymaps/big_space/keymap.c +++ b/keyboards/qpockets/space_space/rev2/keymaps/big_space/keymap.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - + #include QMK_KEYBOARD_H enum layers{ @@ -52,14 +52,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_TRNS, KC_CIRC, KC_AMPR, KC_ASTR, KC_EQUAL, KC_MINS, KC_PIPE, KC_BSLS, KC_LPRN, KC_LBRC, KC_SCLN, KC_TRNS, KC_COLN, KC_RBRC, KC_RPRN, KC_PLUS, KC_UNDS, - KC_TRNS, KC_TRNS, KC_TRNS + KC_TRNS, KC_TRNS, KC_TRNS ), [_NAV] = LAYOUT_big_space( KC_HOME, KC_UP, KC_END, KC_PGUP, KC_TRNS, QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TAB, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_ENT, - KC_TRNS, KC_TRNS, KC_TRNS + KC_TRNS, KC_TRNS, KC_TRNS ), }; @@ -71,7 +71,7 @@ const uint16_t PROGMEM combo_tab[] = {KC_S, KC_D, COMBO_END}; const uint16_t PROGMEM combo_esc[] = {KC_T, KC_Y, COMBO_END}; const uint16_t PROGMEM combo_del[] = {KC_Q, KC_W, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [COMBO_BSPC] = COMBO(combo_bspc,KC_BSPC), [COMBO_ENT] = COMBO(combo_ent,KC_ENT), [COMBO_TAB] = COMBO(combo_tab,KC_TAB), diff --git a/keyboards/qpockets/space_space/rev2/keymaps/default/config.h b/keyboards/qpockets/space_space/rev2/keymaps/default/config.h index 7fdb8504a6..e398cb5b2d 100644 --- a/keyboards/qpockets/space_space/rev2/keymaps/default/config.h +++ b/keyboards/qpockets/space_space/rev2/keymaps/default/config.h @@ -21,6 +21,5 @@ /*Combos*/ #ifdef COMBO_ENABLE -# define COMBO_COUNT 5 # define COMBO_TERM 50 -#endif \ No newline at end of file +#endif diff --git a/keyboards/qpockets/space_space/rev2/keymaps/default/keymap.c b/keyboards/qpockets/space_space/rev2/keymaps/default/keymap.c index 7d47cf4f8d..faf9c0f3d4 100644 --- a/keyboards/qpockets/space_space/rev2/keymaps/default/keymap.c +++ b/keyboards/qpockets/space_space/rev2/keymaps/default/keymap.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - + #include QMK_KEYBOARD_H enum layers{ @@ -46,14 +46,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_TRNS, KC_CIRC, KC_AMPR, KC_ASTR, KC_EQUAL, KC_MINS, KC_PIPE, KC_BSLS, KC_LPRN, KC_LBRC, KC_SCLN, KC_TRNS, KC_COLN, KC_RBRC, KC_RPRN, KC_PLUS, KC_UNDS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), [_NAV] = LAYOUT_default( KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP, QK_BOOT, KC_F1, KC_F2, KC_F3, KC_F4, KC_BSPC, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN, KC_TRNS, KC_F4, KC_F5, KC_F6, KC_F7, KC_TAB, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_LCAP, KC_F9, KC_F10, KC_F11, KC_F12, KC_ENT, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), }; @@ -67,7 +67,7 @@ const uint16_t PROGMEM combo_tab[] = {KC_S, KC_D, COMBO_END}; const uint16_t PROGMEM combo_esc[] = {KC_T, KC_Y, COMBO_END}; const uint16_t PROGMEM combo_del[] = {KC_Q, KC_W, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [COMBO_BSPC] = COMBO(combo_bspc,KC_BSPC), [COMBO_ENT] = COMBO(combo_ent,KC_ENT), [COMBO_TAB] = COMBO(combo_tab,KC_TAB), diff --git a/keyboards/qpockets/space_space/rev2/keymaps/qpockets/config.h b/keyboards/qpockets/space_space/rev2/keymaps/qpockets/config.h index 31291ecc8f..98cdcbcdb1 100644 --- a/keyboards/qpockets/space_space/rev2/keymaps/qpockets/config.h +++ b/keyboards/qpockets/space_space/rev2/keymaps/qpockets/config.h @@ -21,6 +21,5 @@ /*Combos*/ #ifdef COMBO_ENABLE -# define COMBO_COUNT 5 # define COMBO_TERM 25 -#endif +#endif diff --git a/keyboards/qpockets/space_space/rev2/keymaps/qpockets/keymap.c b/keyboards/qpockets/space_space/rev2/keymaps/qpockets/keymap.c index c163c6eac9..1c3cdfc61f 100644 --- a/keyboards/qpockets/space_space/rev2/keymaps/qpockets/keymap.c +++ b/keyboards/qpockets/space_space/rev2/keymaps/qpockets/keymap.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - + #include QMK_KEYBOARD_H enum layers{ @@ -41,19 +41,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_PSCR, KC_LCTL, KC_DN_BSPC, KC_UP_SPC, KC_RALT, KC_MPLY ), - + [_SYM] = LAYOUT_default( KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_TRNS, KC_CIRC, KC_AMPR, KC_ASTR, KC_EQUAL, KC_MINS, KC_PIPE, KC_BSLS, KC_LPRN, KC_LBRC, KC_SCLN, KC_TRNS, KC_COLN, KC_RBRC, KC_RPRN, KC_PLUS, KC_UNDS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), [_NAV] = LAYOUT_default( KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP, QK_BOOT, KC_F1, KC_F2, KC_F3, KC_F4, KC_BSPC, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN, KC_TRNS, KC_F5, KC_F6, KC_F7, KC_F8, KC_TAB, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_CAPS, KC_F9, KC_F10, KC_F11, KC_F12, KC_ENT, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), }; @@ -65,7 +65,7 @@ const uint16_t PROGMEM combo_tab[] = {KC_S, KC_D, COMBO_END}; const uint16_t PROGMEM combo_esc[] = {KC_T, KC_Y, COMBO_END}; const uint16_t PROGMEM combo_del[] = {KC_Q, KC_W, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [COMBO_BSPC] = COMBO(combo_bspc,KC_BSPC), [COMBO_ENT] = COMBO(combo_ent,KC_ENT), [COMBO_TAB] = COMBO(combo_tab,KC_TAB), diff --git a/keyboards/qpockets/wanten/keymaps/2u_bars/config.h b/keyboards/qpockets/wanten/keymaps/2u_bars/config.h index 072519ff6c..77051be69b 100644 --- a/keyboards/qpockets/wanten/keymaps/2u_bars/config.h +++ b/keyboards/qpockets/wanten/keymaps/2u_bars/config.h @@ -21,6 +21,5 @@ /*Combos*/ #ifdef COMBO_ENABLE -# define COMBO_COUNT 5 # define COMBO_TERM 25 -#endif +#endif diff --git a/keyboards/qpockets/wanten/keymaps/2u_bars/keymap.c b/keyboards/qpockets/wanten/keymaps/2u_bars/keymap.c index d8c75895bf..3322fc8923 100644 --- a/keyboards/qpockets/wanten/keymaps/2u_bars/keymap.c +++ b/keyboards/qpockets/wanten/keymaps/2u_bars/keymap.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - + #include QMK_KEYBOARD_H enum layers{ @@ -21,7 +21,7 @@ enum layers{ _GAME, _SYM, _NAV - + }; enum combo_events { @@ -45,14 +45,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_MPRV, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SNIP, KC_LGUI, KC_LCTL, KC_LCTL, KC_DN_BSPC, KC_UP_SPC, KC_RALT, TG(_GAME), KC_MUTE ), - + [_GAME] = LAYOUT_2u_bars( KC_TRNS, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_ESC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, KC_H, KC_SJ, KC_K, KC_L, KC_QUOT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LCTL, KC_LGUI, KC_LALT, KC_ESC, KC_SPC, KC_GUP_BSPC, KC_RALT, KC_TRNS, KC_BSPC ), - + [_SYM] = LAYOUT_2u_bars( KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_TRNS, KC_CIRC, KC_AMPR, KC_ASTR, KC_EQUAL, KC_MINS, @@ -93,7 +93,7 @@ const uint16_t PROGMEM combo_tab[] = {KC_S, KC_D, COMBO_END}; const uint16_t PROGMEM combo_esc[] = {KC_T, KC_Y, COMBO_END}; const uint16_t PROGMEM combo_del[] = {KC_Q, KC_W, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [COMBO_BSPC] = COMBO(combo_bspc,KC_BSPC), [COMBO_ENT] = COMBO(combo_ent,KC_ENT), [COMBO_TAB] = COMBO(combo_tab,KC_TAB), @@ -101,4 +101,3 @@ combo_t key_combos[COMBO_COUNT] = { [COMBO_DEL] = COMBO(combo_del,KC_DEL) }; #endif - diff --git a/keyboards/qpockets/wanten/keymaps/625_bar/config.h b/keyboards/qpockets/wanten/keymaps/625_bar/config.h index 072519ff6c..77051be69b 100644 --- a/keyboards/qpockets/wanten/keymaps/625_bar/config.h +++ b/keyboards/qpockets/wanten/keymaps/625_bar/config.h @@ -21,6 +21,5 @@ /*Combos*/ #ifdef COMBO_ENABLE -# define COMBO_COUNT 5 # define COMBO_TERM 25 -#endif +#endif diff --git a/keyboards/qpockets/wanten/keymaps/625_bar/keymap.c b/keyboards/qpockets/wanten/keymaps/625_bar/keymap.c index c9dcfd4af5..1bd1be2f66 100644 --- a/keyboards/qpockets/wanten/keymaps/625_bar/keymap.c +++ b/keyboards/qpockets/wanten/keymaps/625_bar/keymap.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - + #include QMK_KEYBOARD_H enum layers{ @@ -21,7 +21,7 @@ enum layers{ _GAME, _SYM, _NAV - + }; enum combo_events { @@ -45,14 +45,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_MPRV, KC_DZ, KC_X, KC_C, KC_V, KC_B, KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SNIP, KC_LGUI, KC_LCTL, KC_UP_SPC, KC_RALT, TG(_GAME) ), - + [_GAME] = LAYOUT_625_bar( KC_TRNS, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_ESC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, KC_H, KC_SJ, KC_K, KC_L, KC_QUOT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_TRNS ), - + [_SYM] = LAYOUT_625_bar( KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_TRNS, KC_CIRC, KC_AMPR, KC_ASTR, KC_EQUAL, KC_MINS, @@ -93,7 +93,7 @@ const uint16_t PROGMEM combo_tab[] = {KC_S, KC_D, COMBO_END}; const uint16_t PROGMEM combo_esc[] = {KC_T, KC_Y, COMBO_END}; const uint16_t PROGMEM combo_del[] = {KC_Q, KC_W, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [COMBO_BSPC] = COMBO(combo_bspc,KC_BSPC), [COMBO_ENT] = COMBO(combo_ent,KC_ENT), [COMBO_TAB] = COMBO(combo_tab,KC_TAB), @@ -101,4 +101,3 @@ combo_t key_combos[COMBO_COUNT] = { [COMBO_DEL] = COMBO(combo_del,KC_DEL) }; #endif - diff --git a/keyboards/qpockets/wanten/keymaps/default/config.h b/keyboards/qpockets/wanten/keymaps/default/config.h index 072519ff6c..77051be69b 100644 --- a/keyboards/qpockets/wanten/keymaps/default/config.h +++ b/keyboards/qpockets/wanten/keymaps/default/config.h @@ -21,6 +21,5 @@ /*Combos*/ #ifdef COMBO_ENABLE -# define COMBO_COUNT 5 # define COMBO_TERM 25 -#endif +#endif diff --git a/keyboards/qpockets/wanten/keymaps/default/keymap.c b/keyboards/qpockets/wanten/keymaps/default/keymap.c index cafcd61d31..13d8a30146 100644 --- a/keyboards/qpockets/wanten/keymaps/default/keymap.c +++ b/keyboards/qpockets/wanten/keymaps/default/keymap.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - + #include QMK_KEYBOARD_H enum layers{ @@ -21,7 +21,7 @@ enum layers{ _GAME, _SYM, _NAV - + }; enum combo_events { @@ -45,14 +45,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_MPRV, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SNIP, KC_LGUI, KC_LCTL, KC_DN_BSPC, KC_UP_SPC, KC_RALT, TG(_GAME), KC_MUTE ), - + [_GAME] = LAYOUT_default( KC_TRNS, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_ESC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, KC_H, KC_SJ, KC_K, KC_L, KC_QUOT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_GUP_BSPC, KC_RALT, KC_TRNS, KC_BSPC ), - + [_SYM] = LAYOUT_default( KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_TRNS, KC_CIRC, KC_AMPR, KC_ASTR, KC_EQUAL, KC_MINS, @@ -93,7 +93,7 @@ const uint16_t PROGMEM combo_tab[] = {KC_S, KC_D, COMBO_END}; const uint16_t PROGMEM combo_esc[] = {KC_T, KC_Y, COMBO_END}; const uint16_t PROGMEM combo_del[] = {KC_Q, KC_W, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [COMBO_BSPC] = COMBO(combo_bspc,KC_BSPC), [COMBO_ENT] = COMBO(combo_ent,KC_ENT), [COMBO_TAB] = COMBO(combo_tab,KC_TAB), @@ -101,4 +101,3 @@ combo_t key_combos[COMBO_COUNT] = { [COMBO_DEL] = COMBO(combo_del,KC_DEL) }; #endif - diff --git a/keyboards/rgbkb/zen/rev1/keymaps/cwebster2/config.h b/keyboards/rgbkb/zen/rev1/keymaps/cwebster2/config.h index 7e523656b8..e4ece8082b 100644 --- a/keyboards/rgbkb/zen/rev1/keymaps/cwebster2/config.h +++ b/keyboards/rgbkb/zen/rev1/keymaps/cwebster2/config.h @@ -17,11 +17,4 @@ along with this program. If not, see . #pragma once - -#define EE_HANDS - -#ifdef COMBO_ENABLE - #define COMBO_COUNT 2 -#endif - #define EE_HANDS diff --git a/keyboards/splitkb/aurora/sweep/keymaps/flinguenheld/features/combo.c b/keyboards/splitkb/aurora/sweep/keymaps/flinguenheld/features/combo.c index e5b897dc62..c382eedddc 100644 --- a/keyboards/splitkb/aurora/sweep/keymaps/flinguenheld/features/combo.c +++ b/keyboards/splitkb/aurora/sweep/keymaps/flinguenheld/features/combo.c @@ -96,12 +96,7 @@ enum combos { SHIFT_LEFT, ALTGR_LEFT, CONTROL_SHIFT_LEFT, - - /* Just to replace the define in config.h */ - COMBO_LENGTH, }; -uint16_t COMBO_LEN = COMBO_LENGTH; - /* Sequences fo keys */ const uint16_t PROGMEM combo_leader[] = {LT(_MOUSE, KC_COMM), LT(_ARROWS, KC_DOT), COMBO_END}; diff --git a/keyboards/splitkb/kyria/keymaps/cameronjlarsen/keymap.c b/keyboards/splitkb/kyria/keymaps/cameronjlarsen/keymap.c index 294d6a278f..902cb33b54 100644 --- a/keyboards/splitkb/kyria/keymaps/cameronjlarsen/keymap.c +++ b/keyboards/splitkb/kyria/keymaps/cameronjlarsen/keymap.c @@ -176,11 +176,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; enum combo_events { - CAPS_COMBO, - // Other combos... - COMBO_LENGTH + CAPS_COMBO }; -uint16_t COMBO_LEN = COMBO_LENGTH; const uint16_t PROGMEM caps_combo[] = {KC_F, KC_J, COMBO_END}; diff --git a/keyboards/splitkb/kyria/keymaps/cwebster2/config.h b/keyboards/splitkb/kyria/keymaps/cwebster2/config.h index 1fa51f23f1..e6fc5e2d0f 100644 --- a/keyboards/splitkb/kyria/keymaps/cwebster2/config.h +++ b/keyboards/splitkb/kyria/keymaps/cwebster2/config.h @@ -42,10 +42,6 @@ //#define RGBLIGHT_STARTUP_ANIMATION #endif -#ifdef COMBO_ENABLE - #define COMBO_COUNT 5 -#endif - #define EE_HANDS //#define DEBUG_MATRIX_SCAN_RATE diff --git a/keyboards/splitkb/kyria/keymaps/cwebster2/keymap.c b/keyboards/splitkb/kyria/keymaps/cwebster2/keymap.c index 9c31e2617c..3a5aa429d5 100644 --- a/keyboards/splitkb/kyria/keymaps/cwebster2/keymap.c +++ b/keyboards/splitkb/kyria/keymaps/cwebster2/keymap.c @@ -40,7 +40,7 @@ const uint16_t PROGMEM curly_combo[] = { KC_F, KC_P, COMBO_END }; const uint16_t PROGMEM parens_combo[] = { KC_P, KC_B, COMBO_END }; const uint16_t PROGMEM square_combo[] = { KC_D, KC_V, COMBO_END }; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [ZX_COPY] = COMBO(copy_combo, LCTL_T(KC_C)), [CV_PASTE] = COMBO(paste_combo, LCTL_T(KC_V)), [PB_PARENS] = COMBO(parens_combo, KC_LPRN), diff --git a/keyboards/synapse/keymaps/7u_space/config.h b/keyboards/synapse/keymaps/7u_space/config.h index 7fdb8504a6..e398cb5b2d 100644 --- a/keyboards/synapse/keymaps/7u_space/config.h +++ b/keyboards/synapse/keymaps/7u_space/config.h @@ -21,6 +21,5 @@ /*Combos*/ #ifdef COMBO_ENABLE -# define COMBO_COUNT 5 # define COMBO_TERM 50 -#endif \ No newline at end of file +#endif diff --git a/keyboards/synapse/keymaps/7u_space/keymap.c b/keyboards/synapse/keymaps/7u_space/keymap.c index 1791db3abe..b530e91c78 100644 --- a/keyboards/synapse/keymaps/7u_space/keymap.c +++ b/keyboards/synapse/keymaps/7u_space/keymap.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - + #include QMK_KEYBOARD_H enum layers{ @@ -67,7 +67,7 @@ const uint16_t PROGMEM combo_tab[] = {KC_S, KC_D, COMBO_END}; const uint16_t PROGMEM combo_esc[] = {KC_T, KC_Y, COMBO_END}; const uint16_t PROGMEM combo_del[] = {KC_Q, KC_W, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [COMBO_BSPC] = COMBO(combo_bspc,KC_BSPC), [COMBO_ENT] = COMBO(combo_ent,KC_ENT), [COMBO_TAB] = COMBO(combo_tab,KC_TAB), diff --git a/keyboards/synapse/keymaps/default/config.h b/keyboards/synapse/keymaps/default/config.h index 7fdb8504a6..e398cb5b2d 100644 --- a/keyboards/synapse/keymaps/default/config.h +++ b/keyboards/synapse/keymaps/default/config.h @@ -21,6 +21,5 @@ /*Combos*/ #ifdef COMBO_ENABLE -# define COMBO_COUNT 5 # define COMBO_TERM 50 -#endif \ No newline at end of file +#endif diff --git a/keyboards/synapse/keymaps/default/keymap.c b/keyboards/synapse/keymaps/default/keymap.c index adaa51bddb..3428272ee9 100644 --- a/keyboards/synapse/keymaps/default/keymap.c +++ b/keyboards/synapse/keymaps/default/keymap.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - + #include QMK_KEYBOARD_H enum layers{ @@ -67,7 +67,7 @@ const uint16_t PROGMEM combo_tab[] = {KC_S, KC_D, COMBO_END}; const uint16_t PROGMEM combo_esc[] = {KC_T, KC_Y, COMBO_END}; const uint16_t PROGMEM combo_del[] = {KC_Q, KC_W, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [COMBO_BSPC] = COMBO(combo_bspc,KC_BSPC), [COMBO_ENT] = COMBO(combo_ent,KC_ENT), [COMBO_TAB] = COMBO(combo_tab,KC_TAB), diff --git a/keyboards/tominabox1/adalyn/keymaps/default/config.h b/keyboards/tominabox1/adalyn/keymaps/default/config.h index d8b87f9478..efedd99714 100644 --- a/keyboards/tominabox1/adalyn/keymaps/default/config.h +++ b/keyboards/tominabox1/adalyn/keymaps/default/config.h @@ -16,6 +16,5 @@ #pragma once #ifdef COMBO_ENABLE -# define COMBO_COUNT 5 # define COMBO_TERM 200 #endif diff --git a/keyboards/tominabox1/adalyn/keymaps/default/keymap.c b/keyboards/tominabox1/adalyn/keymaps/default/keymap.c index 21cc74fa9f..b05dc48703 100644 --- a/keyboards/tominabox1/adalyn/keymaps/default/keymap.c +++ b/keyboards/tominabox1/adalyn/keymaps/default/keymap.c @@ -61,7 +61,7 @@ const uint16_t PROGMEM combo_tab[] = {KC_Q, KC_W, COMBO_END}; const uint16_t PROGMEM combo_esc[] = {KC_E, KC_W, COMBO_END}; const uint16_t PROGMEM combo_del[] = {KC_MINS, KC_EQL, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [COMBO_BSPC] = COMBO(combo_bspc,KC_BSPC), [COMBO_NUMBAK] = COMBO(combo_numbak,KC_BSPC), [COMBO_TAB] = COMBO(combo_tab,KC_TAB), diff --git a/keyboards/tominabox1/le_chiffre/keymaps/default/config.h b/keyboards/tominabox1/le_chiffre/keymaps/default/config.h index 67b668d4bb..8f0df1847a 100644 --- a/keyboards/tominabox1/le_chiffre/keymaps/default/config.h +++ b/keyboards/tominabox1/le_chiffre/keymaps/default/config.h @@ -15,5 +15,4 @@ */ #pragma once -#define COMBO_COUNT 5 #define COMBO_TERM 30 diff --git a/keyboards/tominabox1/le_chiffre/keymaps/default/keymap.c b/keyboards/tominabox1/le_chiffre/keymaps/default/keymap.c index c9bc442a67..e9205d94b3 100644 --- a/keyboards/tominabox1/le_chiffre/keymaps/default/keymap.c +++ b/keyboards/tominabox1/le_chiffre/keymaps/default/keymap.c @@ -80,7 +80,7 @@ const uint16_t PROGMEM combo_tab[] = {KC_Q, KC_W, COMBO_END}; const uint16_t PROGMEM combo_esc[] = {KC_E, KC_W, COMBO_END}; const uint16_t PROGMEM combo_del[] = {KC_MINS, KC_EQL, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [COMBO_BSPC] = COMBO(combo_bspc,KC_BSPC), [COMBO_NUMBAK] = COMBO(combo_numbak,KC_BSPC), [COMBO_TAB] = COMBO(combo_tab,KC_TAB), diff --git a/keyboards/tominabox1/qaz/keymaps/default/config.h b/keyboards/tominabox1/qaz/keymaps/default/config.h index 12482ff6fe..4e92aadf64 100644 --- a/keyboards/tominabox1/qaz/keymaps/default/config.h +++ b/keyboards/tominabox1/qaz/keymaps/default/config.h @@ -1,6 +1,5 @@ #pragma once #ifdef COMBO_ENABLE -# define COMBO_COUNT 5 # define COMBO_TERM 200 #endif diff --git a/keyboards/tominabox1/qaz/keymaps/default/keymap.c b/keyboards/tominabox1/qaz/keymaps/default/keymap.c index cf721292a6..3e0b763f9e 100644 --- a/keyboards/tominabox1/qaz/keymaps/default/keymap.c +++ b/keyboards/tominabox1/qaz/keymaps/default/keymap.c @@ -46,7 +46,7 @@ const uint16_t PROGMEM combo_tab[] = {KC_Q, KC_W, COMBO_END}; const uint16_t PROGMEM combo_esc[] = {KC_E, KC_W, COMBO_END}; const uint16_t PROGMEM combo_del[] = {KC_MINS, KC_EQL, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [COMBO_BSPC] = COMBO(combo_bspc,KC_BSPC), [COMBO_NUMBAK] = COMBO(combo_numbak,KC_BSPC), [COMBO_TAB] = COMBO(combo_tab,KC_TAB), diff --git a/keyboards/tominabox1/qaz/keymaps/default_big_space/config.h b/keyboards/tominabox1/qaz/keymaps/default_big_space/config.h index 12482ff6fe..4e92aadf64 100644 --- a/keyboards/tominabox1/qaz/keymaps/default_big_space/config.h +++ b/keyboards/tominabox1/qaz/keymaps/default_big_space/config.h @@ -1,6 +1,5 @@ #pragma once #ifdef COMBO_ENABLE -# define COMBO_COUNT 5 # define COMBO_TERM 200 #endif diff --git a/keyboards/tominabox1/qaz/keymaps/default_big_space/keymap.c b/keyboards/tominabox1/qaz/keymaps/default_big_space/keymap.c index 13f105add0..ecf28ca9c7 100644 --- a/keyboards/tominabox1/qaz/keymaps/default_big_space/keymap.c +++ b/keyboards/tominabox1/qaz/keymaps/default_big_space/keymap.c @@ -46,7 +46,7 @@ const uint16_t PROGMEM combo_tab[] = {KC_Q, KC_W, COMBO_END}; const uint16_t PROGMEM combo_esc[] = {KC_E, KC_W, COMBO_END}; const uint16_t PROGMEM combo_del[] = {KC_MINS, KC_EQL, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [COMBO_BSPC] = COMBO(combo_bspc,KC_BSPC), [COMBO_NUMBAK] = COMBO(combo_numbak,KC_BSPC), [COMBO_TAB] = COMBO(combo_tab,KC_TAB), diff --git a/keyboards/tominabox1/underscore33/rev1/keymaps/default/config.h b/keyboards/tominabox1/underscore33/rev1/keymaps/default/config.h index 82cbcc42cb..cb5bb474b2 100644 --- a/keyboards/tominabox1/underscore33/rev1/keymaps/default/config.h +++ b/keyboards/tominabox1/underscore33/rev1/keymaps/default/config.h @@ -16,5 +16,4 @@ #pragma once /* Combos */ -#define COMBO_COUNT 5 #define COMBO_TERM 50 diff --git a/keyboards/tominabox1/underscore33/rev1/keymaps/default/keymap.c b/keyboards/tominabox1/underscore33/rev1/keymaps/default/keymap.c index 517f0aafda..cf4eca1a4b 100644 --- a/keyboards/tominabox1/underscore33/rev1/keymaps/default/keymap.c +++ b/keyboards/tominabox1/underscore33/rev1/keymaps/default/keymap.c @@ -71,7 +71,7 @@ const uint16_t PROGMEM combo_tab[] = {KC_Q, KC_W, COMBO_END}; const uint16_t PROGMEM combo_esc[] = {KC_E, KC_W, COMBO_END}; const uint16_t PROGMEM combo_del[] = {KC_MINS, KC_EQL, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [COMBO_BSPC] = COMBO(combo_bspc,KC_BSPC), [COMBO_NUMBAK] = COMBO(combo_numbak,KC_BSPC), [COMBO_TAB] = COMBO(combo_tab,KC_TAB), diff --git a/keyboards/tominabox1/underscore33/rev1/keymaps/default_big_space/config.h b/keyboards/tominabox1/underscore33/rev1/keymaps/default_big_space/config.h index 82cbcc42cb..cb5bb474b2 100644 --- a/keyboards/tominabox1/underscore33/rev1/keymaps/default_big_space/config.h +++ b/keyboards/tominabox1/underscore33/rev1/keymaps/default_big_space/config.h @@ -16,5 +16,4 @@ #pragma once /* Combos */ -#define COMBO_COUNT 5 #define COMBO_TERM 50 diff --git a/keyboards/tominabox1/underscore33/rev1/keymaps/default_big_space/keymap.c b/keyboards/tominabox1/underscore33/rev1/keymaps/default_big_space/keymap.c index 6b5eda2b45..59bff4940b 100644 --- a/keyboards/tominabox1/underscore33/rev1/keymaps/default_big_space/keymap.c +++ b/keyboards/tominabox1/underscore33/rev1/keymaps/default_big_space/keymap.c @@ -71,7 +71,7 @@ const uint16_t PROGMEM combo_tab[] = {KC_Q, KC_W, COMBO_END}; const uint16_t PROGMEM combo_esc[] = {KC_E, KC_W, COMBO_END}; const uint16_t PROGMEM combo_del[] = {KC_MINS, KC_EQL, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [COMBO_BSPC] = COMBO(combo_bspc,KC_BSPC), [COMBO_NUMBAK] = COMBO(combo_numbak,KC_BSPC), [COMBO_TAB] = COMBO(combo_tab,KC_TAB), diff --git a/keyboards/tominabox1/underscore33/rev2/keymaps/default/config.h b/keyboards/tominabox1/underscore33/rev2/keymaps/default/config.h index 82cbcc42cb..cb5bb474b2 100644 --- a/keyboards/tominabox1/underscore33/rev2/keymaps/default/config.h +++ b/keyboards/tominabox1/underscore33/rev2/keymaps/default/config.h @@ -16,5 +16,4 @@ #pragma once /* Combos */ -#define COMBO_COUNT 5 #define COMBO_TERM 50 diff --git a/keyboards/tominabox1/underscore33/rev2/keymaps/default/keymap.c b/keyboards/tominabox1/underscore33/rev2/keymaps/default/keymap.c index 2a415b8e94..be37e1bdd2 100644 --- a/keyboards/tominabox1/underscore33/rev2/keymaps/default/keymap.c +++ b/keyboards/tominabox1/underscore33/rev2/keymaps/default/keymap.c @@ -71,7 +71,7 @@ const uint16_t PROGMEM combo_tab[] = {KC_Q, KC_W, COMBO_END}; const uint16_t PROGMEM combo_esc[] = {KC_E, KC_W, COMBO_END}; const uint16_t PROGMEM combo_del[] = {KC_MINS, KC_EQL, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [COMBO_BSPC] = COMBO(combo_bspc,KC_BSPC), [COMBO_NUMBAK] = COMBO(combo_numbak,KC_BSPC), [COMBO_TAB] = COMBO(combo_tab,KC_TAB), diff --git a/keyboards/tominabox1/underscore33/rev2/keymaps/default_big_space/config.h b/keyboards/tominabox1/underscore33/rev2/keymaps/default_big_space/config.h index 82cbcc42cb..cb5bb474b2 100644 --- a/keyboards/tominabox1/underscore33/rev2/keymaps/default_big_space/config.h +++ b/keyboards/tominabox1/underscore33/rev2/keymaps/default_big_space/config.h @@ -16,5 +16,4 @@ #pragma once /* Combos */ -#define COMBO_COUNT 5 #define COMBO_TERM 50 diff --git a/keyboards/tominabox1/underscore33/rev2/keymaps/default_big_space/keymap.c b/keyboards/tominabox1/underscore33/rev2/keymaps/default_big_space/keymap.c index 6b5eda2b45..59bff4940b 100644 --- a/keyboards/tominabox1/underscore33/rev2/keymaps/default_big_space/keymap.c +++ b/keyboards/tominabox1/underscore33/rev2/keymaps/default_big_space/keymap.c @@ -71,7 +71,7 @@ const uint16_t PROGMEM combo_tab[] = {KC_Q, KC_W, COMBO_END}; const uint16_t PROGMEM combo_esc[] = {KC_E, KC_W, COMBO_END}; const uint16_t PROGMEM combo_del[] = {KC_MINS, KC_EQL, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [COMBO_BSPC] = COMBO(combo_bspc,KC_BSPC), [COMBO_NUMBAK] = COMBO(combo_numbak,KC_BSPC), [COMBO_TAB] = COMBO(combo_tab,KC_TAB), diff --git a/keyboards/xiudi/xd75/keymaps/4sstylz/config.h b/keyboards/xiudi/xd75/keymaps/4sstylz/config.h index bb939188ca..6241444a84 100644 --- a/keyboards/xiudi/xd75/keymaps/4sstylz/config.h +++ b/keyboards/xiudi/xd75/keymaps/4sstylz/config.h @@ -24,7 +24,6 @@ #define LSPO_KEYS KC_LSFT, KC_TRNS, KC_HOME #define LCPO_KEYS KC_LCTL, KC_TRNS, KC_END -#define COMBO_COUNT 1 #define TAPPING_TERM 175 #define BACKLIGHT_BREATHING diff --git a/keyboards/xiudi/xd75/keymaps/4sstylz/keymap.c b/keyboards/xiudi/xd75/keymaps/4sstylz/keymap.c index f21aa059b4..5222497937 100644 --- a/keyboards/xiudi/xd75/keymaps/4sstylz/keymap.c +++ b/keyboards/xiudi/xd75/keymaps/4sstylz/keymap.c @@ -38,7 +38,7 @@ enum combo_events { }; const uint16_t PROGMEM lock_combo[] = {KC_J, KC_K, KC_L, KC_SCLN, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = {COMBO(lock_combo, SCR_LCK)}; +combo_t key_combos[] = {COMBO(lock_combo, SCR_LCK)}; // Layer shorthand #define _QW 0 diff --git a/keyboards/ymdk/melody96/keymaps/dvz/config.h b/keyboards/ymdk/melody96/keymaps/dvz/config.h index 9c834bdce1..380e11a3a1 100644 --- a/keyboards/ymdk/melody96/keymaps/dvz/config.h +++ b/keyboards/ymdk/melody96/keymaps/dvz/config.h @@ -16,7 +16,6 @@ #pragma once -#define COMBO_COUNT 4 #define COMBO_TERM 100 //#define UNICODE_SELECTED_MODES UNICODE_MODE_WINCOMPOSE diff --git a/keyboards/ymdk/melody96/keymaps/dvz/keymap.c b/keyboards/ymdk/melody96/keymaps/dvz/keymap.c index b0f01eead6..20d4d1e510 100644 --- a/keyboards/ymdk/melody96/keymaps/dvz/keymap.c +++ b/keyboards/ymdk/melody96/keymaps/dvz/keymap.c @@ -34,7 +34,7 @@ const uint16_t PROGMEM oe_combo[] = {KC_O, KC_E, COMBO_END}; const uint16_t PROGMEM ue_combo[] = {KC_U, KC_E, COMBO_END}; const uint16_t PROGMEM sz_combo[] = {KC_S, KC_Y, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [UML_AE] = COMBO(ae_combo, KC_QUOT), [UML_OE] = COMBO(oe_combo, KC_SCLN), [UML_UE] = COMBO(ue_combo, KC_LBRC), diff --git a/quantum/keymap_introspection.c b/quantum/keymap_introspection.c index 977b949340..e4a01d2e9a 100644 --- a/quantum/keymap_introspection.c +++ b/quantum/keymap_introspection.c @@ -70,3 +70,24 @@ __attribute__((weak)) uint16_t keycode_at_encodermap_location(uint8_t layer_num, } #endif // defined(ENCODER_ENABLE) && defined(ENCODER_MAP_ENABLE) + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Combos + +#if defined(COMBO_ENABLE) + +uint16_t combo_count_raw(void) { + return sizeof(key_combos) / sizeof(combo_t); +} +__attribute__((weak)) uint16_t combo_count(void) { + return combo_count_raw(); +} + +combo_t* combo_get_raw(uint16_t combo_idx) { + return &key_combos[combo_idx]; +} +__attribute__((weak)) combo_t* combo_get(uint16_t combo_idx) { + return combo_get_raw(combo_idx); +} + +#endif // defined(COMBO_ENABLE) diff --git a/quantum/keymap_introspection.h b/quantum/keymap_introspection.h index 201de937cb..2012a2b8cc 100644 --- a/quantum/keymap_introspection.h +++ b/quantum/keymap_introspection.h @@ -34,3 +34,24 @@ uint16_t keycode_at_encodermap_location_raw(uint8_t layer_num, uint8_t encoder_i uint16_t keycode_at_encodermap_location(uint8_t layer_num, uint8_t encoder_idx, bool clockwise); #endif // defined(ENCODER_ENABLE) && defined(ENCODER_MAP_ENABLE) + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Combos + +#if defined(COMBO_ENABLE) + +// Forward declaration of combo_t so we don't need to deal with header reordering +struct combo_t; +typedef struct combo_t combo_t; + +// Get the number of combos defined in the user's keymap, stored in firmware rather than any other persistent storage +uint16_t combo_count_raw(void); +// Get the number of combos defined in the user's keymap, potentially stored dynamically +uint16_t combo_count(void); + +// Get the keycode for the encoder mapping location, stored in firmware rather than any other persistent storage +combo_t* combo_get_raw(uint16_t combo_idx); +// Get the keycode for the encoder mapping location, potentially stored dynamically +combo_t* combo_get(uint16_t combo_idx); + +#endif // defined(COMBO_ENABLE) diff --git a/quantum/process_keycode/process_combo.c b/quantum/process_keycode/process_combo.c index 2670ccabed..bbee560be9 100644 --- a/quantum/process_keycode/process_combo.c +++ b/quantum/process_keycode/process_combo.c @@ -19,14 +19,7 @@ #include "process_combo.h" #include "action_tapping.h" #include "action.h" - -#ifdef COMBO_COUNT -__attribute__((weak)) combo_t key_combos[COMBO_COUNT]; -uint16_t COMBO_LEN = COMBO_COUNT; -#else -extern combo_t key_combos[]; -extern uint16_t COMBO_LEN; -#endif +#include "keymap_introspection.h" __attribute__((weak)) void process_combo_event(uint16_t combo_index, bool pressed) {} @@ -195,8 +188,8 @@ static inline uint16_t _get_combo_term(uint16_t combo_index, combo_t *combo) { void clear_combos(void) { uint16_t index = 0; longest_term = 0; - for (index = 0; index < COMBO_LEN; ++index) { - combo_t *combo = &key_combos[index]; + for (index = 0; index < combo_count(); ++index) { + combo_t *combo = combo_get(index); if (!COMBO_ACTIVE(combo)) { RESET_COMBO_STATE(combo); } @@ -287,7 +280,7 @@ void drop_combo_from_buffer(uint16_t combo_index) { queued_combo_t *qcombo = &combo_buffer[i]; if (qcombo->combo_index == combo_index) { - combo_t *combo = &key_combos[combo_index]; + combo_t *combo = combo_get(combo_index); DISABLE_COMBO(combo); if (i == combo_buffer_read) { @@ -354,7 +347,7 @@ static inline void apply_combos(void) { // Apply all buffered normal combos. for (uint8_t i = combo_buffer_read; i != combo_buffer_write; INCREMENT_MOD(i)) { queued_combo_t *buffered_combo = &combo_buffer[i]; - combo_t * combo = &key_combos[buffered_combo->combo_index]; + combo_t * combo = combo_get(buffered_combo->combo_index); #ifdef COMBO_MUST_TAP_PER_COMBO if (get_combo_must_tap(buffered_combo->combo_index, combo)) { @@ -459,7 +452,7 @@ static bool process_single_combo(combo_t *combo, uint16_t keycode, keyrecord_t * combo_t *drop = NULL; for (uint8_t combo_buffer_i = combo_buffer_read; combo_buffer_i != combo_buffer_write; INCREMENT_MOD(combo_buffer_i)) { queued_combo_t *qcombo = &combo_buffer[combo_buffer_i]; - combo_t * buffered_combo = &key_combos[qcombo->combo_index]; + combo_t * buffered_combo = combo_get(qcombo->combo_index); if ((drop = overlaps(buffered_combo, combo))) { DISABLE_COMBO(drop); @@ -565,8 +558,8 @@ bool process_combo(uint16_t keycode, keyrecord_t *record) { } #endif - for (uint16_t idx = 0; idx < COMBO_LEN; ++idx) { - combo_t *combo = &key_combos[idx]; + for (uint16_t idx = 0; idx < combo_count(); ++idx) { + combo_t *combo = combo_get(idx); is_combo_key |= process_single_combo(combo, keycode, record, idx); no_combo_keys_pressed = no_combo_keys_pressed && (NO_COMBO_KEYS_ARE_DOWN || COMBO_ACTIVE(combo) || COMBO_DISABLED(combo)); } diff --git a/quantum/process_keycode/process_combo.h b/quantum/process_keycode/process_combo.h index e430c4a5f7..bba5d5ee63 100644 --- a/quantum/process_keycode/process_combo.h +++ b/quantum/process_keycode/process_combo.h @@ -37,7 +37,7 @@ # define COMBO_BUFFER_LENGTH 4 #endif -typedef struct { +typedef struct combo_t { const uint16_t *keys; uint16_t keycode; #ifdef EXTRA_SHORT_COMBOS diff --git a/tests/caps_word/caps_word_combo/test.mk b/tests/caps_word/caps_word_combo/test.mk index 9f2e157189..c294864113 100644 --- a/tests/caps_word/caps_word_combo/test.mk +++ b/tests/caps_word/caps_word_combo/test.mk @@ -17,3 +17,4 @@ CAPS_WORD_ENABLE = yes COMBO_ENABLE = yes AUTO_SHIFT_ENABLE = yes +INTROSPECTION_KEYMAP_C = test_combos.c diff --git a/tests/caps_word/caps_word_combo/test_caps_word_combo.cpp b/tests/caps_word/caps_word_combo/test_caps_word_combo.cpp index 0876cc91a3..2cee203dfd 100644 --- a/tests/caps_word/caps_word_combo/test_caps_word_combo.cpp +++ b/tests/caps_word/caps_word_combo/test_caps_word_combo.cpp @@ -38,29 +38,6 @@ using ::testing::AnyOf; using ::testing::InSequence; using ::testing::TestParamInfo; -extern "C" { -// Define some combos to use for the test, including overlapping combos and -// combos that chord tap-hold keys. -enum combo_events { AB_COMBO, BC_COMBO, AD_COMBO, DE_COMBO, FGHI_COMBO, COMBO_LENGTH }; -uint16_t COMBO_LEN = COMBO_LENGTH; - -const uint16_t ab_combo[] PROGMEM = {KC_A, KC_B, COMBO_END}; -const uint16_t bc_combo[] PROGMEM = {KC_B, KC_C, COMBO_END}; -const uint16_t ad_combo[] PROGMEM = {KC_A, LCTL_T(KC_D), COMBO_END}; -const uint16_t de_combo[] PROGMEM = {LCTL_T(KC_D), LT(1, KC_E), COMBO_END}; -const uint16_t fghi_combo[] PROGMEM = {KC_F, KC_G, KC_H, KC_I, COMBO_END}; - -// clang-format off -combo_t key_combos[] = { - [AB_COMBO] = COMBO(ab_combo, KC_SPC), // KC_A + KC_B = KC_SPC - [BC_COMBO] = COMBO(bc_combo, KC_X), // KC_B + KC_C = KC_X - [AD_COMBO] = COMBO(ad_combo, KC_Y), // KC_A + LCTL_T(KC_D) = KC_Y - [DE_COMBO] = COMBO(de_combo, KC_Z), // LCTL_T(KC_D) + LT(1, KC_E) = KC_Z - [FGHI_COMBO] = COMBO(fghi_combo, KC_W) // KC_F + KC_G + KC_H + KC_I = KC_W -}; -// clang-format on -} // extern "C" - namespace { // To test combos thorougly, we test them with pressing the chord keys with diff --git a/tests/caps_word/caps_word_combo/test_combos.c b/tests/caps_word/caps_word_combo/test_combos.c new file mode 100644 index 0000000000..1d07118d50 --- /dev/null +++ b/tests/caps_word/caps_word_combo/test_combos.c @@ -0,0 +1,20 @@ +#include + +// Define some combos to use for the test, including overlapping combos and +// combos that chord tap-hold keys. +enum combo_events { AB_COMBO, BC_COMBO, AD_COMBO, DE_COMBO, FGHI_COMBO }; + +const uint16_t ab_combo[] PROGMEM = {KC_A, KC_B, COMBO_END}; +const uint16_t bc_combo[] PROGMEM = {KC_B, KC_C, COMBO_END}; +const uint16_t ad_combo[] PROGMEM = {KC_A, LCTL_T(KC_D), COMBO_END}; +const uint16_t de_combo[] PROGMEM = {LCTL_T(KC_D), LT(1, KC_E), COMBO_END}; +const uint16_t fghi_combo[] PROGMEM = {KC_F, KC_G, KC_H, KC_I, COMBO_END}; + +// clang-format off +combo_t key_combos[] = { + [AB_COMBO] = COMBO(ab_combo, KC_SPC), // KC_A + KC_B = KC_SPC + [BC_COMBO] = COMBO(bc_combo, KC_X), // KC_B + KC_C = KC_X + [AD_COMBO] = COMBO(ad_combo, KC_Y), // KC_A + LCTL_T(KC_D) = KC_Y + [DE_COMBO] = COMBO(de_combo, KC_Z), // LCTL_T(KC_D) + LT(1, KC_E) = KC_Z + [FGHI_COMBO] = COMBO(fghi_combo, KC_W) // KC_F + KC_G + KC_H + KC_I = KC_W +}; diff --git a/tests/combo/test.mk b/tests/combo/test.mk index ce6f9fc2b0..4776b9d0c4 100644 --- a/tests/combo/test.mk +++ b/tests/combo/test.mk @@ -2,3 +2,5 @@ # SPDX-License-Identifier: GPL-2.0-or-later COMBO_ENABLE = yes + +INTROSPECTION_KEYMAP_C = test_combos.c diff --git a/tests/combo/test_combo.cpp b/tests/combo/test_combo.cpp index b7aea27f4c..ac852f9d16 100644 --- a/tests/combo/test_combo.cpp +++ b/tests/combo/test_combo.cpp @@ -10,21 +10,6 @@ #include "test_fixture.hpp" #include "test_keymap_key.hpp" -extern "C" { -enum combos { modtest, osmshift, COMBO_LENGTH }; -uint16_t COMBO_LEN = COMBO_LENGTH; - -uint16_t const modtest_combo[] = {KC_Y, KC_U, COMBO_END}; -uint16_t const osmshift_combo[] = {KC_Z, KC_X, COMBO_END}; - -// clang-format off -combo_t key_combos[] = { - [modtest] = COMBO(modtest_combo, RSFT_T(KC_SPACE)), - [osmshift] = COMBO(osmshift_combo, OSM(MOD_LSFT)) -}; -// clang-format on -} - using testing::_; using testing::InSequence; diff --git a/tests/combo/test_combos.c b/tests/combo/test_combos.c new file mode 100644 index 0000000000..8dcb364c6e --- /dev/null +++ b/tests/combo/test_combos.c @@ -0,0 +1,17 @@ +// Copyright 2023 Stefan Kerkmann (@KarlK90) +// Copyright 2023 @filterpaper +// Copyright 2023 Nick Brassel (@tzarc) +// SPDX-License-Identifier: GPL-2.0-or-later +#include "quantum.h" + +enum combos { modtest, osmshift }; + +uint16_t const modtest_combo[] = {KC_Y, KC_U, COMBO_END}; +uint16_t const osmshift_combo[] = {KC_Z, KC_X, COMBO_END}; + +// clang-format off +combo_t key_combos[] = { + [modtest] = COMBO(modtest_combo, RSFT_T(KC_SPACE)), + [osmshift] = COMBO(osmshift_combo, OSM(MOD_LSFT)) +}; +// clang-format on diff --git a/tests/test_common/keycode_util.hpp b/tests/test_common/keycode_util.hpp index d5a520d4b2..3143ab364e 100644 --- a/tests/test_common/keycode_util.hpp +++ b/tests/test_common/keycode_util.hpp @@ -1,5 +1,6 @@ #pragma once +#include #include std::string get_keycode_identifier_or_default(uint16_t keycode); diff --git a/users/art/funcs/string_funcs.c b/users/art/funcs/string_funcs.c index 319b1310e4..1ea86779cc 100644 --- a/users/art/funcs/string_funcs.c +++ b/users/art/funcs/string_funcs.c @@ -37,10 +37,8 @@ enum combo_events { ED_ENTER, ED_CS_ENTER, - BSPC_LSFT_CLEAR, - COMBO_LENGTH + BSPC_LSFT_CLEAR }; -uint16_t COMBO_LEN = COMBO_LENGTH; // do not remove - needed for combos to work const uint16_t PROGMEM combo_up[] = {KC_W, KC_R, COMBO_END}; const uint16_t PROGMEM combo_left[] = {KC_S, KC_E, COMBO_END}; @@ -122,7 +120,7 @@ void process_combo_event(uint16_t combo_index, bool pressed) { tap_code16(A(KC_RIGHT)); } } - break; + break; case BSPC_LSFT_CLEAR: if (pressed) { tap_code16(KC_END); @@ -134,7 +132,7 @@ void process_combo_event(uint16_t combo_index, bool pressed) { if (pressed) { tap_code16(C(S(KC_ENTER))); } - break; + break; } } @@ -210,63 +208,63 @@ void send_string_with_translation(char *string) { case 'w': toPrint = 'd'; - break; + break; case 'e': toPrint = 'r'; - break; + break; case 'r': toPrint = 'w'; - break; + break; case 't': toPrint = 'b'; - break; + break; case 'y': toPrint = 'j'; - break; + break; case 'u': toPrint = 'f'; - break; + break; case 'i': toPrint = 'u'; - break; + break; case 'o': toPrint = 'p'; - break; + break; case 'p': toPrint = ';'; - break; + break; case 'd': toPrint = 'h'; - break; + break; case 'f': toPrint = 't'; - break; + break; case 'h': toPrint = 'y'; - break; + break; case 'j': toPrint = 'n'; - break; + break; case 'k': toPrint = 'e'; - break; + break; case 'l': toPrint = 'o'; - break; + break; case ';': toPrint = 'i'; - break; + break; case 'b': toPrint = 'm'; - break; + break; case 'n': toPrint = 'k'; - break; + break; case 'm': toPrint = 'l'; - break; + break; } if (isUpperCase) { isUpperCase = 0; @@ -306,4 +304,4 @@ void send_shifted_strings_add(char *string1, char *string2) { send_string(string2); char_to_bspace = strlen(string1) + strlen(string2); } -} \ No newline at end of file +} diff --git a/users/danielo515/combo.c b/users/danielo515/combo.c index b33cb838bc..dae53f6e85 100644 --- a/users/danielo515/combo.c +++ b/users/danielo515/combo.c @@ -26,7 +26,7 @@ const uint16_t PROGMEM n_m[] = {KC_N, KC_M, COMBO_END}; const uint16_t PROGMEM o_p_combo[] = {KC_O, KC_P, COMBO_END}; const uint16_t PROGMEM m_cm_dot_combo[] = {KC_M, KC_COMMA, KC_DOT, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [JK_ESC] = COMBO(jk_combo, KC_ESC), [YU_COM] = COMBO(yu_combo, KC_AMPR), [UI_COM] = COMBO(ui_combo, KC_CIRC), diff --git a/users/danielo515/config.h b/users/danielo515/config.h index 11007eb27f..c5f9b08389 100644 --- a/users/danielo515/config.h +++ b/users/danielo515/config.h @@ -1,7 +1,6 @@ #pragma once #if defined(COMBO_ENABLE) -# define COMBO_COUNT 11 # define COMBO_TERM 25 #endif // !COMBO_ENABLE // Timeout settings for leader key diff --git a/users/ericgebhart/extensions/keymap_combo.h b/users/ericgebhart/extensions/keymap_combo.h index cd9684e601..e918fa08ea 100644 --- a/users/ericgebhart/extensions/keymap_combo.h +++ b/users/ericgebhart/extensions/keymap_combo.h @@ -52,10 +52,7 @@ void process_combo_event(uint16_t combo_index, bool pressed); #define TOGG A_ENUM enum combos { #include "combos.def" - COMBO_LENGTH }; -// Export length to combo module -uint16_t COMBO_LEN = COMBO_LENGTH; // Bake combos into mem #undef COMB diff --git a/users/ibnuda/combo.h b/users/ibnuda/combo.h index d7e79764a9..c4fd5f12ed 100644 --- a/users/ibnuda/combo.h +++ b/users/ibnuda/combo.h @@ -64,7 +64,7 @@ const uint16_t PROGMEM rl_i_ii_combo[] = {RLI, RLII, COMBO_END}; // both hand combinations. const uint16_t PROGMEM bl_m_m_combo[] = {LLM, RLM, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { // left hand combinations. [R_U_PINKY_RING] = COMBO(lu_p_r_combo, KC_TAB), [R_U_RING_MIDDLE] = COMBO(lu_r_m_combo, KC_QUES), @@ -93,4 +93,4 @@ combo_t key_combos[COMBO_COUNT] = { // both hand combinations. [B_L_MIDDLE_MIDDLE] = COMBO(bl_m_m_combo, KC_ENT), -}; \ No newline at end of file +}; diff --git a/users/ibnuda/config.h b/users/ibnuda/config.h index c4fec5bc2d..957d24a04c 100644 --- a/users/ibnuda/config.h +++ b/users/ibnuda/config.h @@ -1,6 +1,5 @@ #pragma once #define COMBO_TERM 50 -#define COMBO_COUNT 50 -#define PERMISSIVE_HOLD \ No newline at end of file +#define PERMISSIVE_HOLD diff --git a/users/issmirnov/config.h b/users/issmirnov/config.h index 5fe78f7a53..a74f6fbc91 100644 --- a/users/issmirnov/config.h +++ b/users/issmirnov/config.h @@ -21,7 +21,6 @@ #define ONESHOT_TIMEOUT 2000 // Enable combos for vim -#define COMBO_COUNT 5 // Specify the number of combos used. BE SURE TO INCREMENT AS NEEDED #define COMBO_TERM 50 // window in milliseconds to trigger combo // Allow more than 4 keys to be sent to the system. Useful for gaming. diff --git a/users/issmirnov/issmirnov.c b/users/issmirnov/issmirnov.c index 45ef7b19a7..ecfb423ee2 100644 --- a/users/issmirnov/issmirnov.c +++ b/users/issmirnov/issmirnov.c @@ -15,9 +15,7 @@ const uint16_t PROGMEM sd_combo[] = {KC_S, KC_D, COMBO_END}; const uint16_t PROGMEM copy_combo[] = {KC_X, KC_C, COMBO_END}; const uint16_t PROGMEM paste_combo[] = {KC_X, KC_V, COMBO_END}; - -// BE SURE TO UPDATE THE CONFIG.H "COMBO_COUNT" value when you add elements here! -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { COMBO(jk_combo, KC_ESC), COMBO(df_combo, KC_COLON), COMBO(sd_combo, KC_SLASH), diff --git a/users/kuchosauronad0/combo.h b/users/kuchosauronad0/combo.h index e2ff09ab5a..6fb3eaf58c 100644 --- a/users/kuchosauronad0/combo.h +++ b/users/kuchosauronad0/combo.h @@ -1,4 +1,4 @@ -#pragma once +#pragma once #include "quantum.h" enum combo_events { ZV_COPY, @@ -12,10 +12,9 @@ const uint16_t PROGMEM cut_combo[] = {KC_X, KC_V, COMBO_END}; const uint16_t PROGMEM paste_combo[] = {KC_C, KC_V, COMBO_END}; const uint16_t PROGMEM sleep_combo[] = {KC_Q, KC_P, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [ZV_COPY] = COMBO_ACTION(copy_combo), [XV_CUT] = COMBO_ACTION(cut_combo), [CV_PASTE] = COMBO_ACTION(paste_combo), [QP_SLEEP] = COMBO_ACTION(sleep_combo), }; - diff --git a/users/kuchosauronad0/config.h b/users/kuchosauronad0/config.h index 28e41215b9..58ef7a20f8 100644 --- a/users/kuchosauronad0/config.h +++ b/users/kuchosauronad0/config.h @@ -56,7 +56,6 @@ #endif // !LEADER_ENABLE #if defined(COMBO_ENABLE) -# define COMBO_COUNT 4 # define COMBO_TERM 150 #endif // !COMBO_ENABLE diff --git a/users/manna-harbour_miryoku/config.h b/users/manna-harbour_miryoku/config.h index 3656e9eded..f2bc9c331b 100644 --- a/users/manna-harbour_miryoku/config.h +++ b/users/manna-harbour_miryoku/config.h @@ -34,7 +34,6 @@ // Thumb Combos #if defined (MIRYOKU_KLUDGE_THUMBCOMBOS) - #define COMBO_COUNT 8 #define COMBO_TERM 200 #define EXTRA_SHORT_COMBOS #endif diff --git a/users/manna-harbour_miryoku/manna-harbour_miryoku.c b/users/manna-harbour_miryoku/manna-harbour_miryoku.c index 389580759b..58b68c2727 100644 --- a/users/manna-harbour_miryoku/manna-harbour_miryoku.c +++ b/users/manna-harbour_miryoku/manna-harbour_miryoku.c @@ -74,7 +74,7 @@ const uint16_t PROGMEM thumbcombos_sym[] = {KC_UNDS, KC_LPRN, COMBO_END}; const uint16_t PROGMEM thumbcombos_sym[] = {KC_RPRN, KC_UNDS, COMBO_END}; #endif const uint16_t PROGMEM thumbcombos_fun[] = {KC_SPC, KC_TAB, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { COMBO(thumbcombos_base_right, LT(U_FUN, KC_DEL)), COMBO(thumbcombos_base_left, LT(U_MEDIA, KC_ESC)), COMBO(thumbcombos_nav, KC_DEL), diff --git a/users/muppetjones/config.h b/users/muppetjones/config.h index cbc318d24f..742a97950d 100644 --- a/users/muppetjones/config.h +++ b/users/muppetjones/config.h @@ -35,6 +35,4 @@ #endif - -#define COMBO_COUNT 3 #define COMBO_TERM 40 diff --git a/users/muppetjones/features/combos.c b/users/muppetjones/features/combos.c index a6d14bb25c..a357b3ad4e 100644 --- a/users/muppetjones/features/combos.c +++ b/users/muppetjones/features/combos.c @@ -27,8 +27,7 @@ const uint16_t PROGMEM h_comm_tab[] = {KC_H, KC_COMM, COMBO_END}; const uint16_t PROGMEM l_u_scln[] = {KC_L, KC_U, COMBO_END}; const uint16_t PROGMEM j_m_caps[] = {KC_J, KC_M, COMBO_END}; -// COMBO_COUNT defined in config.h -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [H_COMM_TAB] = COMBO(h_comm_tab, KC_TAB), [L_U_SCLN] = COMBO(l_u_scln, KC_SCLN), [J_M_CAPS] = COMBO(j_m_caps, KC_CAPS), diff --git a/users/narze/superduper.c b/users/narze/superduper.c index b497ce2e68..7545685727 100644 --- a/users/narze/superduper.c +++ b/users/narze/superduper.c @@ -24,7 +24,7 @@ const uint16_t PROGMEM superduper_combos[SUPERDUPER_COMBO_COUNT][3] = { [_QWOC] = {CM_S, CM_D, COMBO_END}, }; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [CB_SUPERDUPER] = COMBO_ACTION(superduper_combos[_QWERTY]), }; diff --git a/users/ninjonas/combos.c b/users/ninjonas/combos.c index 8d1cd6510f..3346af4ce4 100644 --- a/users/ninjonas/combos.c +++ b/users/ninjonas/combos.c @@ -15,7 +15,7 @@ const uint16_t PROGMEM tab_combo[] = {KC_Q, KC_T, COMBO_END}; const uint16_t PROGMEM copy_combo[] = {KC_Z, KC_C, COMBO_END}; const uint16_t PROGMEM paste_combo[] = {KC_X, KC_V, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [EQ_QUIT] = COMBO_ACTION(quit_combo), [RW_CLOSE] = COMBO_ACTION(close_combo), [QT_TAB] = COMBO_ACTION(tab_combo), @@ -52,4 +52,4 @@ void process_combo_event(uint16_t combo_index, bool pressed) { break; } } -#endif \ No newline at end of file +#endif diff --git a/users/ninjonas/config.h b/users/ninjonas/config.h index 565e40e841..17bb03865c 100644 --- a/users/ninjonas/config.h +++ b/users/ninjonas/config.h @@ -15,8 +15,6 @@ #define MOUSEKEY_WHEEL_DELAY 0 #ifdef COMBO_ENABLE - #undef COMBO_COUNT #undef COMBO_TERM - #define COMBO_COUNT 5 #define COMBO_TERM 60 #endif diff --git a/users/pdl/pdl.c b/users/pdl/pdl.c index 5b90a0b310..1ad2e02c12 100644 --- a/users/pdl/pdl.c +++ b/users/pdl/pdl.c @@ -181,7 +181,7 @@ const uint16_t PROGMEM xcombo_redo[] = {KC_B, KC_H, COMBO_END}; const uint16_t PROGMEM xcombo_pgup[] = {KC_G, KC_B, COMBO_END}; const uint16_t PROGMEM xcombo_pgdn[] = {KC_G, KC_K, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [VCOMBO_PU] = COMBO(vcombo_pu, KC_CIRC), [VCOMBO_NU] = COMBO(vcombo_nu, KC_LBRC), [VCOMBO_EU] = COMBO(vcombo_eu, LSFT(KC_9)), diff --git a/users/talljoe/config.h b/users/talljoe/config.h index dcdbbd89f4..6cf0605be3 100644 --- a/users/talljoe/config.h +++ b/users/talljoe/config.h @@ -19,5 +19,4 @@ #define RESET_LAYER 15 -#define COMBO_COUNT 2 #define COMBO_TERM 250 diff --git a/users/uqs/uqs.c b/users/uqs/uqs.c index 83733bbe2a..cd5e86bdcb 100644 --- a/users/uqs/uqs.c +++ b/users/uqs/uqs.c @@ -125,8 +125,6 @@ const uint16_t PROGMEM my_combos[][4] = { {KC_BTN1, KC_BTN2, KC_BTN3, COMBO_END}, }; -const uint16_t COMBO_LEN = ARRAY_SIZE(my_action_combos) + ARRAY_SIZE(my_combos); - #define MY_ACTION_COMBO(ck) \ [ck] = { .keys = &(my_action_combos[ck][0]) } #define MY_COMBO(ck) \ diff --git a/users/yet-another-developer/combo.h b/users/yet-another-developer/combo.h index e2ff09ab5a..6fb3eaf58c 100644 --- a/users/yet-another-developer/combo.h +++ b/users/yet-another-developer/combo.h @@ -1,4 +1,4 @@ -#pragma once +#pragma once #include "quantum.h" enum combo_events { ZV_COPY, @@ -12,10 +12,9 @@ const uint16_t PROGMEM cut_combo[] = {KC_X, KC_V, COMBO_END}; const uint16_t PROGMEM paste_combo[] = {KC_C, KC_V, COMBO_END}; const uint16_t PROGMEM sleep_combo[] = {KC_Q, KC_P, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [ZV_COPY] = COMBO_ACTION(copy_combo), [XV_CUT] = COMBO_ACTION(cut_combo), [CV_PASTE] = COMBO_ACTION(paste_combo), [QP_SLEEP] = COMBO_ACTION(sleep_combo), }; - diff --git a/users/yet-another-developer/config.h b/users/yet-another-developer/config.h index e783d08dc5..4836822eb4 100644 --- a/users/yet-another-developer/config.h +++ b/users/yet-another-developer/config.h @@ -17,7 +17,6 @@ #endif // !LEADER_ENABLE #if defined(COMBO_ENABLE) - #define COMBO_COUNT 4 #define COMBO_TERM 150 #endif // !COMBO_ENABLE diff --git a/users/zigotica/combos.c b/users/zigotica/combos.c index a4d4f15618..3f37f3c859 100644 --- a/users/zigotica/combos.c +++ b/users/zigotica/combos.c @@ -15,10 +15,8 @@ along with this program. If not, see . enum combos { EM_EMAIL, - CL_CAPSL, - COMBO_LENGTH + CL_CAPSL }; -uint16_t COMBO_LEN = COMBO_LENGTH; const uint16_t PROGMEM email_combo[] = {LT(_SYM, KC_E), KC_M, COMBO_END}; const uint16_t PROGMEM caps_combo[] = {KC_C, KC_L, COMBO_END}; @@ -37,4 +35,3 @@ void process_combo_event(uint16_t combo_index, bool pressed) { break; } } - -- cgit 1.4.1 From 3993b15f054265071730cdb450f43457dcf4c64a Mon Sep 17 00:00:00 2001 From: Pascal Getreuer <50221757+getreuer@users.noreply.github.com> Date: Sat, 20 May 2023 05:35:06 -0700 Subject: [Core] Add Repeat Key ("repeat last key") as a core feature. (#19700) Co-authored-by: casuanoob <96005765+casuanoob@users.noreply.github.com> Co-authored-by: Sergey Vlasov --- builddefs/generic_features.mk | 1 + builddefs/show_options.mk | 3 +- data/constants/keycodes/keycodes_0.0.3.hjson | 0 .../keycodes/keycodes_0.0.3_quantum.hjson | 18 + docs/_summary.md | 1 + docs/feature_repeat_key.md | 457 +++++++++++++ docs/ja/_summary.md | 1 + docs/keycodes.md | 9 + docs/zh-cn/_summary.md | 1 + quantum/action.c | 4 +- quantum/action.h | 2 +- quantum/keycodes.h | 6 +- quantum/process_keycode/process_repeat_key.c | 109 +++ quantum/process_keycode/process_repeat_key.h | 62 ++ quantum/quantum.c | 5 +- quantum/quantum.h | 5 + quantum/repeat_key.c | 282 ++++++++ quantum/repeat_key.h | 80 +++ tests/repeat_key/alt_repeat_key/config.h | 18 + tests/repeat_key/alt_repeat_key/test.mk | 18 + .../alt_repeat_key/test_alt_repeat_key.cpp | 523 ++++++++++++++ tests/repeat_key/config.h | 20 + tests/repeat_key/repeat_key_combo/config.h | 18 + tests/repeat_key/repeat_key_combo/test.mk | 18 + .../repeat_key_combo/test_repeat_key_combo.cpp | 67 ++ tests/repeat_key/test.mk | 18 + tests/repeat_key/test_repeat_key.cpp | 754 +++++++++++++++++++++ tests/test_common/keycode_table.cpp | 2 + tests/test_common/test_driver.hpp | 12 + 29 files changed, 2508 insertions(+), 6 deletions(-) create mode 100644 data/constants/keycodes/keycodes_0.0.3.hjson create mode 100644 data/constants/keycodes/keycodes_0.0.3_quantum.hjson create mode 100644 docs/feature_repeat_key.md create mode 100644 quantum/process_keycode/process_repeat_key.c create mode 100644 quantum/process_keycode/process_repeat_key.h create mode 100644 quantum/repeat_key.c create mode 100644 quantum/repeat_key.h create mode 100644 tests/repeat_key/alt_repeat_key/config.h create mode 100644 tests/repeat_key/alt_repeat_key/test.mk create mode 100644 tests/repeat_key/alt_repeat_key/test_alt_repeat_key.cpp create mode 100644 tests/repeat_key/config.h create mode 100644 tests/repeat_key/repeat_key_combo/config.h create mode 100644 tests/repeat_key/repeat_key_combo/test.mk create mode 100644 tests/repeat_key/repeat_key_combo/test_repeat_key_combo.cpp create mode 100644 tests/repeat_key/test.mk create mode 100644 tests/repeat_key/test_repeat_key.cpp (limited to 'quantum/process_keycode') diff --git a/builddefs/generic_features.mk b/builddefs/generic_features.mk index 5a1ef5c6f0..4e058dcd26 100644 --- a/builddefs/generic_features.mk +++ b/builddefs/generic_features.mk @@ -32,6 +32,7 @@ GENERIC_FEATURES = \ KEY_OVERRIDE \ LEADER \ PROGRAMMABLE_BUTTON \ + REPEAT_KEY \ SECURE \ SPACE_CADET \ SWAP_HANDS \ diff --git a/builddefs/show_options.mk b/builddefs/show_options.mk index 9723b45438..8bcc02083b 100644 --- a/builddefs/show_options.mk +++ b/builddefs/show_options.mk @@ -85,7 +85,8 @@ OTHER_OPTION_NAMES = \ SECURE_ENABLE \ CAPS_WORD_ENABLE \ AUTOCORRECT_ENABLE \ - TRI_LAYER_ENABLE + TRI_LAYER_ENABLE \ + REPEAT_KEY_ENABLE define NAME_ECHO @printf " %-30s = %-16s # %s\\n" "$1" "$($1)" "$(origin $1)" diff --git a/data/constants/keycodes/keycodes_0.0.3.hjson b/data/constants/keycodes/keycodes_0.0.3.hjson new file mode 100644 index 0000000000..e69de29bb2 diff --git a/data/constants/keycodes/keycodes_0.0.3_quantum.hjson b/data/constants/keycodes/keycodes_0.0.3_quantum.hjson new file mode 100644 index 0000000000..23a3c9b06d --- /dev/null +++ b/data/constants/keycodes/keycodes_0.0.3_quantum.hjson @@ -0,0 +1,18 @@ +{ + "keycodes": { + "0x7C79": { + "group": "quantum", + "key": "QK_REPEAT_KEY", + "aliases": [ + "QK_REP" + ] + }, + "0x7C7A": { + "group": "quantum", + "key": "QK_ALT_REPEAT_KEY", + "aliases": [ + "QK_AREP" + ] + } + } +} diff --git a/docs/_summary.md b/docs/_summary.md index ce579cb071..3d9bde6b17 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -70,6 +70,7 @@ * [Macros](feature_macros.md) * [Mouse Keys](feature_mouse_keys.md) * [Programmable Button](feature_programmable_button.md) + * [Repeat Key](feature_repeat_key.md) * [Space Cadet Shift](feature_space_cadet.md) * [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md) diff --git a/docs/feature_repeat_key.md b/docs/feature_repeat_key.md new file mode 100644 index 0000000000..6fa8a724ef --- /dev/null +++ b/docs/feature_repeat_key.md @@ -0,0 +1,457 @@ +# Repeat Key + +The Repeat Key performs the action of the last pressed key. Tapping the Repeat +Key after tapping the Z key types another "`z`." This is useful for +typing doubled letters, like the `z` in "`dazzle`": a double tap on Z +can instead be a roll from Z to Repeat, which is +potentially faster and more comfortable. The Repeat Key is also useful for +hotkeys, like repeating Ctrl + Shift + Right Arrow to select by word. + +Repeat Key remembers mods that were active with the last key press. These mods +are combined with any additional mods while pressing the Repeat Key. If the last +press key was Ctrl + Z, then Shift + +Repeat performs Ctrl + Shift + `Z`. + +## How do I enable Repeat Key + +In your `rules.mk`, add: + +```make +REPEAT_KEY_ENABLE = yes +``` + +Then pick a key in your keymap and assign it the keycode `QK_REPEAT_KEY` (short +alias `QK_REP`). Optionally, use the keycode `QK_ALT_REPEAT_KEY` (short alias +`QK_AREP`) on another key. + +## Keycodes + +|Keycode |Aliases |Description | +|-----------------------|---------|-------------------------------------| +|`QK_REPEAT_KEY` |`QK_REP` |Repeat the last pressed key | +|`QK_ALT_REPEAT_KEY` |`QK_AREP`|Perform alternate of the last key | + +## Alternate Repeating + +The Alternate Repeat Key performs the "alternate" action of the last pressed key +if it is defined. By default, Alternate Repeat is defined for navigation keys to +act in the reverse direction. When the last key is the common "select by word" +hotkey Ctrl + Shift + Right Arrow, the Alternate Repeat Key performs Ctrl + +Shift + Left Arrow, which together with the Repeat Key enables convenient +selection by words in either direction. + +Alternate Repeat is enabled with the Repeat Key by default. Optionally, to +reduce firmware size, Alternate Repeat may be disabled by adding in config.h: + +```c +#define NO_ALT_REPEAT_KEY +``` + +The following alternate keys are defined by default. See +`get_alt_repeat_key_keycode_user()` below for how to change or add to these +definitions. Where it makes sense, these definitions also include combinations +with mods, like Ctrl + Left ↔ Ctrl + Right Arrow. + +**Navigation** + +|Keycodes |Description | +|-----------------------------------|-----------------------------------| +|`KC_LEFT` ↔ `KC_RGHT` | Left ↔ Right Arrow | +|`KC_UP` ↔ `KC_DOWN` | Up ↔ Down Arrow | +|`KC_HOME` ↔ `KC_END` | Home ↔ End | +|`KC_PGUP` ↔ `KC_PGDN` | Page Up ↔ Page Down | +|`KC_MS_L` ↔ `KC_MS_R` | Mouse Cursor Left ↔ Right | +|`KC_MS_U` ↔ `KC_MS_D` | Mouse Cursor Up ↔ Down | +|`KC_WH_L` ↔ `KC_WH_R` | Mouse Wheel Left ↔ Right | +|`KC_WH_U` ↔ `KC_WH_D` | Mouse Wheel Up ↔ Down | + +**Misc** + +|Keycodes |Description | +|-----------------------------------|-----------------------------------| +|`KC_BSPC` ↔ `KC_DEL` | Backspace ↔ Delete | +|`KC_LBRC` ↔ `KC_RBRC` | `[` ↔ `]` | +|`KC_LCBR` ↔ `KC_RCBR` | `{` ↔ `}` | + +**Media** + +|Keycodes |Description | +|-----------------------------------|-----------------------------------| +|`KC_WBAK` ↔ `KC_WFWD` | Browser Back ↔ Forward | +|`KC_MNXT` ↔ `KC_MPRV` | Next ↔ Previous Media Track | +|`KC_MFFD` ↔ `KC_MRWD` | Fast Forward ↔ Rewind Media | +|`KC_VOLU` ↔ `KC_VOLD` | Volume Up ↔ Down | +|`KC_BRIU` ↔ `KC_BRID` | Brightness Up ↔ Down | + +**Hotkeys in Vim, Emacs, and other programs** + +|Keycodes |Description | +|-----------------------------------|-----------------------------------| +|mod + `KC_F` ↔ mod + `KC_B` | Forward ↔ Backward | +|mod + `KC_D` ↔ mod + `KC_U` | Down ↔ Up | +|mod + `KC_N` ↔ mod + `KC_P` | Next ↔ Previous | +|mod + `KC_A` ↔ mod + `KC_E` | Home ↔ End | +|mod + `KC_O` ↔ mod + `KC_I` | Vim jump list Older ↔ Newer | +|`KC_J` ↔ `KC_K` | Down ↔ Up | +|`KC_H` ↔ `KC_L` | Left ↔ Right | +|`KC_W` ↔ `KC_B` | Forward ↔ Backward by Word | + +(where above, "mod" is Ctrl, Alt, or GUI) + + +## Defining alternate keys + +Use the `get_alt_repeat_key_keycode_user()` callback to define the "alternate" +for additional keys or override the default definitions. For example, to define +Ctrl + Y as the alternate of Ctrl + Z, and vice versa, add the following in +keymap.c: + +```c +uint16_t get_alt_repeat_key_keycode_user(uint16_t keycode, uint8_t mods) { + if ((mods & MOD_MASK_CTRL)) { // Was Ctrl held? + switch (keycode) { + case KC_Y: return C(KC_Z); // Ctrl + Y reverses to Ctrl + Z. + case KC_Z: return C(KC_Y); // Ctrl + Z reverses to Ctrl + Y. + } + } + + return KC_TRNS; // Defer to default definitions. +} +``` + +The `keycode` and `mods` args are the keycode and mods that were active with the +last pressed key. The meaning of the return value from this function is: + +* `KC_NO` – do nothing (any predefined alternate key is not used); +* `KC_TRNS` – use the default alternate key if it exists; +* anything else – use the specified keycode. Any keycode may be returned + as an alternate key, including custom keycodes. + +Another example, defining Shift + Tab as the alternate of Tab, and vice versa: + +```c +uint16_t get_alt_repeat_key_keycode_user(uint16_t keycode, uint8_t mods) { + bool shifted = (mods & MOD_MASK_SHIFT); // Was Shift held? + switch (keycode) { + case KC_TAB: + if (shifted) { // If the last key was Shift + Tab, + return KC_TAB; // ... the reverse is Tab. + } else { // Otherwise, the last key was Tab, + return S(KC_TAB); // ... and the reverse is Shift + Tab. + } + } + + return KC_TRNS; +} +``` + +#### Eliminating SFBs + +Alternate Repeat can be configured more generally to perform an action that +"complements" the last key. Alternate Repeat is not limited to reverse +repeating, and it need not be symmetric. You can use it to eliminate cases of +same-finger bigrams in your layout, that is, pairs of letters typed by the same +finger. The following addresses the top 5 same-finger bigrams in English on +QWERTY, so that for instance "`ed`" may be typed as E, Alt +Repeat. + +```c +uint16_t get_alt_repeat_key_keycode_user(uint16_t keycode, uint8_t mods) { + switch (keycode) { + case KC_E: return KC_D; // For "ED" bigram. + case KC_D: return KC_E; // For "DE" bigram. + case KC_C: return KC_E; // For "CE" bigram. + case KC_L: return KC_O; // For "LO" bigram. + case KC_U: return KC_N; // For "UN" bigram. + } + + return KC_TRNS; +} +``` + +#### Typing shortcuts + +A useful possibility is having Alternate Repeat press [a +macro](feature_macros.md). This way macros can be used without having to +dedicate keys to them. The following defines a couple shortcuts. + +* Typing K, Alt Repeat produces "`keyboard`," with the + initial "`k`" typed as usual and the "`eybord`" produced by the macro. +* Typing ., Alt Repeat produces "`../`," handy for "up + directory" on the shell. Similary, . types the initial "`.`" and + "`./`" is produced by the macro. + +```c +enum custom_keycodes { + M_KEYBOARD = SAFE_RANGE, + M_UPDIR, + // Other custom keys... +}; + +uint16_t get_alt_repeat_key_keycode_user(uint16_t keycode, uint8_t mods) { + switch (keycode) { + case KC_K: return M_KEYBOARD; + case KC_DOT: return M_UPDIR; + } + + return KC_TRNS; +} + +bool process_record_user(uint16_t keycode, keyrecord_t* record) { + switch (keycode) { + case M_KEYBOARD: SEND_STRING(/*k*/"eyboard"); break; + case M_UPDIR: SEND_STRING(/*.*/"./"); break; + } + return true; +} +``` + +## Ignoring certain keys and mods + +In tracking what is "the last key" to be repeated or alternate repeated, +modifier and layer switch keys are always ignored. This makes it possible to set +some mods and change layers between pressing a key and repeating it. By default, +all other (non-modifier, non-layer switch) keys are remembered so that they are +eligible for repeating. To configure additional keys to be ignored, define +`remember_last_key_user()` in your keymap.c. + +#### Ignoring a key + +The following ignores the Backspace key: + +```c +bool remember_last_key_user(uint16_t keycode, keyrecord_t* record, + uint8_t* remembered_mods) { + switch (keycode) { + case KC_BSPC: + return false; // Ignore backspace. + } + + return true; // Other keys can be repeated. +} +``` + +Then for instance, the Repeat key in Left Arrow, +Backspace, Repeat sends Left Arrow again instead of +repeating Backspace. + +The `remember_last_key_user()` callback is called on every key press excluding +modifiers and layer switches. Returning true indicates the key is remembered, +while false means it is ignored. + +#### Filtering remembered mods + +The `remembered_mods` arg represents the mods that will be remembered with +this key. It can be modified to forget certain mods. This may be +useful to forget capitalization when repeating shifted letters, so that "Aaron" +does not becom "AAron": + +```c +bool remember_last_key_user(uint16_t keycode, keyrecord_t* record, + uint8_t* remembered_mods) { + // Forget Shift on letter keys when Shift or AltGr are the only mods. + switch (keycode) { + case KC_A ... KC_Z: + if ((*remembered_mods & ~(MOD_MASK_SHIFT | MOD_BIT(KC_RALT))) == 0) { + *remembered_mods &= ~MOD_MASK_SHIFT; + } + break; + } + + return true; +} +``` + +#### Further conditions + +Besides checking the keycode, this callback could also make conditions based on +the current layer state (with `IS_LAYER_ON(layer)`) or mods (`get_mods()`). For +example, the following ignores keys on layer 2 as well as key combinations +involving GUI: + +```c +bool remember_last_key_user(uint16_t keycode, keyrecord_t* record, + uint8_t* remembered_mods) { + if (IS_LAYER_ON(2) || (get_mods() & MOD_MASK_GUI)) { + return false; // Ignore layer 2 keys and GUI chords. + } + + return true; // Other keys can be repeated. +} +``` + +?> See [Layer Functions](feature_layers.md#functions) and [Checking Modifier +State](feature_advanced_keycodes.md#checking-modifier-state) for further +details. + + +## Handle how a key is repeated + +By default, pressing the Repeat Key will simply behave as if the last key +were pressed again. This also works with macro keys with custom handlers, +invoking the macro again. In case fine-tuning is needed for sensible repetition, +you can handle how a key is repeated with `get_repeat_key_count()` within +`process_record_user()`. + +The `get_repeat_key_count()` function returns a signed count of times the key +has been repeated or alternate repeated. When a key is pressed as usual, +`get_repeat_key_count()` is 0. On the first repeat, it is 1, then the second +repeat, 2, and so on. Negative counts are used similarly for alternate +repeating. For instance supposing `MY_MACRO` is a custom keycode used in the +layout: + +```c +bool process_record_user(uint16_t keycode, keyrecord_t* record) { + switch (keycode) { + case MY_MACRO: + if (get_repeat_key_count() > 0) { + // MY_MACRO is being repeated! + if (record->event.pressed) { + SEND_STRING("repeat!"); + } + } else { + // MY_MACRO is being used normally. + if (record->event.pressed) { + SEND_STRING("macro"); + } + } + return false; + + // Other macros... + } + return true; +} +``` + +## Handle how a key is alternate repeated + +Pressing the Alternate Repeat Key behaves as if the "alternate" of the last +pressed key were pressed, if an alternate is defined. To define how a particular +key is alternate repeated, use the `get_alt_repeat_key_keycode_user()` callback +as described above to define which keycode to use as its alternate. Beyond this, +`get_repeat_key_count()` may be used in custom handlers to fine-tune behavior +when alternate repeating. + +The following example defines `MY_MACRO` as its own alternate, and specially +handles repeating and alternate repeating: + +```c +uint16_t get_alt_repeat_key_keycode_user(uint16_t keycode, uint8_t mods) { + switch (keycode) { + case MY_MACRO: return MY_MACRO; // MY_MACRO is its own alternate. + } + return KC_TRNS; +} + +bool process_record_user(uint16_t keycode, keyrecord_t* record) { + switch (keycode) { + case MY_MACRO: + if (get_repeat_key_count() > 0) { // Repeating. + if (record->event.pressed) { + SEND_STRING("repeat!"); + } + } else if (get_repeat_key_count() < 0) { // Alternate repeating. + if (record->event.pressed) { + SEND_STRING("alt repeat!"); + } + } else { // Used normally. + if (record->event.pressed) { + SEND_STRING("macro"); + } + } + return false; + + // Other macros... + } + return true; +} +``` + + +## Functions + +| Function | Description | +|--------------------------------|------------------------------------------------------------------------| +| `get_last_keycode()` | The last key's keycode, the key to be repeated. | +| `get_last_mods()` | Mods to apply when repeating. | +| `set_last_keycode(kc)` | Set the keycode to be repeated. | +| `set_last_mods(mods)` | Set the mods to apply when repeating. | +| `get_repeat_key_count()` | Signed count of times the key has been repeated or alternate repeated. | +| `get_alt_repeat_key_keycode()` | Keycode to be used for alternate repeating. | + + +## Additional "Alternate" keys + +By leveraging `get_last_keycode()` in macros, it is possible to define +additional, distinct "Alternate Repeat"-like keys. The following defines two +keys `ALTREP2` and `ALTREP3` and implements ten shortcuts with them for common +English 5-gram letter patterns, taking inspiration from +[Stenotype](feature_stenography.md): + + +| Typing | Produces | Typing | Produces | +|----------------------------------|----------|----------------------------------|----------| +| A, ALTREP2 | `ation` | A, ALTREP3 | `about` | +| I, ALTREP2 | `ition` | I, ALTREP3 | `inter` | +| S, ALTREP2 | `ssion` | S, ALTREP3 | `state` | +| T, ALTREP2 | `their` | T, ALTREP3 | `there` | +| W, ALTREP2 | `which` | W, ALTREP3 | `would` | + +```c +enum custom_keycodes { + ALTREP2 = SAFE_RANGE, + ALTREP3, +}; + +// Use ALTREP2 and ALTREP3 in your layout... + +bool remember_last_key_user(uint16_t keycode, keyrecord_t* record, + uint8_t* remembered_mods) { + switch (keycode) { + case ALTREP2: + case ALTREP3: + return false; // Ignore ALTREP keys. + } + + return true; // Other keys can be repeated. +} + +static void process_altrep2(uint16_t keycode, uint8_t mods) { + switch (keycode) { + case KC_A: SEND_STRING(/*a*/"tion"); break; + case KC_I: SEND_STRING(/*i*/"tion"); break; + case KC_S: SEND_STRING(/*s*/"sion"); break; + case KC_T: SEND_STRING(/*t*/"heir"); break; + case KC_W: SEND_STRING(/*w*/"hich"); break; + } +} + +static void process_altrep3(uint16_t keycode, uint8_t mods) { + switch (keycode) { + case KC_A: SEND_STRING(/*a*/"bout"); break; + case KC_I: SEND_STRING(/*i*/"nter"); break; + case KC_S: SEND_STRING(/*s*/"tate"); break; + case KC_T: SEND_STRING(/*t*/"here"); break; + case KC_W: SEND_STRING(/*w*/"ould"); break; + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t* record) { + switch (keycode) { + case ALTREP2: + if (record->event.pressed) { + process_altrep2(get_last_keycode(), get_last_mods()); + } + return false; + + case ALTREP3: + if (record->event.pressed) { + process_altrep3(get_last_keycode(), get_last_mods()); + } + return false; + } + + return true; +} +``` + diff --git a/docs/ja/_summary.md b/docs/ja/_summary.md index e49853bfd4..4d6f2348d5 100644 --- a/docs/ja/_summary.md +++ b/docs/ja/_summary.md @@ -68,6 +68,7 @@ * [モッドタップ](ja/mod_tap.md) * [マクロ](ja/feature_macros.md) * [マウスキー](ja/feature_mouse_keys.md) + * [Repeat Key](ja/feature_repeat_key.md) * [Space Cadet Shift](ja/feature_space_cadet.md) * [US ANSI シフトキー](ja/keycodes_us_ansi_shifted.md) diff --git a/docs/keycodes.md b/docs/keycodes.md index cad050ccf7..e5b6246af7 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md @@ -803,6 +803,15 @@ See also: [Programmable Button](feature_programmable_button.md) |`QK_PROGRAMMABLE_BUTTON_31`|`PB_31`|Programmable button 31| |`QK_PROGRAMMABLE_BUTTON_32`|`PB_32`|Programmable button 32| +## Repeat Key :id=repeat-key + +See also: [Repeat Key](feature_repeat_key.md) + +|Keycode |Aliases |Description | +|-----------------------|---------|-------------------------------------| +|`QK_REPEAT_KEY` |`QK_REP` |Repeat the last pressed key | +|`QK_ALT_REPEAT_KEY` |`QK_AREP`|Perform alternate of the last key | + ## Space Cadet :id=space-cadet See also: [Space Cadet](feature_space_cadet.md) diff --git a/docs/zh-cn/_summary.md b/docs/zh-cn/_summary.md index b8c26ac275..0fc92e33d3 100644 --- a/docs/zh-cn/_summary.md +++ b/docs/zh-cn/_summary.md @@ -73,6 +73,7 @@ * [Mod-Tap](zh-cn/mod_tap.md) * [宏](zh-cn/feature_macros.md) * [鼠标键](zh-cn/feature_mouse_keys.md) + * [Repeat Key](zh-cn/feature_repeat_key.md) * [Space Cadet Shift](zh-cn/feature_space_cadet.md) * [US ANSI上档键值](zh-cn/keycodes_us_ansi_shifted.md) diff --git a/quantum/action.c b/quantum/action.c index 59bfefc495..a45e70c557 100644 --- a/quantum/action.c +++ b/quantum/action.c @@ -285,7 +285,7 @@ void process_record(keyrecord_t *record) { } void process_record_handler(keyrecord_t *record) { -#ifdef COMBO_ENABLE +#if defined(COMBO_ENABLE) || defined(REPEAT_KEY_ENABLE) action_t action; if (record->keycode) { action = action_for_keycode(record->keycode); @@ -1109,7 +1109,7 @@ bool is_tap_record(keyrecord_t *record) { return false; } -#ifdef COMBO_ENABLE +#if defined(COMBO_ENABLE) || defined(REPEAT_KEY_ENABLE) action_t action; if (record->keycode) { action = action_for_keycode(record->keycode); diff --git a/quantum/action.h b/quantum/action.h index 2a2c294c5a..d5b15c6f17 100644 --- a/quantum/action.h +++ b/quantum/action.h @@ -50,7 +50,7 @@ typedef struct { #ifndef NO_ACTION_TAPPING tap_t tap; #endif -#ifdef COMBO_ENABLE +#if defined(COMBO_ENABLE) || defined(REPEAT_KEY_ENABLE) uint16_t keycode; #endif } keyrecord_t; diff --git a/quantum/keycodes.h b/quantum/keycodes.h index 34b13c29af..bbf10da36d 100644 --- a/quantum/keycodes.h +++ b/quantum/keycodes.h @@ -721,6 +721,8 @@ enum qk_keycode_defines { QK_AUTOCORRECT_TOGGLE = 0x7C76, QK_TRI_LAYER_LOWER = 0x7C77, QK_TRI_LAYER_UPPER = 0x7C78, + QK_REPEAT_KEY = 0x7C79, + QK_ALT_REPEAT_KEY = 0x7C7A, QK_KB_0 = 0x7E00, QK_KB_1 = 0x7E01, QK_KB_2 = 0x7E02, @@ -1362,6 +1364,8 @@ enum qk_keycode_defines { AC_TOGG = QK_AUTOCORRECT_TOGGLE, TL_LOWR = QK_TRI_LAYER_LOWER, TL_UPPR = QK_TRI_LAYER_UPPER, + QK_REP = QK_REPEAT_KEY, + QK_AREP = QK_ALT_REPEAT_KEY, }; // Range Helpers @@ -1413,6 +1417,6 @@ enum qk_keycode_defines { #define IS_MACRO_KEYCODE(code) ((code) >= QK_MACRO_0 && (code) <= QK_MACRO_31) #define IS_BACKLIGHT_KEYCODE(code) ((code) >= QK_BACKLIGHT_ON && (code) <= QK_BACKLIGHT_TOGGLE_BREATHING) #define IS_RGB_KEYCODE(code) ((code) >= RGB_TOG && (code) <= RGB_MODE_TWINKLE) -#define IS_QUANTUM_KEYCODE(code) ((code) >= QK_BOOTLOADER && (code) <= QK_TRI_LAYER_UPPER) +#define IS_QUANTUM_KEYCODE(code) ((code) >= QK_BOOTLOADER && (code) <= QK_ALT_REPEAT_KEY) #define IS_KB_KEYCODE(code) ((code) >= QK_KB_0 && (code) <= QK_KB_31) #define IS_USER_KEYCODE(code) ((code) >= QK_USER_0 && (code) <= QK_USER_31) diff --git a/quantum/process_keycode/process_repeat_key.c b/quantum/process_keycode/process_repeat_key.c new file mode 100644 index 0000000000..f819aa226e --- /dev/null +++ b/quantum/process_keycode/process_repeat_key.c @@ -0,0 +1,109 @@ +// Copyright 2022-2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "process_repeat_key.h" + +// Default implementation of remember_last_key_user(). +__attribute__((weak)) bool remember_last_key_user(uint16_t keycode, keyrecord_t* record, uint8_t* remembered_mods) { + return true; +} + +static bool remember_last_key(uint16_t keycode, keyrecord_t* record, uint8_t* remembered_mods) { + switch (keycode) { + // Ignore MO, TO, TG, TT, and TL layer switch keys. + case QK_MOMENTARY ... QK_MOMENTARY_MAX: + case QK_TO ... QK_TO_MAX: + case QK_TOGGLE_LAYER ... QK_TOGGLE_LAYER_MAX: + case QK_LAYER_TAP_TOGGLE ... QK_LAYER_TAP_TOGGLE_MAX: + // Ignore mod keys. + case KC_LCTL ... KC_RGUI: + case KC_HYPR: + case KC_MEH: +#ifndef NO_ACTION_ONESHOT // Ignore one-shot keys. + case QK_ONE_SHOT_LAYER ... QK_ONE_SHOT_LAYER_MAX: + case QK_ONE_SHOT_MOD ... QK_ONE_SHOT_MOD_MAX: +#endif // NO_ACTION_ONESHOT +#ifdef TRI_LAYER_ENABLE // Ignore Tri Layer keys. + case QK_TRI_LAYER_LOWER: + case QK_TRI_LAYER_UPPER: +#endif // TRI_LAYER_ENABLE + return false; + + // Ignore hold events on tap-hold keys. +#ifndef NO_ACTION_TAPPING + case QK_MOD_TAP ... QK_MOD_TAP_MAX: +# ifndef NO_ACTION_LAYER + case QK_LAYER_TAP ... QK_LAYER_TAP_MAX: +# endif // NO_ACTION_LAYER + if (record->tap.count == 0) { + return false; + } + break; +#endif // NO_ACTION_TAPPING + +#ifdef SWAP_HANDS_ENABLE + case QK_SWAP_HANDS ... QK_SWAP_HANDS_MAX: + if (IS_SWAP_HANDS_KEYCODE(keycode) || record->tap.count == 0) { + return false; + } + break; +#endif // SWAP_HANDS_ENABLE + + case QK_REPEAT_KEY: +#ifndef NO_ALT_REPEAT_KEY + case QK_ALT_REPEAT_KEY: +#endif // NO_ALT_REPEAT_KEY + return false; + } + + return remember_last_key_user(keycode, record, remembered_mods); +} + +bool process_last_key(uint16_t keycode, keyrecord_t* record) { + if (get_repeat_key_count()) { + return true; + } + + if (record->event.pressed) { + uint8_t remembered_mods = get_mods() | get_weak_mods(); +#ifndef NO_ACTION_ONESHOT + remembered_mods |= get_oneshot_mods(); +#endif // NO_ACTION_ONESHOT + + if (remember_last_key(keycode, record, &remembered_mods)) { + set_last_record(keycode, record); + set_last_mods(remembered_mods); + } + } + + return true; +} + +bool process_repeat_key(uint16_t keycode, keyrecord_t* record) { + if (get_repeat_key_count()) { + return true; + } + + if (keycode == QK_REPEAT_KEY) { + repeat_key_invoke(&record->event); + return false; +#ifndef NO_ALT_REPEAT_KEY + } else if (keycode == QK_ALT_REPEAT_KEY) { + alt_repeat_key_invoke(&record->event); + return false; +#endif // NO_ALT_REPEAT_KEY + } + + return true; +} diff --git a/quantum/process_keycode/process_repeat_key.h b/quantum/process_keycode/process_repeat_key.h new file mode 100644 index 0000000000..eddc50f254 --- /dev/null +++ b/quantum/process_keycode/process_repeat_key.h @@ -0,0 +1,62 @@ +// Copyright 2022-2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#pragma once + +#include "quantum.h" + +/** + * @brief Process handler for remembering the last key. + * + * @param keycode Keycode registered by matrix press, per keymap + * @param record keyrecord_t structure + * @return true Continue processing keycodes, and send to host + * @return false Stop processing keycodes, and don't send to host + */ +bool process_last_key(uint16_t keycode, keyrecord_t* record); + +/** + * @brief Optional callback defining which keys are remembered. + * + * @param keycode Keycode that was just pressed + * @param record keyrecord_t structure + * @param remembered_mods Mods that will be remembered with this key + * @return true Key is remembered + * @return false Key is ignored + * + * Modifier and layer switch keys are always ignored. For all other keys, this + * callback is called on every key press. Returning true means that the key is + * remembered, false means it is ignored. By default, all non-modifier, + * non-layer switch keys are remembered. + * + * The `remembered_mods` arg represents the mods that will be remembered with + * this key. It can be modified to forget certain mods, for instance to forget + * capitalization when repeating shifted letters: + * + * // Forget Shift on letter keys. + * if (KC_A <= keycode && keycode <= KC_Z && (*remembered_mods & ~MOD_MASK_SHIFT) == 0) { + * *remembered_mods = 0; + * } + */ +bool remember_last_key_user(uint16_t keycode, keyrecord_t* record, uint8_t* remembered_mods); + +/** + * @brief Process handler for Repeat Key feature. + * + * @param keycode Keycode registered by matrix press, per keymap + * @param record keyrecord_t structure + * @return true Continue processing keycodes, and send to host + * @return false Stop processing keycodes, and don't send to host + */ +bool process_repeat_key(uint16_t keycode, keyrecord_t* record); diff --git a/quantum/quantum.c b/quantum/quantum.c index fdc24fa2d0..091cf298f7 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -176,7 +176,7 @@ void soft_reset_keyboard(void) { /* Convert record into usable keycode via the contained event. */ uint16_t get_record_keycode(keyrecord_t *record, bool update_layer_cache) { -#ifdef COMBO_ENABLE +#if defined(COMBO_ENABLE) || defined(REPEAT_KEY_ENABLE) if (record->keycode) { return record->keycode; } @@ -273,6 +273,9 @@ bool process_record_quantum(keyrecord_t *record) { // Must run asap to ensure all keypresses are recorded. process_dynamic_macro(keycode, record) && #endif +#ifdef REPEAT_KEY_ENABLE + process_last_key(keycode, record) && process_repeat_key(keycode, record) && +#endif #if defined(AUDIO_ENABLE) && defined(AUDIO_CLICKY) process_clicky(keycode, record) && #endif diff --git a/quantum/quantum.h b/quantum/quantum.h index fec92a5244..31a1a63a7a 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -251,6 +251,11 @@ extern layer_state_t layer_state; # include "process_tri_layer.h" #endif +#ifdef REPEAT_KEY_ENABLE +# include "repeat_key.h" +# include "process_repeat_key.h" +#endif + void set_single_persistent_default_layer(uint8_t default_layer); #define IS_LAYER_ON(layer) layer_state_is(layer) diff --git a/quantum/repeat_key.c b/quantum/repeat_key.c new file mode 100644 index 0000000000..0689c6d454 --- /dev/null +++ b/quantum/repeat_key.c @@ -0,0 +1,282 @@ +// Copyright 2022-2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "repeat_key.h" + +// Variables saving the state of the last key press. +static keyrecord_t last_record = {0}; +static uint8_t last_mods = 0; +// Signed count of the number of times the last key has been repeated or +// alternate repeated: it is 0 when a key is pressed normally, positive when +// repeated, and negative when alternate repeated. +static int8_t last_repeat_count = 0; +// The repeat_count, but set to 0 outside of repeat_key_invoke() so that it is +// nonzero only while a repeated key is being processed. +static int8_t processing_repeat_count = 0; + +uint16_t get_last_keycode(void) { + return last_record.keycode; +} + +uint8_t get_last_mods(void) { + return last_mods; +} + +void set_last_keycode(uint16_t keycode) { + set_last_record(keycode, &(keyrecord_t){ +#ifndef NO_ACTION_TAPPING + .tap.interrupted = false, + .tap.count = 1, +#endif + }); +} + +void set_last_mods(uint8_t mods) { + last_mods = mods; +} + +void set_last_record(uint16_t keycode, keyrecord_t* record) { + last_record = *record; + last_record.keycode = keycode; + last_repeat_count = 0; +} + +/** @brief Updates `last_repeat_count` in direction `dir`. */ +static void update_last_repeat_count(int8_t dir) { + if (dir * last_repeat_count < 0) { + last_repeat_count = dir; + } else if (dir * last_repeat_count < 127) { + last_repeat_count += dir; + } +} + +int8_t get_repeat_key_count(void) { + return processing_repeat_count; +} + +void repeat_key_invoke(const keyevent_t* event) { + // It is possible (e.g. in rolled presses) that the last key changes while + // the Repeat Key is pressed. To prevent stuck keys, it is important to + // remember separately what key record was processed on press so that the + // the corresponding record is generated on release. + static keyrecord_t registered_record = {0}; + static int8_t registered_repeat_count = 0; + // Since this function calls process_record(), it may recursively call + // itself. We return early if `processing_repeat_count` is nonzero to + // prevent infinite recursion. + if (processing_repeat_count || !last_record.keycode) { + return; + } + + if (event->pressed) { + update_last_repeat_count(1); + // On press, apply the last mods state, stacking on top of current mods. + register_weak_mods(last_mods); + registered_record = last_record; + registered_repeat_count = last_repeat_count; + } + + // Generate a keyrecord and plumb it into the event pipeline. + registered_record.event = *event; + processing_repeat_count = registered_repeat_count; + process_record(®istered_record); + processing_repeat_count = 0; + + // On release, restore the mods state. + if (!event->pressed) { + unregister_weak_mods(last_mods); + } +} + +#ifndef NO_ALT_REPEAT_KEY +/** + * @brief Find alternate keycode from a table of opposing keycode pairs. + * @param table Array of pairs of basic keycodes, declared as PROGMEM. + * @param table_size_bytes The size of the table in bytes. + * @param target The basic keycode to find. + * @return The alternate basic keycode, or KC_NO if none was found. + * + * @note The table keycodes and target must be basic keycodes. + * + * This helper is used several times below to define alternate keys. Given a + * table of pairs of basic keycodes, the function finds the pair containing + * `target` and returns the other keycode in the pair. + */ +static uint8_t find_alt_keycode(const uint8_t (*table)[2], uint8_t table_size_bytes, uint8_t target) { + const uint8_t* keycodes = (const uint8_t*)table; + for (uint8_t i = 0; i < table_size_bytes; ++i) { + if (target == pgm_read_byte(keycodes + i)) { + // Xor (i ^ 1) the index to get the other element in the pair. + return pgm_read_byte(keycodes + (i ^ 1)); + } + } + return KC_NO; +} + +uint16_t get_alt_repeat_key_keycode(void) { + uint16_t keycode = last_record.keycode; + uint8_t mods = last_mods; + + // Call the user callback first to give it a chance to override the default + // alternate key definitions that follow. + uint16_t alt_keycode = get_alt_repeat_key_keycode_user(keycode, mods); + + if (alt_keycode != KC_TRANSPARENT) { + return alt_keycode; + } + + // Convert 8-bit mods to the 5-bit format used in keycodes. This is lossy: + // if left and right handed mods were mixed, they all become right handed. + mods = ((mods & 0xf0) ? /* set right hand bit */ 0x10 : 0) + // Combine right and left hand mods. + | (((mods >> 4) | mods) & 0xf); + + switch (keycode) { + case QK_MODS ... QK_MODS_MAX: // Unpack modifier + basic key. + mods |= QK_MODS_GET_MODS(keycode); + keycode = QK_MODS_GET_BASIC_KEYCODE(keycode); + break; + +# ifndef NO_ACTION_TAPPING + case QK_MOD_TAP ... QK_MOD_TAP_MAX: + keycode = QK_MOD_TAP_GET_TAP_KEYCODE(keycode); + break; +# ifndef NO_ACTION_LAYER + case QK_LAYER_TAP ... QK_LAYER_TAP_MAX: + keycode = QK_LAYER_TAP_GET_TAP_KEYCODE(keycode); + break; +# endif // NO_ACTION_LAYER +# endif // NO_ACTION_TAPPING + +# ifdef SWAP_HANDS_ENABLE + case QK_SWAP_HANDS ... QK_SWAP_HANDS_MAX: + if (IS_SWAP_HANDS_KEYCODE(keycode)) { + return KC_NO; + } + keycode = QK_SWAP_HANDS_GET_TAP_KEYCODE(keycode); + break; +# endif // SWAP_HANDS_ENABLE + } + + if (IS_QK_BASIC(keycode)) { + if ((mods & (MOD_LCTL | MOD_LALT | MOD_LGUI))) { + // The last key was pressed with a modifier other than Shift. + // The following maps + // mod + F <-> mod + B + // and a few others, supporting several core hotkeys used in + // Emacs, Vim, less, and other programs. + // clang-format off + static const uint8_t pairs[][2] PROGMEM = { + {KC_F , KC_B }, // Forward / Backward. + {KC_D , KC_U }, // Down / Up. + {KC_N , KC_P }, // Next / Previous. + {KC_A , KC_E }, // Home / End. + {KC_O , KC_I }, // Older / Newer in Vim jump list. + }; + // clang-format on + alt_keycode = find_alt_keycode(pairs, sizeof(pairs), keycode); + } else { + // The last key was pressed with no mods or only Shift. The + // following map a few more Vim hotkeys. + // clang-format off + static const uint8_t pairs[][2] PROGMEM = { + {KC_J , KC_K }, // Down / Up. + {KC_H , KC_L }, // Left / Right. + // These two lines map W and E to B, and B to W. + {KC_W , KC_B }, // Forward / Backward by word. + {KC_E , KC_B }, // Forward / Backward by word. + }; + // clang-format on + alt_keycode = find_alt_keycode(pairs, sizeof(pairs), keycode); + } + + if (!alt_keycode) { + // The following key pairs are considered with any mods. + // clang-format off + static const uint8_t pairs[][2] PROGMEM = { + {KC_LEFT, KC_RGHT}, // Left / Right Arrow. + {KC_UP , KC_DOWN}, // Up / Down Arrow. + {KC_HOME, KC_END }, // Home / End. + {KC_PGUP, KC_PGDN}, // Page Up / Page Down. + {KC_BSPC, KC_DEL }, // Backspace / Delete. + {KC_LBRC, KC_RBRC}, // Brackets [ ] and { }. +#ifdef EXTRAKEY_ENABLE + {KC_WBAK, KC_WFWD}, // Browser Back / Forward. + {KC_MNXT, KC_MPRV}, // Next / Previous Media Track. + {KC_MFFD, KC_MRWD}, // Fast Forward / Rewind Media. + {KC_VOLU, KC_VOLD}, // Volume Up / Down. + {KC_BRIU, KC_BRID}, // Brightness Up / Down. +#endif // EXTRAKEY_ENABLE +#ifdef MOUSEKEY_ENABLE + {KC_MS_L, KC_MS_R}, // Mouse Cursor Left / Right. + {KC_MS_U, KC_MS_D}, // Mouse Cursor Up / Down. + {KC_WH_L, KC_WH_R}, // Mouse Wheel Left / Right. + {KC_WH_U, KC_WH_D}, // Mouse Wheel Up / Down. +#endif // MOUSEKEY_ENABLE + }; + // clang-format on + alt_keycode = find_alt_keycode(pairs, sizeof(pairs), keycode); + } + + if (alt_keycode) { + // Combine basic keycode with mods. + return (mods << 8) | alt_keycode; + } + } + + return KC_NO; // No alternate key found. +} + +void alt_repeat_key_invoke(const keyevent_t* event) { + static keyrecord_t registered_record = {0}; + static int8_t registered_repeat_count = 0; + // Since this function calls process_record(), it may recursively call + // itself. We return early if `processing_repeat_count` is nonzero to + // prevent infinite recursion. + if (processing_repeat_count) { + return; + } + + if (event->pressed) { + registered_record = (keyrecord_t){ +# ifndef NO_ACTION_TAPPING + .tap.interrupted = false, + .tap.count = 0, +# endif + .keycode = get_alt_repeat_key_keycode(), + }; + } + + // Early return if there is no alternate key defined. + if (!registered_record.keycode) { + return; + } + + if (event->pressed) { + update_last_repeat_count(-1); + registered_repeat_count = last_repeat_count; + } + + // Generate a keyrecord and plumb it into the event pipeline. + registered_record.event = *event; + processing_repeat_count = registered_repeat_count; + process_record(®istered_record); + processing_repeat_count = 0; +} + +// Default implementation of get_alt_repeat_key_keycode_user(). +__attribute__((weak)) uint16_t get_alt_repeat_key_keycode_user(uint16_t keycode, uint8_t mods) { + return KC_TRANSPARENT; +} +#endif // NO_ALT_REPEAT_KEY diff --git a/quantum/repeat_key.h b/quantum/repeat_key.h new file mode 100644 index 0000000000..06e8364529 --- /dev/null +++ b/quantum/repeat_key.h @@ -0,0 +1,80 @@ +// Copyright 2022-2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#pragma once + +#include "quantum.h" + +uint16_t get_last_keycode(void); /**< Keycode of the last key. */ +uint8_t get_last_mods(void); /**< Mods active with the last key. */ +void set_last_keycode(uint16_t keycode); /**< Sets the last key. */ +void set_last_mods(uint8_t mods); /**< Sets the last mods. */ + +/** @brief Gets the record for the last key. */ +keyrecord_t* get_last_record(void); + +/** @brief Sets keycode and record info for the last key. */ +void set_last_record(uint16_t keycode, keyrecord_t* record); + +/** + * @brief Signed count of times the key has been repeated or alternate repeated. + * + * @note The count is nonzero only while a repeated or alternate-repeated key is + * being processed. + * + * When a key is pressed normally, the count is 0. When the Repeat Key is used + * to repeat a key, the count is 1 on the first repeat, 2 on the second repeat, + * and continuing up to 127. + * + * Negative counts are used similarly for alternate repeating. When the + * Alternate Repeat Key is used, the count is -1 on the first alternate repeat, + * -2 on the second, continuing down to -127. + */ +int8_t get_repeat_key_count(void); + +/** + * @brief Calls `process_record()` on a generated record repeating the last key. + * @param event Event information in the generated record. + */ +void repeat_key_invoke(const keyevent_t* event); + +#ifndef NO_ALT_REPEAT_KEY + +/** + * @brief Keycode to be used for alternate repeating. + * + * Alternate Repeat performs this keycode based on the last eligible pressed key + * and mods, get_last_keycode() and get_last_mods(). For example, when the last + * key was KC_UP, this function returns KC_DOWN. The function returns KC_NO if + * the last key doesn't have a defined alternate. + */ +uint16_t get_alt_repeat_key_keycode(void); + +/** + * @brief Calls `process_record()` to alternate repeat the last key. + * @param event Event information in the generated record. + */ +void alt_repeat_key_invoke(const keyevent_t* event); + +/** + * @brief Optional user callback to define additional alternate keys. + * + * When `get_alt_repeat_key_keycode()` is called, it first calls this callback. + * It should return a keycode representing the "alternate" of the given keycode + * and mods. Returning KC_NO defers to the default definitions in + * `get_alt_repeat_key_keycode()`. + */ +uint16_t get_alt_repeat_key_keycode_user(uint16_t keycode, uint8_t mods); + +#endif // NO_ALT_REPEAT_KEY diff --git a/tests/repeat_key/alt_repeat_key/config.h b/tests/repeat_key/alt_repeat_key/config.h new file mode 100644 index 0000000000..d0c4ddadbd --- /dev/null +++ b/tests/repeat_key/alt_repeat_key/config.h @@ -0,0 +1,18 @@ +// Copyright 2023 Google LLC +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +#pragma once + +#include "test_common.h" diff --git a/tests/repeat_key/alt_repeat_key/test.mk b/tests/repeat_key/alt_repeat_key/test.mk new file mode 100644 index 0000000000..080871c816 --- /dev/null +++ b/tests/repeat_key/alt_repeat_key/test.mk @@ -0,0 +1,18 @@ +# Copyright 2023 Google LLC +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +REPEAT_KEY_ENABLE = yes + +EXTRAKEY_ENABLE = yes diff --git a/tests/repeat_key/alt_repeat_key/test_alt_repeat_key.cpp b/tests/repeat_key/alt_repeat_key/test_alt_repeat_key.cpp new file mode 100644 index 0000000000..ae525acb45 --- /dev/null +++ b/tests/repeat_key/alt_repeat_key/test_alt_repeat_key.cpp @@ -0,0 +1,523 @@ +// Copyright 2023 Google LLC +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +#include + +#include "keyboard_report_util.hpp" +#include "keycode.h" +#include "test_common.hpp" +#include "test_fixture.hpp" +#include "test_keymap_key.hpp" + +using ::testing::AnyNumber; +using ::testing::InSequence; + +namespace { + +bool process_record_user_default(uint16_t keycode, keyrecord_t* record) { + return true; +} + +bool remember_last_key_user_default(uint16_t keycode, keyrecord_t* record, uint8_t* remembered_mods) { + return true; +} + +uint16_t get_alt_repeat_key_keycode_user_default(uint16_t keycode, uint8_t mods) { + return KC_TRNS; +} + +// Indirections so that process_record_user() can be replaced with other +// functions in the test cases below. +std::function process_record_user_fun = process_record_user_default; +std::function remember_last_key_user_fun = remember_last_key_user_default; +std::function get_alt_repeat_key_keycode_user_fun = get_alt_repeat_key_keycode_user_default; + +extern "C" bool process_record_user(uint16_t keycode, keyrecord_t* record) { + return process_record_user_fun(keycode, record); +} + +extern "C" bool remember_last_key_user(uint16_t keycode, keyrecord_t* record, uint8_t* remembered_mods) { + return remember_last_key_user_fun(keycode, record, remembered_mods); +} + +extern "C" uint16_t get_alt_repeat_key_keycode_user(uint16_t keycode, uint8_t mods) { + return get_alt_repeat_key_keycode_user_fun(keycode, mods); +} + +class AltRepeatKey : public TestFixture { + public: + bool process_record_user_was_called_; + + void SetUp() override { + process_record_user_fun = process_record_user_default; + remember_last_key_user_fun = remember_last_key_user_default; + get_alt_repeat_key_keycode_user_fun = get_alt_repeat_key_keycode_user_default; + } + + void ExpectProcessRecordUserCalledWith(bool expected_press, uint16_t expected_keycode, int8_t expected_repeat_key_count) { + process_record_user_was_called_ = false; + process_record_user_fun = [=](uint16_t keycode, keyrecord_t* record) { + EXPECT_EQ(record->event.pressed, expected_press); + EXPECT_KEYCODE_EQ(keycode, expected_keycode); + EXPECT_EQ(get_repeat_key_count(), expected_repeat_key_count); + // Tests below use this to verify process_record_user() was called. + process_record_user_was_called_ = true; + return true; + }; + } + + // Expects that the characters of `s` are sent. + // NOTE: This implementation is limited to chars a-z, A-Z. + void ExpectString(TestDriver& driver, const std::string& s) { + InSequence seq; + for (int c : s) { + switch (c) { + case 'a' ... 'z': { // Lowercase letter. + uint16_t keycode = c - ('a' - KC_A); + EXPECT_REPORT(driver, (keycode)); + } break; + + case 'A' ... 'Z': { // Capital letter = KC_LSFT + letter key. + uint16_t keycode = c - ('A' - KC_A); + EXPECT_REPORT(driver, (KC_LSFT, keycode)); + } break; + } + } + } +}; + +TEST_F(AltRepeatKey, AlternateBasic) { + TestDriver driver; + KeymapKey key_bspc(0, 0, 0, KC_BSPC); + KeymapKey key_pgdn(0, 1, 0, KC_PGDN); + KeymapKey key_pgup(0, 2, 0, KC_PGUP); + KeymapKey key_repeat(0, 4, 0, QK_REP); + KeymapKey key_alt_repeat(0, 5, 0, QK_AREP); + set_keymap({key_bspc, key_pgdn, key_pgup, key_repeat, key_alt_repeat}); + + // Allow any number of empty reports. + EXPECT_EMPTY_REPORT(driver).Times(AnyNumber()); + { + InSequence seq; + EXPECT_REPORT(driver, (KC_BSPC)); + EXPECT_REPORT(driver, (KC_DEL)); + EXPECT_REPORT(driver, (KC_DEL)); + EXPECT_REPORT(driver, (KC_BSPC)); + EXPECT_REPORT(driver, (KC_DEL)); + EXPECT_REPORT(driver, (KC_PGDN)); + EXPECT_REPORT(driver, (KC_PGUP)); + EXPECT_REPORT(driver, (KC_PGUP)); + EXPECT_REPORT(driver, (KC_PGDN)); + } + + tap_key(key_bspc); + + for (int n = 1; n <= 2; ++n) { // Tap the Alternate Repeat Key twice. + ExpectProcessRecordUserCalledWith(true, KC_DEL, -n); + key_alt_repeat.press(); // Press the Alternate Repeat Key. + run_one_scan_loop(); + EXPECT_TRUE(process_record_user_was_called_); + + // Expect the corresponding release event. + ExpectProcessRecordUserCalledWith(false, KC_DEL, -n); + key_alt_repeat.release(); // Release the Repeat Key. + run_one_scan_loop(); + EXPECT_TRUE(process_record_user_was_called_); + } + + process_record_user_fun = process_record_user_default; + tap_keys(key_repeat, key_alt_repeat); + tap_keys(key_pgdn, key_alt_repeat); + tap_keys(key_pgup, key_alt_repeat); + + testing::Mock::VerifyAndClearExpectations(&driver); +} + +struct TestParamsAlternateKeyCodes { + uint16_t keycode; + uint8_t mods; + uint16_t expected_alt_keycode; +}; + +// Tests `get_alt_repeat_key_keycode()` for various keycodes. +TEST_F(AltRepeatKey, GetAltRepeatKeyKeycode) { + for (const auto& params : std::vector({ + // clang-format off + // Each line tests one call to `get_alt_repeat_key_keycode()`: + // {keycode, mods, expected_alt_keycode}. + // Arrows. + {KC_LEFT, 0, KC_RGHT}, + {KC_RGHT, 0, KC_LEFT}, + {KC_LEFT, MOD_BIT(KC_LSFT), LSFT(KC_RGHT)}, + {KC_LEFT, MOD_BIT(KC_RSFT), RSFT(KC_RGHT)}, + {KC_LEFT, MOD_BIT(KC_LCTL) | MOD_BIT(KC_LSFT), C(S(KC_RGHT))}, + {KC_LEFT, MOD_BIT(KC_LGUI), LGUI(KC_RGHT)}, + {C(KC_LEFT), MOD_BIT(KC_LSFT), C(S(KC_RGHT))}, + {KC_UP, 0, KC_DOWN}, + // Navigation keys. + {KC_PGUP, 0, KC_PGDN}, + {KC_HOME, 0, KC_END }, + // Media keys. + {KC_WBAK, 0, KC_WFWD}, + {KC_MNXT, 0, KC_MPRV}, + {KC_MRWD, 0, KC_MFFD}, + {KC_VOLU, 0, KC_VOLD}, + {KC_BRIU, 0, KC_BRID}, + // Emacs navigation. + {KC_N, MOD_BIT(KC_LCTL), C(KC_P)}, + {KC_B, MOD_BIT(KC_LCTL), LCTL(KC_F)}, + {KC_B, MOD_BIT(KC_RCTL), RCTL(KC_F)}, + {KC_B, MOD_BIT(KC_LALT), LALT(KC_F)}, + {KC_F, MOD_BIT(KC_LCTL), C(KC_B)}, + {KC_A, MOD_BIT(KC_LCTL), C(KC_E)}, + {KC_D, MOD_BIT(KC_LCTL), C(KC_U)}, + // Vim navigation. + {KC_J, 0, KC_K}, + {KC_K, 0, KC_J}, + {KC_H, 0, KC_L}, + {KC_B, 0, KC_W}, + {KC_W, 0, KC_B}, + {KC_E, 0, KC_B}, + {KC_B, MOD_BIT(KC_LSFT), S(KC_W)}, + {KC_W, MOD_BIT(KC_LSFT), S(KC_B)}, + {KC_E, MOD_BIT(KC_LSFT), S(KC_B)}, + {KC_O, MOD_BIT(KC_LCTL), C(KC_I)}, + {KC_I, MOD_BIT(KC_LCTL), C(KC_O)}, + // Other. + {KC_DEL, 0, KC_BSPC}, + {KC_LBRC, 0, KC_RBRC}, + {KC_LCBR, 0, KC_RCBR}, + // Some keys where the last key is a tap-hold key. + {LSFT_T(KC_F), MOD_BIT(KC_RCTL), RCTL(KC_B)}, + {LT(1, KC_A), MOD_BIT(KC_RGUI), RGUI(KC_E)}, + {RALT_T(KC_J), 0, KC_K}, + // Some keys where no alternate is defined. + {KC_A, 0, KC_NO}, + {KC_F1, 0, KC_NO}, + {QK_LEAD, 0, KC_NO}, + {MO(1), 0, KC_NO}, + // clang-format on + })) { + SCOPED_TRACE(std::string("Input keycode: ") + get_keycode_identifier_or_default(params.keycode)); + set_last_keycode(params.keycode); + set_last_mods(params.mods); + + const uint16_t actual = get_alt_repeat_key_keycode(); + + EXPECT_KEYCODE_EQ(get_alt_repeat_key_keycode(), params.expected_alt_keycode); + } +} + +// Test adding to and overriding the above through the +// `get_alt_repeat_key_keycode_user()` callback. +TEST_F(AltRepeatKey, GetAltRepeatKeyKeycodeUser) { + get_alt_repeat_key_keycode_user_fun = [](uint16_t keycode, uint8_t mods) -> uint16_t { + bool shifted = (mods & MOD_MASK_SHIFT); + switch (keycode) { + case KC_LEFT: + return KC_ENT; + case MO(1): + return TG(1); + case KC_TAB: // Tab <-> Shift + Tab example. + if (shifted) { + return KC_TAB; + } else { + return S(KC_TAB); + } + } + + // Ctrl + Y <-> Ctrl + Z example. + if ((mods & MOD_MASK_CTRL)) { + switch (keycode) { + case KC_Y: + return C(KC_Z); + case KC_Z: + return C(KC_Y); + } + } + + return KC_NO; + }; + + set_last_keycode(KC_LEFT); + EXPECT_KEYCODE_EQ(get_alt_repeat_key_keycode(), KC_ENT); + + set_last_keycode(MO(1)); + EXPECT_KEYCODE_EQ(get_alt_repeat_key_keycode(), TG(1)); + + set_last_keycode(KC_TAB); + EXPECT_KEYCODE_EQ(get_alt_repeat_key_keycode(), S(KC_TAB)); + + set_last_keycode(KC_TAB); + set_last_mods(MOD_BIT(KC_LSFT)); + EXPECT_KEYCODE_EQ(get_alt_repeat_key_keycode(), KC_TAB); + + set_last_keycode(KC_Z); + set_last_mods(MOD_BIT(KC_LCTL)); + EXPECT_KEYCODE_EQ(get_alt_repeat_key_keycode(), C(KC_Y)); + + set_last_keycode(KC_Y); + set_last_mods(MOD_BIT(KC_LCTL)); + EXPECT_KEYCODE_EQ(get_alt_repeat_key_keycode(), C(KC_Z)); +} + +// Tests rolling from a key to Alternate Repeat. +TEST_F(AltRepeatKey, RollingToAltRepeat) { + TestDriver driver; + KeymapKey key_left(0, 0, 0, KC_LEFT); + KeymapKey key_alt_repeat(0, 1, 0, QK_AREP); + set_keymap({key_left, key_alt_repeat}); + + { + InSequence seq; + EXPECT_REPORT(driver, (KC_LEFT)); + EXPECT_REPORT(driver, (KC_LEFT, KC_RGHT)); + EXPECT_REPORT(driver, (KC_RGHT)); + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_RGHT)); + EXPECT_EMPTY_REPORT(driver); + } + + // Perform a rolled press from Left to Alternate Repeat. + + ExpectProcessRecordUserCalledWith(true, KC_LEFT, 0); + key_left.press(); + run_one_scan_loop(); + EXPECT_TRUE(process_record_user_was_called_); + + ExpectProcessRecordUserCalledWith(true, KC_RGHT, -1); + key_alt_repeat.press(); // Press the Alternate Repeat Key. + run_one_scan_loop(); + EXPECT_TRUE(process_record_user_was_called_); + + ExpectProcessRecordUserCalledWith(false, KC_LEFT, 0); + key_left.release(); + run_one_scan_loop(); + EXPECT_TRUE(process_record_user_was_called_); + + ExpectProcessRecordUserCalledWith(false, KC_RGHT, -1); + key_alt_repeat.release(); // Release the Alternate Repeat Key. + run_one_scan_loop(); + EXPECT_TRUE(process_record_user_was_called_); + + process_record_user_fun = process_record_user_default; + tap_key(key_alt_repeat); + + testing::Mock::VerifyAndClearExpectations(&driver); +} + +// Tests rolling from Alternate Repeat to another key. +TEST_F(AltRepeatKey, RollingFromAltRepeat) { + TestDriver driver; + KeymapKey key_left(0, 0, 0, KC_LEFT); + KeymapKey key_up(0, 1, 0, KC_UP); + KeymapKey key_alt_repeat(0, 2, 0, QK_AREP); + set_keymap({key_left, key_up, key_alt_repeat}); + + { + InSequence seq; + EXPECT_REPORT(driver, (KC_LEFT)); + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_RGHT)); + EXPECT_REPORT(driver, (KC_RGHT, KC_UP)); + EXPECT_REPORT(driver, (KC_UP)); + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_DOWN)); + EXPECT_EMPTY_REPORT(driver); + } + + tap_key(key_left); + + // Perform a rolled press from Alternate Repeat to Up. + + ExpectProcessRecordUserCalledWith(true, KC_RGHT, -1); + key_alt_repeat.press(); // Press the Alternate Repeat Key. + run_one_scan_loop(); + EXPECT_TRUE(process_record_user_was_called_); + + ExpectProcessRecordUserCalledWith(true, KC_UP, 0); + key_up.press(); + run_one_scan_loop(); + EXPECT_TRUE(process_record_user_was_called_); + + EXPECT_KEYCODE_EQ(get_last_keycode(), KC_UP); + + ExpectProcessRecordUserCalledWith(false, KC_RGHT, -1); + key_alt_repeat.release(); // Release the Alternate Repeat Key. + run_one_scan_loop(); + EXPECT_TRUE(process_record_user_was_called_); + + ExpectProcessRecordUserCalledWith(false, KC_UP, 0); + key_up.release(); + run_one_scan_loop(); + EXPECT_TRUE(process_record_user_was_called_); + + process_record_user_fun = process_record_user_default; + tap_key(key_alt_repeat); + + testing::Mock::VerifyAndClearExpectations(&driver); +} + +// Tests using the Alternate Repeat Key on a macro that doesn't have an +// alternate keycode defined. +TEST_F(AltRepeatKey, AlternateUnsupportedMacro) { + TestDriver driver; + KeymapKey key_foo(0, 0, 0, QK_USER_0); + KeymapKey key_alt_repeat(0, 1, 0, QK_AREP); + set_keymap({key_foo, key_alt_repeat}); + + process_record_user_fun = [=](uint16_t keycode, keyrecord_t* record) { + process_record_user_was_called_ = true; + switch (keycode) { + case QK_USER_0: + if (record->event.pressed) { + SEND_STRING("foo"); + } + break; + } + return true; + }; + + // Allow any number of empty reports. + EXPECT_EMPTY_REPORT(driver).Times(AnyNumber()); + ExpectString(driver, "foofoo"); + + process_record_user_was_called_ = false; + tap_key(key_foo); + + EXPECT_TRUE(process_record_user_was_called_); + EXPECT_KEYCODE_EQ(get_last_keycode(), QK_USER_0); + EXPECT_KEYCODE_EQ(get_alt_repeat_key_keycode(), KC_NO); + + process_record_user_was_called_ = false; + key_alt_repeat.press(); // Press Alternate Repeat. + run_one_scan_loop(); + + EXPECT_FALSE(process_record_user_was_called_); + + process_record_user_was_called_ = false; + key_alt_repeat.release(); // Release Alternate Repeat. + run_one_scan_loop(); + + EXPECT_FALSE(process_record_user_was_called_); + + process_record_user_was_called_ = false; + tap_key(key_foo); + + EXPECT_TRUE(process_record_user_was_called_); + + testing::Mock::VerifyAndClearExpectations(&driver); +} + +// Tests a macro with custom alternate behavior. +TEST_F(AltRepeatKey, MacroCustomAlternate) { + TestDriver driver; + KeymapKey key_foo(0, 0, 0, QK_USER_0); + KeymapKey key_alt_repeat(0, 1, 0, QK_AREP); + set_keymap({key_foo, key_alt_repeat}); + + get_alt_repeat_key_keycode_user_fun = [](uint16_t keycode, uint8_t mods) -> uint16_t { + switch (keycode) { + case QK_USER_0: + return QK_USER_0; // QK_USER_0 handles its own alternate. + default: + return KC_NO; // No key by default. + } + }; + process_record_user_fun = [=](uint16_t keycode, keyrecord_t* record) { + process_record_user_was_called_ = true; + switch (keycode) { + case QK_USER_0: + if (record->event.pressed) { + if (get_repeat_key_count() >= 0) { + SEND_STRING("foo"); + } else { // Key is being alternate repeated. + SEND_STRING("bar"); + } + } + break; + } + return true; + }; + + // Allow any number of empty reports. + EXPECT_EMPTY_REPORT(driver).Times(AnyNumber()); + ExpectString(driver, "foobarbar"); + + tap_keys(key_foo, key_alt_repeat, key_alt_repeat); + + testing::Mock::VerifyAndClearExpectations(&driver); +} + +// Tests the Additional "Alternate" keys example from the documentation page. +TEST_F(AltRepeatKey, AdditionalAlternateKeysExample) { + TestDriver driver; + KeymapKey key_a(0, 0, 0, KC_A); + KeymapKey key_w(0, 1, 0, KC_W); + KeymapKey key_altrep2(0, 2, 0, QK_USER_0); + KeymapKey key_altrep3(0, 3, 0, QK_USER_1); + set_keymap({key_a, key_w, key_altrep2, key_altrep3}); + + remember_last_key_user_fun = [](uint16_t keycode, keyrecord_t* record, uint8_t* remembered_mods) { + switch (keycode) { + case QK_USER_0: + case QK_USER_1: + return false; // Ignore ALTREP keys. + } + return true; // Other keys can be repeated. + }; + process_record_user_fun = [=](uint16_t keycode, keyrecord_t* record) { + switch (keycode) { + case QK_USER_0: + if (record->event.pressed) { + const uint16_t last_key = get_last_keycode(); + switch (last_key) { + case KC_A: + SEND_STRING(/*a*/ "tion"); + break; + case KC_W: + SEND_STRING(/*w*/ "hich"); + break; + } + } + return false; + case QK_USER_1: + if (record->event.pressed) { + const uint16_t last_key = get_last_keycode(); + switch (last_key) { + case KC_A: + SEND_STRING(/*a*/ "bout"); + break; + case KC_W: + SEND_STRING(/*w*/ "ould"); + break; + } + } + return false; + } + return true; + }; + + // Allow any number of empty reports. + EXPECT_EMPTY_REPORT(driver).Times(AnyNumber()); + ExpectString(driver, "ationwhichaboutwould"); + + tap_keys(key_a, key_altrep2, key_w, key_altrep2); + tap_keys(key_a, key_altrep3, key_w, key_altrep3); + + testing::Mock::VerifyAndClearExpectations(&driver); +} + +} // namespace diff --git a/tests/repeat_key/config.h b/tests/repeat_key/config.h new file mode 100644 index 0000000000..003d980c82 --- /dev/null +++ b/tests/repeat_key/config.h @@ -0,0 +1,20 @@ +// Copyright 2023 Google LLC +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +#pragma once + +#include "test_common.h" + +#define NO_ALT_REPEAT_KEY diff --git a/tests/repeat_key/repeat_key_combo/config.h b/tests/repeat_key/repeat_key_combo/config.h new file mode 100644 index 0000000000..d0c4ddadbd --- /dev/null +++ b/tests/repeat_key/repeat_key_combo/config.h @@ -0,0 +1,18 @@ +// Copyright 2023 Google LLC +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +#pragma once + +#include "test_common.h" diff --git a/tests/repeat_key/repeat_key_combo/test.mk b/tests/repeat_key/repeat_key_combo/test.mk new file mode 100644 index 0000000000..db6ea7789a --- /dev/null +++ b/tests/repeat_key/repeat_key_combo/test.mk @@ -0,0 +1,18 @@ +# Copyright 2023 Google LLC +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +REPEAT_KEY_ENABLE = yes + +COMBO_ENABLE = yes diff --git a/tests/repeat_key/repeat_key_combo/test_repeat_key_combo.cpp b/tests/repeat_key/repeat_key_combo/test_repeat_key_combo.cpp new file mode 100644 index 0000000000..2d2fbaa966 --- /dev/null +++ b/tests/repeat_key/repeat_key_combo/test_repeat_key_combo.cpp @@ -0,0 +1,67 @@ +// Copyright 2023 Google LLC +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +#include "keyboard_report_util.hpp" +#include "keycode.h" +#include "test_common.hpp" +#include "test_fixture.hpp" +#include "test_keymap_key.hpp" + +using ::testing::AnyNumber; +using ::testing::InSequence; + +namespace { + +extern "C" { +// Define a combo: KC_X + KC_Y = KC_Q. +const uint16_t xy_combo[] PROGMEM = {KC_X, KC_Y, COMBO_END}; +combo_t key_combos[] = {COMBO(xy_combo, KC_Q)}; +uint16_t COMBO_LEN = sizeof(key_combos) / sizeof(*key_combos); +} // extern "C" + +class RepeatKey : public TestFixture {}; + +// Tests repeating a combo, KC_X + KC_Y = KC_Q, by typing +// "X, Repeat, Repeat, {X Y}, Repeat, Repeat". This produces "xxxqqq". +TEST_F(RepeatKey, Combo) { + TestDriver driver; + KeymapKey key_x(0, 0, 0, KC_X); + KeymapKey key_y(0, 1, 0, KC_Y); + KeymapKey key_repeat(0, 2, 0, QK_REP); + set_keymap({key_x, key_y, key_repeat}); + + // Allow any number of empty reports. + EXPECT_EMPTY_REPORT(driver).Times(AnyNumber()); + { + InSequence seq; + EXPECT_REPORT(driver, (KC_X)); + EXPECT_REPORT(driver, (KC_X)); + EXPECT_REPORT(driver, (KC_X)); + EXPECT_REPORT(driver, (KC_Q)); + EXPECT_REPORT(driver, (KC_Q)); + EXPECT_REPORT(driver, (KC_Q)); + } + + tap_keys(key_x, key_repeat, key_repeat); + tap_combo({key_x, key_y}); + + EXPECT_KEYCODE_EQ(get_last_keycode(), KC_Q); + + tap_keys(key_repeat, key_repeat); + + testing::Mock::VerifyAndClearExpectations(&driver); +} + +} // namespace diff --git a/tests/repeat_key/test.mk b/tests/repeat_key/test.mk new file mode 100644 index 0000000000..aec8ff3bfb --- /dev/null +++ b/tests/repeat_key/test.mk @@ -0,0 +1,18 @@ +# Copyright 2023 Google LLC +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +REPEAT_KEY_ENABLE = yes + +AUTO_SHIFT_ENABLE = yes diff --git a/tests/repeat_key/test_repeat_key.cpp b/tests/repeat_key/test_repeat_key.cpp new file mode 100644 index 0000000000..eee44fc104 --- /dev/null +++ b/tests/repeat_key/test_repeat_key.cpp @@ -0,0 +1,754 @@ +// Copyright 2023 Google LLC +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +#include + +#include "keyboard_report_util.hpp" +#include "keycode.h" +#include "test_common.hpp" +#include "test_fixture.hpp" +#include "test_keymap_key.hpp" + +using ::testing::AnyNumber; +using ::testing::AnyOf; +using ::testing::InSequence; + +#define FOO_MACRO SAFE_RANGE + +namespace { + +bool process_record_user_default(uint16_t keycode, keyrecord_t* record) { + return true; +} + +bool remember_last_key_user_default(uint16_t keycode, keyrecord_t* record, uint8_t* remembered_mods) { + return true; +} + +// Indirection so that process_record_user() and remember_last_key_user() +// can be replaced with other functions in the test cases below. +std::function process_record_user_fun = process_record_user_default; +std::function remember_last_key_user_fun = remember_last_key_user_default; + +extern "C" bool process_record_user(uint16_t keycode, keyrecord_t* record) { + return process_record_user_fun(keycode, record); +} +extern "C" bool remember_last_key_user(uint16_t keycode, keyrecord_t* record, uint8_t* remembered_mods) { + return remember_last_key_user_fun(keycode, record, remembered_mods); +} + +class RepeatKey : public TestFixture { + public: + bool process_record_user_was_called_; + + void SetUp() override { + autoshift_disable(); + process_record_user_fun = process_record_user_default; + remember_last_key_user_fun = remember_last_key_user_default; + } + + void ExpectProcessRecordUserCalledWith(bool expected_press, uint16_t expected_keycode, int8_t expected_repeat_key_count) { + process_record_user_was_called_ = false; + process_record_user_fun = [=](uint16_t keycode, keyrecord_t* record) { + EXPECT_EQ(record->event.pressed, expected_press); + EXPECT_KEYCODE_EQ(keycode, expected_keycode); + EXPECT_EQ(get_repeat_key_count(), expected_repeat_key_count); + // Tests below use this to verify process_record_user() was called. + process_record_user_was_called_ = true; + return true; + }; + } + + // Expects that the characters of `s` are sent. + // NOTE: This implementation is limited to chars a-z, A-Z. + void ExpectString(TestDriver& driver, const std::string& s) { + InSequence seq; + for (int c : s) { + switch (c) { + case 'a' ... 'z': { // Lowercase letter. + uint16_t keycode = c - ('a' - KC_A); + EXPECT_REPORT(driver, (keycode)); + } break; + + case 'A' ... 'Z': { // Capital letter = KC_LSFT + letter key. + uint16_t keycode = c - ('A' - KC_A); + EXPECT_REPORT(driver, (KC_LSFT, keycode)); + } break; + } + } + } +}; + +// Tests that "A, Repeat, Repeat, B, Repeat" produces "aaabb". +TEST_F(RepeatKey, Basic) { + TestDriver driver; + KeymapKey key_a(0, 0, 0, KC_A); + KeymapKey key_b(0, 1, 0, KC_B); + KeymapKey key_repeat(0, 2, 0, QK_REP); + set_keymap({key_a, key_b, key_repeat}); + + // Allow any number of empty reports. + EXPECT_EMPTY_REPORT(driver).Times(AnyNumber()); + ExpectString(driver, "aaabb"); + + // When KC_A is pressed, process_record_user() should be called + // with a press event with keycode == KC_A and repeat_key_count() == 0. + ExpectProcessRecordUserCalledWith(true, KC_A, 0); + key_a.press(); + run_one_scan_loop(); + EXPECT_TRUE(process_record_user_was_called_); + + // After pressing A, the keycode of the key to be repeated is KC_A. + EXPECT_KEYCODE_EQ(get_last_keycode(), KC_A); + EXPECT_EQ(get_last_mods(), 0); + + // Expect the corresponding release event when A is released. + ExpectProcessRecordUserCalledWith(false, KC_A, 0); + key_a.release(); + run_one_scan_loop(); + + for (int n = 1; n <= 2; ++n) { // Tap the Repeat Key twice. + // When Repeat is pressed, process_record_user() should be called with a + // press event with keycode == KC_A and repeat_key_count() == n. + ExpectProcessRecordUserCalledWith(true, KC_A, n); + key_repeat.press(); // Press the Repeat Key. + run_one_scan_loop(); + EXPECT_TRUE(process_record_user_was_called_); + + // Expect the corresponding release event. + ExpectProcessRecordUserCalledWith(false, KC_A, n); + key_repeat.release(); // Release the Repeat Key. + run_one_scan_loop(); + EXPECT_TRUE(process_record_user_was_called_); + } + + process_record_user_fun = process_record_user_default; + tap_key(key_b); + // Then after tapping key_b, the keycode to be repeated becomes KC_B. + EXPECT_KEYCODE_EQ(get_last_keycode(), KC_B); + + tap_key(key_repeat); + + testing::Mock::VerifyAndClearExpectations(&driver); +} + +// Tests repeating a macro. The keycode FOO_MACRO sends "foo" when pressed. The +// test taps "FOO_MACRO, Repeat, Repeat", producing "foofoofoo". +TEST_F(RepeatKey, Macro) { + TestDriver driver; + KeymapKey key_foo(0, 0, 0, FOO_MACRO); + KeymapKey key_repeat(0, 1, 0, QK_REP); + set_keymap({key_foo, key_repeat}); + + // Define process_record_user() to handle FOO_MACRO. + process_record_user_fun = [](uint16_t keycode, keyrecord_t* record) { + switch (keycode) { + case FOO_MACRO: + if (record->event.pressed) { + SEND_STRING("foo"); + } + break; + } + return true; + }; + + // Allow any number of empty reports. + EXPECT_EMPTY_REPORT(driver).Times(AnyNumber()); + ExpectString(driver, "foofoofoo"); + + tap_key(key_foo); + + EXPECT_KEYCODE_EQ(get_last_keycode(), FOO_MACRO); + + tap_keys(key_repeat, key_repeat); + + testing::Mock::VerifyAndClearExpectations(&driver); +} + +// Tests a macro with customized repeat behavior: "foo" is sent normally, "bar" +// on the first repeat, and "baz" on subsequent repeats. The test taps +// "FOO_MACRO, Repeat, Repeat, FOO_MACRO, Repeat", producing "foobarbazfoobar". +TEST_F(RepeatKey, MacroCustomRepeat) { + TestDriver driver; + KeymapKey key_foo(0, 0, 0, FOO_MACRO); + KeymapKey key_repeat(0, 1, 0, QK_REP); + set_keymap({key_foo, key_repeat}); + + process_record_user_fun = [](uint16_t keycode, keyrecord_t* record) { + switch (keycode) { + case FOO_MACRO: + if (record->event.pressed) { + switch (get_repeat_key_count()) { + case 0: // When pressed normally. + SEND_STRING("foo"); + break; + case 1: // On first repeat. + SEND_STRING("bar"); + break; + default: // On subsequent repeats. + SEND_STRING("baz"); + break; + } + } + break; + } + return true; + }; + + // Allow any number of empty reports. + EXPECT_EMPTY_REPORT(driver).Times(AnyNumber()); + ExpectString(driver, "foobarbazfoobar"); + + tap_key(key_foo); + + EXPECT_KEYCODE_EQ(get_last_keycode(), FOO_MACRO); + + tap_keys(key_repeat, key_repeat, key_foo, key_repeat); + + testing::Mock::VerifyAndClearExpectations(&driver); +} + +// Tests repeating keys on different layers. A 2-layer keymap is defined: +// Layer 0: QK_REP , MO(1) , KC_A +// Layer 1: KC_TRNS, KC_TRNS, KC_B +// The test does the following, which should produce "bbbaaa": +// 1. Hold MO(1), switching to layer 1. +// 2. Tap KC_B on layer 1. +// 3. Release MO(1), switching back to layer 0. +// 4. Tap Repeat twice. +// 5. Tap KC_A on layer 0. +// 6. Hold MO(1), switching to layer 1. +// 7. Tap Repeat twice. +TEST_F(RepeatKey, AcrossLayers) { + TestDriver driver; + KeymapKey key_repeat(0, 0, 0, QK_REP); + KeymapKey key_mo_1(0, 1, 0, MO(1)); + KeymapKey regular_key(0, 2, 0, KC_A); + set_keymap({// Layer 0. + key_repeat, key_mo_1, regular_key, + // Layer 1. + KeymapKey{1, 0, 0, KC_TRNS}, KeymapKey{1, 1, 0, KC_TRNS}, KeymapKey{1, 2, 0, KC_B}}); + + // Allow any number of empty reports. + EXPECT_EMPTY_REPORT(driver).Times(AnyNumber()); + ExpectString(driver, "bbbaaa"); + + key_mo_1.press(); // Hold the MO(1) layer key. + run_one_scan_loop(); + tap_key(regular_key); // Taps the KC_B key on layer 1. + + EXPECT_KEYCODE_EQ(get_last_keycode(), KC_B); + + key_mo_1.release(); // Release the layer key. + run_one_scan_loop(); + tap_keys(key_repeat, key_repeat); + tap_key(regular_key); // Taps the KC_A key on layer 0. + + EXPECT_KEYCODE_EQ(get_last_keycode(), KC_A); + + key_mo_1.press(); // Hold the layer key. + run_one_scan_loop(); + tap_keys(key_repeat, key_repeat); + + testing::Mock::VerifyAndClearExpectations(&driver); +} + +// Tests "A(down), Repeat(down), A(up), Repeat(up), Repeat" produces "aaa". +TEST_F(RepeatKey, RollingToRepeat) { + TestDriver driver; + KeymapKey key_a(0, 0, 0, KC_A); + KeymapKey key_repeat(0, 1, 0, QK_REP); + set_keymap({key_a, key_repeat}); + + { + InSequence seq; + EXPECT_REPORT(driver, (KC_A)); + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_A)); + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_A)); + EXPECT_EMPTY_REPORT(driver); + } + + // Perform a rolled press from A to Repeat. + + ExpectProcessRecordUserCalledWith(true, KC_A, 0); + key_a.press(); + run_one_scan_loop(); + EXPECT_TRUE(process_record_user_was_called_); + + ExpectProcessRecordUserCalledWith(true, KC_A, 1); + key_repeat.press(); // Press the Repeat Key. + run_one_scan_loop(); + EXPECT_TRUE(process_record_user_was_called_); + + ExpectProcessRecordUserCalledWith(false, KC_A, 0); + key_a.release(); + run_one_scan_loop(); + EXPECT_TRUE(process_record_user_was_called_); + + ExpectProcessRecordUserCalledWith(false, KC_A, 1); + key_repeat.release(); // Release the Repeat Key. + run_one_scan_loop(); + EXPECT_TRUE(process_record_user_was_called_); + + process_record_user_fun = process_record_user_default; + tap_key(key_repeat); + + testing::Mock::VerifyAndClearExpectations(&driver); +} + +// Tests "A, Repeat(down), B(down), Repeat(up), B(up), Repeat" produces "aabb". +TEST_F(RepeatKey, RollingFromRepeat) { + TestDriver driver; + KeymapKey key_a(0, 0, 0, KC_A); + KeymapKey key_b(0, 1, 0, KC_B); + KeymapKey key_repeat(0, 2, 0, QK_REP); + set_keymap({key_a, key_b, key_repeat}); + + { + InSequence seq; + EXPECT_REPORT(driver, (KC_A)); + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_A)); + EXPECT_REPORT(driver, (KC_A, KC_B)); + EXPECT_REPORT(driver, (KC_B)); + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_B)); + EXPECT_EMPTY_REPORT(driver); + } + + tap_key(key_a); + + // Perform a rolled press from Repeat to B. + + ExpectProcessRecordUserCalledWith(true, KC_A, 1); + key_repeat.press(); // Press the Repeat Key. + run_one_scan_loop(); + EXPECT_TRUE(process_record_user_was_called_); + + ExpectProcessRecordUserCalledWith(true, KC_B, 0); + key_b.press(); + run_one_scan_loop(); + EXPECT_TRUE(process_record_user_was_called_); + + EXPECT_KEYCODE_EQ(get_last_keycode(), KC_B); + + ExpectProcessRecordUserCalledWith(false, KC_A, 1); + key_repeat.release(); // Release the Repeat Key. + run_one_scan_loop(); + EXPECT_TRUE(process_record_user_was_called_); + + ExpectProcessRecordUserCalledWith(false, KC_B, 0); + key_b.release(); + run_one_scan_loop(); + EXPECT_TRUE(process_record_user_was_called_); + + process_record_user_fun = process_record_user_default; + tap_key(key_repeat); + + testing::Mock::VerifyAndClearExpectations(&driver); +} + +// Tests Repeat Key with a modifier, types "AltGr+C, Repeat, Repeat, C". +TEST_F(RepeatKey, RecallMods) { + TestDriver driver; + KeymapKey key_c(0, 0, 0, KC_C); + KeymapKey key_altgr(0, 1, 0, KC_RALT); + KeymapKey key_repeat(0, 2, 0, QK_REP); + set_keymap({key_c, key_altgr, key_repeat}); + + // Allow any number of reports with no keys or only KC_RALT. + // clang-format off + EXPECT_CALL(driver, send_keyboard_mock(AnyOf( + KeyboardReport(), + KeyboardReport(KC_RALT)))) + .Times(AnyNumber()); + // clang-format on + + { // Expect: "AltGr+C, AltGr+C, AltGr+C, C". + InSequence seq; + EXPECT_REPORT(driver, (KC_RALT, KC_C)); + EXPECT_REPORT(driver, (KC_RALT, KC_C)); + EXPECT_REPORT(driver, (KC_RALT, KC_C)); + EXPECT_REPORT(driver, (KC_C)); + } + + key_altgr.press(); + run_one_scan_loop(); + tap_key(key_c); + key_altgr.release(); + run_one_scan_loop(); + + EXPECT_KEYCODE_EQ(get_last_keycode(), KC_C); + EXPECT_EQ(get_last_mods(), MOD_BIT(KC_RALT)); + + tap_keys(key_repeat, key_repeat, key_c); + + testing::Mock::VerifyAndClearExpectations(&driver); +} + +// Tests that Repeat Key stacks mods, types +// "Ctrl+Left, Repeat, Shift+Repeat, Shift+Repeat, Repeat, Left". +TEST_F(RepeatKey, StackMods) { + TestDriver driver; + KeymapKey key_left(0, 0, 0, KC_LEFT); + KeymapKey key_shift(0, 1, 0, KC_LSFT); + KeymapKey key_ctrl(0, 2, 0, KC_LCTL); + KeymapKey key_repeat(0, 3, 0, QK_REP); + set_keymap({key_left, key_shift, key_ctrl, key_repeat}); + + // Allow any number of reports with no keys or only mods. + // clang-format off + EXPECT_CALL(driver, send_keyboard_mock(AnyOf( + KeyboardReport(), + KeyboardReport(KC_LCTL), + KeyboardReport(KC_LSFT), + KeyboardReport(KC_LCTL, KC_LSFT)))) + .Times(AnyNumber()); + // clang-format on + + { // Expect: "Ctrl+Left, Ctrl+Shift+Left". + InSequence seq; + EXPECT_REPORT(driver, (KC_LCTL, KC_LEFT)); + EXPECT_REPORT(driver, (KC_LCTL, KC_LEFT)); + EXPECT_REPORT(driver, (KC_LCTL, KC_LSFT, KC_LEFT)); + EXPECT_REPORT(driver, (KC_LCTL, KC_LSFT, KC_LEFT)); + EXPECT_REPORT(driver, (KC_LCTL, KC_LEFT)); + EXPECT_REPORT(driver, (KC_LEFT)); + } + + key_ctrl.press(); + run_one_scan_loop(); + tap_key(key_left); + run_one_scan_loop(); + key_ctrl.release(); + run_one_scan_loop(); + + EXPECT_KEYCODE_EQ(get_last_keycode(), KC_LEFT); + EXPECT_EQ(get_last_mods(), MOD_BIT(KC_LCTL)); + + tap_key(key_repeat); + + key_shift.press(); + run_one_scan_loop(); + tap_keys(key_repeat, key_repeat); + key_shift.release(); + run_one_scan_loop(); + + EXPECT_EQ(get_last_mods(), MOD_BIT(KC_LCTL)); + + tap_keys(key_repeat, key_left); + + testing::Mock::VerifyAndClearExpectations(&driver); +} + +// Types: "S(KC_1), Repeat, Ctrl+Repeat, Ctrl+Repeat, Repeat, KC_2". +TEST_F(RepeatKey, ShiftedKeycode) { + TestDriver driver; + KeymapKey key_exlm(0, 0, 0, S(KC_1)); + KeymapKey key_2(0, 1, 0, KC_2); + KeymapKey key_ctrl(0, 2, 0, KC_LCTL); + KeymapKey key_repeat(0, 3, 0, QK_REP); + set_keymap({key_exlm, key_2, key_ctrl, key_repeat}); + + // Allow any number of reports with no keys or only mods. + // clang-format off + EXPECT_CALL(driver, send_keyboard_mock(AnyOf( + KeyboardReport(), + KeyboardReport(KC_LCTL), + KeyboardReport(KC_LSFT), + KeyboardReport(KC_LCTL, KC_LSFT)))) + .Times(AnyNumber()); + // clang-format on + + { // Expect: "Shift+1, Shift+1, Ctrl+Shift+1, Ctrl+Shift+1, Shift+1, 2". + InSequence seq; + EXPECT_REPORT(driver, (KC_LSFT, KC_1)); + EXPECT_REPORT(driver, (KC_LSFT, KC_1)); + EXPECT_REPORT(driver, (KC_LCTL, KC_LSFT, KC_1)); + EXPECT_REPORT(driver, (KC_LCTL, KC_LSFT, KC_1)); + EXPECT_REPORT(driver, (KC_LSFT, KC_1)); + EXPECT_REPORT(driver, (KC_2)); + } + + tap_key(key_exlm); + + EXPECT_KEYCODE_EQ(get_last_keycode(), S(KC_1)); + + tap_key(key_repeat); + + key_ctrl.press(); + run_one_scan_loop(); + tap_keys(key_repeat, key_repeat); + key_ctrl.release(); + run_one_scan_loop(); + + tap_keys(key_repeat, key_2); + + testing::Mock::VerifyAndClearExpectations(&driver); +} + +// Tests Repeat Key with a one-shot Shift, types +// "A, OSM(MOD_LSFT), Repeat, Repeat". +TEST_F(RepeatKey, WithOneShotShift) { + TestDriver driver; + KeymapKey key_a(0, 0, 0, KC_A); + KeymapKey key_oneshot_shift(0, 1, 0, OSM(MOD_LSFT)); + KeymapKey key_repeat(0, 2, 0, QK_REP); + set_keymap({key_a, key_oneshot_shift, key_repeat}); + + // Allow any number of reports with no keys or only KC_RALT. + // clang-format off + EXPECT_CALL(driver, send_keyboard_mock(AnyOf( + KeyboardReport(), + KeyboardReport(KC_LSFT)))) + .Times(AnyNumber()); + // clang-format on + ExpectString(driver, "aAa"); + + tap_keys(key_a, key_oneshot_shift, key_repeat, key_repeat); + + testing::Mock::VerifyAndClearExpectations(&driver); +} + +// Tests Repeat Key with a mod-tap key, types +// "A, Repeat, Repeat, A(down), Repeat, Repeat, A(up), Repeat". +TEST_F(RepeatKey, ModTap) { + TestDriver driver; + KeymapKey key_mt_a(0, 0, 0, LSFT_T(KC_A)); + KeymapKey key_repeat(0, 1, 0, QK_REP); + set_keymap({key_mt_a, key_repeat}); + + // Allow any number of reports with no keys or only KC_LSFT. + // clang-format off + EXPECT_CALL(driver, send_keyboard_mock(AnyOf( + KeyboardReport(), + KeyboardReport(KC_LSFT)))) + .Times(AnyNumber()); + // clang-format on + ExpectString(driver, "aaaAAa"); + + tap_key(key_mt_a); + + EXPECT_KEYCODE_EQ(get_last_keycode(), LSFT_T(KC_A)); + + tap_keys(key_repeat, key_repeat); + key_mt_a.press(); + run_one_scan_loop(); + tap_key(key_repeat, TAPPING_TERM + 1); + tap_key(key_repeat); + key_mt_a.release(); + run_one_scan_loop(); + tap_key(key_repeat); + + testing::Mock::VerifyAndClearExpectations(&driver); +} + +// Tests with Auto Shift. When repeating an autoshiftable key, it does not +// matter how long the original key was held, rather, quickly tapping vs. +// long-pressing the Repeat Key determines whether the shifted key is repeated. +// +// The test does the following, which should produce "aaABbB": +// 1. Tap KC_A quickly. +// 2. Tap Repeat Key quickly. +// 3. Long-press Repeat Key. +// 4. Long-press KC_B. +// 5. Tap Repeat Key quickly. +// 6. Long-press Repeat Key. +TEST_F(RepeatKey, AutoShift) { + TestDriver driver; + KeymapKey key_a(0, 0, 0, KC_A); + KeymapKey key_b(0, 1, 0, KC_B); + KeymapKey key_repeat(0, 2, 0, QK_REP); + set_keymap({key_a, key_b, key_repeat}); + + autoshift_enable(); + + // Allow any number of reports with no keys or only KC_LSFT. + // clang-format off + EXPECT_CALL(driver, send_keyboard_mock(AnyOf( + KeyboardReport(), + KeyboardReport(KC_LSFT)))) + .Times(AnyNumber()); + // clang-format on + ExpectString(driver, "aaABbB"); + + tap_key(key_a); // Tap A quickly. + + EXPECT_KEYCODE_EQ(get_last_keycode(), KC_A); + EXPECT_EQ(get_last_mods(), 0); + + tap_key(key_repeat); + tap_key(key_repeat, AUTO_SHIFT_TIMEOUT + 1); + + tap_key(key_b, AUTO_SHIFT_TIMEOUT + 1); // Long press B. + + EXPECT_KEYCODE_EQ(get_last_keycode(), KC_B); + EXPECT_EQ(get_last_mods(), 0); + + tap_key(key_repeat); + tap_key(key_repeat, AUTO_SHIFT_TIMEOUT + 1); + + testing::Mock::VerifyAndClearExpectations(&driver); +} + +// Defines `remember_last_key_user()` to forget the Shift mod and types: +// "Ctrl+A, Repeat, Shift+A, Repeat, Shift+Repeat". +TEST_F(RepeatKey, FilterRememberedMods) { + TestDriver driver; + KeymapKey key_a(0, 0, 0, KC_A); + KeymapKey key_ctrl(0, 1, 0, KC_LCTL); + KeymapKey key_shift(0, 2, 0, KC_LSFT); + KeymapKey key_repeat(0, 3, 0, QK_REP); + set_keymap({key_a, key_ctrl, key_shift, key_repeat}); + + remember_last_key_user_fun = [](uint16_t keycode, keyrecord_t* record, uint8_t* remembered_mods) { + *remembered_mods &= ~MOD_MASK_SHIFT; + return true; + }; + + // Allow any number of reports with no keys or only mods. + // clang-format off + EXPECT_CALL(driver, send_keyboard_mock(AnyOf( + KeyboardReport(), + KeyboardReport(KC_LCTL), + KeyboardReport(KC_LSFT), + KeyboardReport(KC_LCTL, KC_LSFT)))) + .Times(AnyNumber()); + // clang-format on + + { // Expect: "Ctrl+A, Ctrl+A, Shift+A, A, Shift+A". + InSequence seq; + EXPECT_REPORT(driver, (KC_LCTL, KC_A)); + EXPECT_REPORT(driver, (KC_LCTL, KC_A)); + EXPECT_REPORT(driver, (KC_LSFT, KC_A)); + EXPECT_REPORT(driver, (KC_A)); + EXPECT_REPORT(driver, (KC_LSFT, KC_A)); + } + + key_ctrl.press(); + run_one_scan_loop(); + tap_key(key_a); + + EXPECT_EQ(get_last_mods(), MOD_BIT(KC_LCTL)); + + key_ctrl.release(); + run_one_scan_loop(); + + tap_key(key_repeat); + key_shift.press(); + run_one_scan_loop(); + tap_key(key_a); + + EXPECT_EQ(get_last_mods(), 0); // Shift should be forgotten. + + key_shift.release(); + run_one_scan_loop(); + + tap_key(key_repeat); + + key_shift.press(); + run_one_scan_loop(); + tap_key(key_repeat); + key_shift.release(); + run_one_scan_loop(); + + testing::Mock::VerifyAndClearExpectations(&driver); +} + +// Tests set_last_keycode() and set_last_mods(). +TEST_F(RepeatKey, SetRepeatKeyKeycode) { + TestDriver driver; + KeymapKey key_repeat(0, 0, 0, QK_REP); + set_keymap({key_repeat}); + + // Allow any number of reports with no keys or only KC_LSFT. + // clang-format off + EXPECT_CALL(driver, send_keyboard_mock(AnyOf( + KeyboardReport(), + KeyboardReport(KC_LSFT)))) + .Times(AnyNumber()); + // clang-format on + ExpectString(driver, "aaBB"); + + set_last_keycode(KC_A); + EXPECT_KEYCODE_EQ(get_last_keycode(), KC_A); + + for (int n = 1; n <= 2; ++n) { // Tap the Repeat Key twice. + // When Repeat is pressed, process_record_user() should be called with a + // press event with keycode == KC_A and repeat_key_count() == n. + ExpectProcessRecordUserCalledWith(true, KC_A, n); + key_repeat.press(); // Press the Repeat Key. + run_one_scan_loop(); + EXPECT_TRUE(process_record_user_was_called_); + + // Expect the corresponding release event. + ExpectProcessRecordUserCalledWith(false, KC_A, n); + key_repeat.release(); // Release the Repeat Key. + run_one_scan_loop(); + EXPECT_TRUE(process_record_user_was_called_); + } + + process_record_user_fun = process_record_user_default; + set_last_keycode(KC_B); + set_last_mods(MOD_BIT(KC_LSFT)); + + tap_keys(key_repeat, key_repeat); + + set_last_keycode(KC_NO); + tap_keys(key_repeat, key_repeat); // Has no effect. + + testing::Mock::VerifyAndClearExpectations(&driver); +} + +// Tests the `repeat_key_invoke()` function. +TEST_F(RepeatKey, RepeatKeyInvoke) { + TestDriver driver; + KeymapKey key_s(0, 0, 0, KC_S); + set_keymap({key_s}); + + // Allow any number of empty reports. + EXPECT_EMPTY_REPORT(driver).Times(AnyNumber()); + ExpectString(driver, "ss"); + + tap_key(key_s); + + EXPECT_KEYCODE_EQ(get_last_keycode(), KC_S); + + // Calling repeat_key_invoke() should result in process_record_user() + // getting a press event with keycode KC_S. + ExpectProcessRecordUserCalledWith(true, KC_S, 1); + keyevent_t event; + event.key = {0, 0}; + event.pressed = true; + event.time = timer_read(); + event.type = KEY_EVENT; + repeat_key_invoke(&event); + run_one_scan_loop(); + EXPECT_TRUE(process_record_user_was_called_); + + // Make the release event. + ExpectProcessRecordUserCalledWith(false, KC_S, 1); + event.pressed = false; + event.time = timer_read(); + repeat_key_invoke(&event); + run_one_scan_loop(); + EXPECT_TRUE(process_record_user_was_called_); + + testing::Mock::VerifyAndClearExpectations(&driver); +} + +} // namespace diff --git a/tests/test_common/keycode_table.cpp b/tests/test_common/keycode_table.cpp index d21630c01b..9ed80cdbcf 100644 --- a/tests/test_common/keycode_table.cpp +++ b/tests/test_common/keycode_table.cpp @@ -663,6 +663,8 @@ std::map KEYCODE_ID_TABLE = { {QK_AUTOCORRECT_TOGGLE, "QK_AUTOCORRECT_TOGGLE"}, {QK_TRI_LAYER_LOWER, "QK_TRI_LAYER_LOWER"}, {QK_TRI_LAYER_UPPER, "QK_TRI_LAYER_UPPER"}, + {QK_REPEAT_KEY, "QK_REPEAT_KEY"}, + {QK_ALT_REPEAT_KEY, "QK_ALT_REPEAT_KEY"}, {QK_KB_0, "QK_KB_0"}, {QK_KB_1, "QK_KB_1"}, {QK_KB_2, "QK_KB_2"}, diff --git a/tests/test_common/test_driver.hpp b/tests/test_common/test_driver.hpp index 8d09e44840..d8a6885d0f 100644 --- a/tests/test_common/test_driver.hpp +++ b/tests/test_common/test_driver.hpp @@ -20,6 +20,7 @@ #include #include "host.h" #include "keyboard_report_util.hpp" +#include "keycode_util.hpp" #include "test_logger.hpp" class TestDriver { @@ -98,6 +99,17 @@ class TestDriver { */ #define EXPECT_NO_REPORT(driver) EXPECT_ANY_REPORT(driver).Times(0) +/** @brief Tests whether keycode `actual` is equal to `expected`. */ +#define EXPECT_KEYCODE_EQ(actual, expected) EXPECT_THAT((actual), KeycodeEq((expected))) + +MATCHER_P(KeycodeEq, expected_keycode, "is equal to " + testing::PrintToString(expected_keycode) + ", keycode " + get_keycode_identifier_or_default(expected_keycode)) { + if (arg == expected_keycode) { + return true; + } + *result_listener << "keycode " << get_keycode_identifier_or_default(arg); + return false; +} + /** * @brief Verify and clear all gmock expectations that have been setup until * this point. -- cgit 1.4.1