summaryrefslogtreecommitdiffstats
path: root/quantum/process_keycode
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
|\
| * Fix check when compiling HID Joystick with digital driver (#17844)Drashna Jaelre2022-07-301-1/+1
| |
* | Rename postprocess_steno_user → post_process_steno_user (#17823)precondition2022-07-281-3/+3
| |
* | Merge remote-tracking branch 'origin/master' into developQMK Bot2022-07-021-0/+4
|\|
| * Allow for RGB actions to take place on Keydown instead of Keyup (#16886)CoffeeIsLife2022-07-021-0/+4
| | | | | | | | | | * Allow for switch on keydown * add docs
* | Feature-ify Send String (#17275)Ryan2022-07-022-0/+4
| |
* | PoC: Swap Escape and Caps (#16336)Osamu Aoki2022-07-021-0/+10
| |
* | Fix keys being discarded after using the leader key (#17287)torkel1042022-07-021-0/+1
| |
* | Added Wait time to sending each Keys for Dynamic Macros function (#16800)FREEWING.JP2022-07-021-0/+3
| | | | | | Co-authored-by: Joel Challis <git@zvecr.com>
* | Refactor steno and add `STENO_PROTOCOL = [all|txbolt|geminipr]` (#17065)precondition2022-06-232-148/+188
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Refactor steno into STENO_ENABLE_[ALL|GEMINI|BOLT] * Update stenography documentation * STENO_ENABLE_TXBOLT → STENO_ENABLE_BOLT TXBOLT is a better name but BOLT is more consistent with the pre-existing TX Bolt related constants, which all drop the "TX " prefix * Comments * STENO_ENABLE_[GEMINI|BOLT|ALL] → STENO_PROTOCOL = [geminipr|txbolt|all] * Add note on lacking V-USB support * Clear chord at the end of the switch(mode){send_steno_chord} block * Return true if NOEVENT * update_chord_xxx → add_xxx_key_to_chord * Enable the defines for all the protocols if STENO_PROTOCOL = all * Mention how to use `steno_set_mode` * Set the default steno protocol to "all" This is done so that existing keymaps invoking `steno_set_mode` don't all suddenly break * Add data driver equivalents for stenography feature * Document format of serial steno packets (Thanks dnaq) * Add missing comma
* | tap-dance: Restructure code and document in more detail (#16394)Jouke Witteveen2022-06-132-100/+70
| |
* | Merge remote-tracking branch 'origin/master' into developQMK Bot2022-06-051-0/+1
|\|
| * Fix and add unit tests for Caps Word to work with Unicode Map, Auto Shift, ↵Pascal Getreuer2022-06-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Retro Shift. (#17284) * Fix Caps Word and Unicode Map * Tests for Caps Word + Auto Shift and Unicode Map. * Fix formatting * Add additional keyboard report expectation macros This commit defines five test utilities, EXPECT_REPORT, EXPECT_UNICODE, EXPECT_EMPTY_REPORT, EXPECT_ANY_REPORT and EXPECT_NO_REPORT for use with TestDriver. EXPECT_REPORT sets a gmock expectation that a given keyboard report will be sent. For instance, EXPECT_REPORT(driver, (KC_LSFT, KC_A)); is shorthand for EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT, KC_A))); EXPECT_UNICODE sets a gmock expectation that a given Unicode code point will be sent using UC_LNX input mode. For instance for U+2013, EXPECT_UNICODE(driver, 0x2013); expects the sequence of keys: "Ctrl+Shift+U, 2, 0, 1, 3, space". EXPECT_EMPTY_REPORT sets a gmock expectation that a given keyboard report will be sent. For instance EXPECT_EMPTY_REPORT(driver); expects a single report without keypresses or modifiers. EXPECT_ANY_REPORT sets a gmock expectation that a arbitrary keyboard report will be sent, without matching its contents. For instance EXPECT_ANY_REPORT(driver).Times(1); expects a single arbitrary keyboard report will be sent. EXPECT_NO_REPORT sets a gmock expectation that no keyboard report will be sent at all. * Add tap_key() and tap_keys() to TestFixture. This commit adds a `tap_key(key)` method to TestFixture that taps a given KeymapKey, optionally with a specified delay between press and release. Similarly, the method `tap_keys(key_a, key_b, key_c)` taps a sequence of KeymapKeys. * Use EXPECT_REPORT, tap_keys, etc. in most tests. This commit uses EXPECT_REPORT, EXPECT_UNICODE, EXPECT_EMPTY_REPORT, EXPECT_NO_REPORT, tap_key() and tap_keys() test utilities from the previous two commits in most tests. Particularly the EXPECT_REPORT macro is frequently useful and makes a nice reduction in boilerplate needed to express many tests. Co-authored-by: David Kosorin <david@kosorin.net>
* | Removes terminal from QMK. (#17258)Nick Brassel2022-05-303-376/+0
|/
* Continue Caps Word when AltGr (right Alt) is held. (#17156)Pascal Getreuer2022-05-201-1/+4
| | | | | | | | | | | This is a minor bug fix for Caps Word. Currently, Caps Word turns off whenever a non-shift mod becomes active. This is done to avoid interfering with hotkeys. This commit makes an exception to continue Caps Word when AltGr (right Alt) is held. Outside the US, the AltGr key is used to type additional symbols (https://en.wikipedia.org/wiki/AltGr_key). Depending on the language, these may include symbols used within words like accented letters where it would be desirable to continue Caps Word.
* Enhancement and fixes of "Secure" feature (#16958)Drashna Jaelre2022-05-141-2/+8
|
* [Core] Add Caps Word feature to core (#16588)Pascal Getreuer2022-05-142-0/+197
| | | | Co-authored-by: precondition <57645186+precondition@users.noreply.github.com> Co-authored-by: Drashna Jaelre <drashna@live.com>
* Add GET_TAPPING_TERM macro to reduce duplicate code (#16681)Jouke Witteveen2022-04-163-17/+3
| | | | | | | | | | | | | * Add GET_TAPPING_TERM macro to reduce duplicate code The macro gives the right tapping term depending on whether per-key tapping terms and/or dynamic tapping terms are enabled. Unnecessary function calls and variable resolution are avoided. Fixes #16472. * Use GET_TAPPING_TERM for Cirque trackpads Co-authored-by: Stefan Kerkmann <karlk90@pm.me>
* Implement XAP 'secure' core requirements (#16843)Joel Challis2022-04-162-0/+54
| | | | Co-authored-by: Drashna Jaelre <drashna@live.com> Co-authored-by: Stefan Kerkmann <karlk90@pm.me>
* Quantum Painter (#10174)Nick Brassel2022-04-131-29/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Install dependencies before executing unit tests. * Split out UTF-8 decoder. * Fixup python formatting rules. * Add documentation for QGF/QFF and the RLE format used. * Add CLI commands for converting images and fonts. * Add stub rules.mk for QP. * Add stream type. * Add base driver and comms interfaces. * Add support for SPI, SPI+D/C comms drivers. * Include <qp.h> when enabled. * Add base support for SPI+D/C+RST panels, as well as concrete implementation of ST7789. * Add support for GC9A01. * Add support for ILI9341. * Add support for ILI9163. * Add support for SSD1351. * Implement qp_setpixel, including pixdata buffer management. * Implement qp_line. * Implement qp_rect. * Implement qp_circle. * Implement qp_ellipse. * Implement palette interpolation. * Allow for streams to work with either flash or RAM. * Image loading. * Font loading. * QGF palette loading. * Progressive decoder of pixel data supporting Raw+RLE, 1-,2-,4-,8-bpp monochrome and palette-based images. * Image drawing. * Animations. * Font rendering. * Check against 256 colours, dump out the loaded palette if debugging enabled. * Fix build. * AVR is not the intended audience. * `qmk format-c` * Generation fix. * First batch of docs. * More docs and examples. * Review comments. * Public API documentation.
* Joystick feature updates (#16732)Ryan2022-03-261-26/+10
| | | | | | | * Joystick feature updates * Move new functions to joystick.h * Docs
* Add support for encoder mapping. (#13286)Nick Brassel2022-03-091-9/+2
|
* Remove `send_unicode_hex_string()` (#16518)Ryan2022-03-042-34/+0
|
* Format code according to conventions (#16322)QMK Bot2022-02-1221-131/+239
|