summaryrefslogtreecommitdiffstats
path: root/quantum/process_keycode
Commit message (Collapse)AuthorAgeFilesLines
* Add combo hook to allow per layer combo reference layers. (#16699)Eric.a Gebhart2023-02-131-1/+13
| | | | | Co-authored-by: Drashna Jaelre <drashna@live.com> Co-authored-by: Sergey Vlasov <sigprof@gmail.com>
* Refactor Leader key feature (#19632)Ryan2023-02-132-81/+20
| | | | Co-authored-by: Drashna Jaelre <drashna@live.com>
* [Core] Tri Layer Keys (#19795)Drashna Jaelre2023-02-122-0/+46
| | | | | | | Co-authored-by: wilba <wilba@wilba.tech> Co-authored-by: Pablo Martínez <58857054+elpekenin@users.noreply.github.com> Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: Nick Brassel <nick@tzarc.org>
* Tidy up use of keycode range helpers (#19756)Joel Challis2023-02-103-7/+7
|
* Normalise Swap Hands keycodes (#19720)Ryan2023-01-302-2/+2
|
* Fix functions with empty params (#19647)Ryan2023-01-205-9/+9
| | | | | * Fix functions with empty params * Found a bunch more
* Align definition of unicode_map (#19452)Joel Challis2023-01-011-1/+1
|
* Tap Dance: remove `qk_` prefix (#19313)Ryan2022-12-142-43/+43
|
* [Test] Reset timer for every unit test and provide timestamps for log ↵Stefan Kerkmann2022-12-152-4/+3
| | | | messages (#17028)
* Leader: remove `qk_` prefix (#19304)Ryan2022-12-142-22/+24
|
* UCIS: remove `qk_` prefix (#19302)Ryan2022-12-142-34/+34
|
* Remove IGNORE_MOD_TAP_INTERRUPT_PER_KEY in favour of ↵precondition2022-12-131-26/+15
| | | | HOLD_ON_OTHER_KEY_PRESS_PER_KEY (#15741)
* Align haptic feedback keycode names (#18964)Joel Challis2022-11-071-13/+13
|
* Normalise MIDI keycodes (#18972)Ryan2022-11-072-27/+27
| | | | | | | | | | | | | | | | | | | | | * `MI_ON`, `MI_OFF`, `MI_TOG` -> `MI_TOGG` * `MI_CH*`, `MI_CHU` -> `MI_CHNU`, `MI_CHD` -> `MI_CHND` * `MI_VEL_*` -> `MI_VL*`, `MI_VELU`, `MI_VELD` * `MI_TRNS_*` -> `MI_TR*`, `MI_TRNSU` -> `MI_TRSU`, `MI_TRNSD` -> `MI_TRSD` * `MI_OCT_*` -> `MI_OC*`, `MI_OCTU`, `MI_OCTD` * Misc controls * Note keycodes * Add legacy keycodes * Regenerate keycodes * Typo
* Fix keycode parameter extraction to match the new DD keycodes (#18977)Sergey Vlasov2022-11-065-16/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add macros to extract parameters from keycode values Implement both encoding and decoding for keycodes like TO(layer) or LM(layer, mod) in one place, so that the decoding won't get out of sync with the encoding. While at it, fix some macros for creating keycode values that did not apply the appropriate masks to parameters (and therefore could allow the result to be out of range if a wrong parameter was passed). * keymap_common: Use extraction macros for keycodes * pointing_device_auto_mouse: Use extraction macros for keycodes Fixes #18970. * process_autocorrect: Use extraction macros for keycodes * process_caps_word: Use extraction macros for keycodes (Also fix a minor bug - SH_TG was not handled properly) * process_leader: Use extraction macros for keycodes (Technically the code is not 100% correct, because it always assumes that the LT() or MT() action was a tap, but it's a separate issue that already existed before the keycode changes.) * process_unicode: Use extraction macros for keycodes * process_unicodemap: Use extraction macros for keycodes
* Reworked backlight keycodes. (#18961)Nick Brassel2022-11-061-13/+13
| | | Co-authored-by: Ryan <fauxpark@gmail.com>
* Align audio keycode names (#18962)Joel Challis2022-11-053-17/+17
| | | | | | | * Align audio keycode names * Update docs * Update quantum
* Align dynamic tapping term keycode names (#18963)Joel Challis2022-11-051-3/+3
| | | | | * Align dynamic tapping term keycode names * regen header
* Remove thermal printer. (#18959)Nick Brassel2022-11-063-560/+0
|
* Initial DD keycode migration (#18643)Joel Challis2022-11-053-143/+137
| | | | | * Initial DD keycode migration * Sort magic keycodes
* Normalise Dynamic Macro keycodes (#18939)Ryan2022-11-031-13/+13
| | | | | | | | | | | | | * `DYN_REC_START1` -> `QK_DYNAMIC_MACRO_RECORD_START_1` * `DYN_REC_START2` -> `QK_DYNAMIC_MACRO_RECORD_START_2` * `DYN_MACRO_PLAY1` -> `QK_DYNAMIC_MACRO_PLAY_1` * `DYN_MACRO_PLAY2` -> `QK_DYNAMIC_MACRO_PLAY_2` * `DYN_REC_STOP` -> `QK_DYNAMIC_MACRO_RECORD_STOP` * Update docs
* Normalise Unicode keycodes (#18898)Ryan2022-10-311-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * `UC_MOD`/`UC_RMOD` -> `UC_NEXT`/`UC_PREV` * `UNICODE_MODE_*` -> `QK_UNICODE_MODE_*` * `UC_MAC` -> `UNICODE_MODE_MACOS` * `UC_LNX` -> `UNICODE_MODE_LINUX` * `UC_WIN` -> `UNICODE_MODE_WINDOWS` * `UC_BSD` -> `UNICODE_MODE_BSD` * `UC_WINC` -> `UNICODE_MODE_WINCOMPOSE` * `UC_EMACS` -> `UNICODE_MODE_EMACS` * `UC__COUNT` -> `UNICODE_MODE_COUNT` * `UC_M_MA` -> `UC_MAC` * `UC_M_LN` -> `UC_LINX` * `UC_M_WI` -> `UC_WIN` * `UC_M_BS` -> `UC_BSD` * `UC_M_WC` -> `UC_WINC` * `UC_M_EM` -> `UC_EMAC` * Docs * Update quantum/unicode/unicode.h
* Normalise Auto Shift keycodes (#18892)Ryan2022-10-281-6/+6
| | | | | | | | * Normalise Auto Shift keycodes * Add keycode table to main list * Add old keycodes to legacy header
* Normalise Autocorrect keycodes (#18893)Ryan2022-10-281-4/+4
|
* Normalise Combo keycodes (#18877)Ryan2022-10-271-3/+3
|
* Normalise Space Cadet keycodes (#18864)Ryan2022-10-271-7/+7
|
* Deprecate `SECURE_*` keycodes for `QK_SECURE_*` (#18847)Joel Challis2022-10-251-4/+4
| | | | | | | | | | | | | * Deprecate SECURE_* keycodes for QK_SECURE_* * Update keycode process * Update process_secure.c * Apply suggestions from code review Co-authored-by: Ryan <fauxpark@gmail.com> Co-authored-by: Ryan <fauxpark@gmail.com>
* Deprecate `KEY_OVERRIDE_*` keycodes for `KO_*` (#18843)Ryan2022-10-251-3/+3
|
* Remove some assumptions on sequential keycode ranges (#18838)Joel Challis2022-10-241-2/+7
|
* added BS_TOGG so BS_SWAP and BS_NORM can be on a single key (#18837)Selene ToyKeeper2022-10-241-0/+4
| | | Co-authored-by: Selene ToyKeeper <git@toykeeper.net>
* Deprecate `CAPS_WORD`/`CAPSWRD` for `CW_TOGG` (#18834)Ryan2022-10-241-1/+1
|
* Normalise Joystick and Programmable Button keycodes (#18832)Ryan2022-10-242-5/+5
|
* Deprecate `KC_LOCK` for `QK_LOCK` (#18796)Ryan2022-10-211-4/+4
|
* Deprecate `KC_LEAD` for `QK_LEAD` (#18792)Ryan2022-10-211-1/+1
|
* Programmable Button API refactor and improve docs (#18641)Ryan2022-10-151-2/+2
|
* Use get_u16_str instead of snprintf in autoshift_timer_report (#18606)precondition2022-10-051-6/+6
|
* Fix layer switching from tap dances by redoing the keymap lookup (#17935)Sergey Vlasov2022-10-032-4/+10
|
* Prevent tap dance from wiping dynamic macros (#17880)Jason Ken Adhinarta2022-10-031-8/+14
|
* Further refactoring of joystick feature (#18437)Ryan2022-09-272-140/+33
|
* [Core] Add getreuer's Autocorrect feature to core (#15699)Drashna Jaelre2022-09-173-0/+389
| | | Co-authored-by: Albert Y <76888457+filterpaper@users.noreply.github.com>
* Refactor Unicode feature (#18333)Ryan2022-09-128-502/+42
|
* Remove `UNICODE_KEY_OSX` and `UC_OSX` (#18290)Ryan2022-09-061-9/+0
|
* Merge remote-tracking branch 'origin/master' into developQMK Bot2022-09-061-1/+1
|\
| * Remove use of legacy keycode (#18281)Joel Challis2022-09-061-1/+1
| |
* | Add unicode mode change callbacks (#18235)Joshua Diamond2022-08-312-0/+20
| |
* | Use a macro to compute the size of arrays at compile time (#18044)Jeff Epler2022-08-302-2/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add ARRAY_SIZE and CEILING utility macros * Apply a coccinelle patch to use ARRAY_SIZE * fix up some straggling items * Fix 'make test:secure' * Enhance ARRAY_SIZE macro to reject acting on pointers The previous definition would not produce a diagnostic for ``` int *p; size_t num_elem = ARRAY_SIZE(p) ``` but the new one will. * explicitly get definition of ARRAY_SIZE * Convert to ARRAY_SIZE when const is involved The following spatch finds additional instances where the array is const and the division is by the size of the type, not the size of the first element: ``` @ rule5a using "empty.iso" @ type T; const T[] E; @@ - (sizeof(E)/sizeof(T)) + ARRAY_SIZE(E) @ rule6a using "empty.iso" @ type T; const T[] E; @@ - sizeof(E)/sizeof(T) + ARRAY_SIZE(E) ``` * New instances of ARRAY_SIZE added since initial spatch run * Use `ARRAY_SIZE` in docs (found by grep) * Manually use ARRAY_SIZE hs_set is expected to be the same size as uint16_t, though it's made of two 8-bit integers * Just like char, sizeof(uint8_t) is guaranteed to be 1 This is at least true on any plausible system where qmk is actually used. Per my understanding it's universally true, assuming that uint8_t exists: https://stackoverflow.com/questions/48655310/can-i-assume-that-sizeofuint8-t-1 * Run qmk-format on core C files touched in this branch Co-authored-by: Stefan Kerkmann <karlk90@pm.me>
* Fix Caps Word to treat mod-taps more consistently. (#17463)Pascal Getreuer2022-08-141-6/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix Caps Word to treat mod-taps more consistently. Previously, holding any mod-tap key while Caps Word is active stops Caps Word, and this happens regardless of `caps_word_press_user()`. Yet for regular mod keys, AltGr (KC_RALT) is ignored, Shift keys are passed to `caps_word_press_user()` to determine whether to continue, and similarly, a key `RSFT(KC_RALT)` representing Right Shift + Alt is passed to `caps_word_press_user()` to determine whether to continue. This commit makes held mod-tap keys consistent with regular mod keys: * Holding a `RALT_T` mod-tap is ignored. * When holding a shift mod-tap key, `KC_LSFT` or `KC_RSFT` is passed to `caps_word_press_user()` to determine whether to continue. * When holding a Right Shift + Alt (`RSA_T`) mod-tap, `RSFT(KC_RALT)` is passed to `caps_word_press_user()`. Particularly, with this fix a user may choose to continue Caps Word when a shift mod-tap key is held by adding `KC_LSFT` and `KC_RSFT` cases in `caps_word_press_user()`. For instance as ``` bool caps_word_press_user(uint16_t keycode) { switch (keycode) { // Keycodes that continue Caps Word, with shift applied. case KC_A ... KC_Z: case KC_MINS: add_weak_mods(MOD_BIT(KC_LSFT)); // Apply shift to the next key. return true; // Keycodes that continue Caps Word, without shifting. case KC_1 ... KC_0: case KC_BSPC: case KC_DEL: case KC_UNDS: case KC_LSFT: // <<< Added here. case KC_RSFT: return true; default: return false; // Deactivate Caps Word. } } ``` * Fix Caps Word to treat mod-taps more consistently. Previously, holding any mod-tap key while Caps Word is active stops Caps Word, and this happens regardless of `caps_word_press_user()`. Yet for regular mod keys, AltGr (KC_RALT) is ignored, Shift keys are passed to `caps_word_press_user()` to determine whether to continue, and similarly, a key `RSFT(KC_RALT)` representing Right Shift + Alt is passed to `caps_word_press_user()` to determine whether to continue. This commit makes held mod-tap keys consistent with regular mod keys: * Holding a `RALT_T` mod-tap is ignored. * When holding a shift mod-tap key, `KC_LSFT` or `KC_RSFT` is passed to `caps_word_press_user()` to determine whether to continue. * When holding a Right Shift + Alt (`RSA_T`) mod-tap, `RSFT(KC_RALT)` is passed to `caps_word_press_user()`. Particularly, with this fix a user may choose to continue Caps Word when a shift mod-tap key is held by adding `KC_LSFT` and `KC_RSFT` cases in `caps_word_press_user()`. For instance as ``` bool caps_word_press_user(uint16_t keycode) { switch (keycode) { // Keycodes that continue Caps Word, with shift applied. case KC_A ... KC_Z: case KC_MINS: add_weak_mods(MOD_BIT(KC_LSFT)); // Apply shift to the next key. return true; // Keycodes that continue Caps Word, without shifting. case KC_1 ... KC_0: case KC_BSPC: case KC_DEL: case KC_UNDS: case KC_LSFT: // <<< Added here. case KC_RSFT: return true; default: return false; // Deactivate Caps Word. } } ``` * Update quantum/process_keycode/process_caps_word.c Co-authored-by: Joel Challis <git@zvecr.com>
* Added emacs as an "operating system" for input mode. (#16949)Chewxy2022-08-142-6/+35
|
* Fix Caps Word capitalization when used with Combos + Auto Shift. (#17549)Pascal Getreuer2022-08-133-1/+19
|
* Merge remote-tracking branch 'origin/master' into developQMK Bot2022-07-301-1/+1
|\