summaryrefslogtreecommitdiff
path: root/tmk_core/common/action.c
AgeCommit message (Collapse)Author
2020-07-07Add TAP_CODE_DELAY to Mod-Tap (#9422)Sven Grunewaldt
2020-07-02Fix sharing of mouse button state from mousekeys to ps2_mouse (#9124)Manna Harbour
With this change, when ps2_mouse is disabled, mousekeys works as usual. With ps2_mouse enabled, mousekeys button state is shared with ps2_mouse for clicking, dragging, and scrolling, mousekeys clicks are produced by ps2_mouse only, and mouskeys button state is transferred to mousekeys without generating clicks to enable mousekeys dragging. Co-authored-by: Drashna Jaelre <drashna@live.com> Co-authored-by: Drashna Jaelre <drashna@live.com>
2020-06-18Fix for One Shot Layer not being cleaned up after some actions (#8832)Joshua Diamond
2020-06-10Fix one shot swaphands compiler error when NO_ACTION_ONESHOT is defined (#9296)Tsan-Kuang Lee
* init * add RETRO_TAP; tap anyway after TAP_TERM, if no interruption * RETRO_TAP works for other types of taps * revert to upstream/master * explain this fork in readme * use one readme.md file instaed * fix the error if NO_ACTION_ONESHOT is defined * restore readme.md to upstream master Co-authored-by: Tsan-Kuang Lee <tsan.kuang.lee@gmail.com>
2020-06-01Fix build when using IGNORE_MOD_TAP_INTERRUPT_PER_KEY. (#9258)Nick Brassel
2020-05-302020 May 30 Breaking Changes Update (#9215)James Young
* Branch point for 2020 May 30 Breaking Change * Migrate `ACTION_LAYER_TOGGLE` to `TG()` (#8954) * Migrate `ACTION_MODS_ONESHOT` to `OSM()` (#8957) * Migrate `ACTION_DEFAULT_LAYER_SET` to `DF()` (#8958) * Migrate `ACTION_LAYER_MODS` to `LM()` (#8959) * Migrate `ACTION_MODS_TAP_KEY` to `MT()` (#8968) * Convert V-USB usbdrv to a submodule (#8321) * Unify Tap Hold functions and documentation (#8348) * Changing board names to prevent confusion (#8412) * Move the Keyboardio Model01 to a keyboardio/ subdir (#8499) * Move spaceman keyboards (#8830) * Migrate miscellaneous `fn_actions` entries (#8977) * Migrate `ACTION_MODS_KEY` to chained mod keycodes (#8979) * Organizing my keyboards (plaid, tartan, ergoinu) (#8537) * Refactor Lily58 to use split_common (#6260) * Refactor zinc to use split_common (#7114) * Add a message if bin/qmk doesn't work (#9000) * Fix conflicting types for 'tfp_printf' (#8269) * Fixed RGB_DISABLE_AFTER_TIMEOUT to be seconds based & small internals cleanup (#6480) * Refactor and updates to TKC1800 code (#8472) * Switch to qmk forks for everything (#9019) * audio refactor: replace deprecated PLAY_NOTE_ARRAY (#8484) * Audio enable corrections (2/3) (#8903) * Split HHKB to ANSI and JP layouts and Add VIA support for each (#8582) * Audio enable corrections (Part 4) (#8974) * Fix typo from PR7114 (#9171) * Augment future branch Changelogs (#8978) * Revert "Branch point for 2020 May 30 Breaking Change"
2020-05-14One shot support for swap hands (#8590)Zsolt Parragi
This commits add the SH_OS keycode, which works similarly to one shot layers: * while pressed, the keyboard is swapped * if no keys were pressed while it was pressed, the next key press is swapped SH_OS also supports chaining with one shot layers: OSL(x) + SH_OS + key interprets the key press on the oneshot layer. The ONESHOT_TIMEOUT setting used by one shot keys and layers is also used by oneshot swap hands. In the above chaining scenario the timeout of the oneshot layer is reset when swap hands is activated. Resolves #2682
2020-04-19[Docs] Fixed minor typos (#8860)Chris Ko
2020-04-12Fix bug with layer caching in get_event_keycode (#8693)Drashna Jaelre
* Fix bug with layer caching in get_event_keycode * Improve naming
2020-04-01Strip out features to allow minimum firmware sizes (#8645)Joel Challis
2020-03-23Add Post Processing to process_record (#4892)Drashna Jaelre
* Improve process_record system Code based on @colinta's * Rename and better handle functions * Fix incorrect function call to process_record_user * Add documentation for post_process_record * Add both get_event_keycode and get_record_keycode functions And add some comments about these functions * Update code format * Cleanup merge artifacts
2020-03-21Remove ACT_COMMAND (#8487)Ryan
* Remove ACT_COMMAND * And from action_t as well
2020-03-13format code according to conventions [skip ci]QMK Bot
2020-03-13Fix pressing two keys with the same keycode but different modifiers (#2710)fredizzimo
* Fix extra keyboard report during test_fixture teardown * Add tests for pressing two keys with only different modifers * Fix #1708 When two keys that use the same keycode, but different modifiers were pressed at the same time, the second keypress wasn't registered. This is fixed by forcing a key release when we detect a new press for the same keycode. * Fix the NKRO version of is_key_pressed * Fix uninitalized loop variable Co-authored-by: Jack Humbert <jack.humb@gmail.com>
2020-02-292020 February 29 Breaking Changes Update (#8064)James Young
2020-02-10Compile error if ONESHOT_TIMEOUT defined but oneshot disabled (#8100)Ted Lin
* Compile error if ONESHOT_TIMEOUT defined but oneshot disabled When ONESHOT_TIMEOUT and NO_ACTION_ONESHOT are both defined, this code fails to compile. Wrap the one usage of ONESHOT_TIMEOUT that is inconsistent with the rest so all usages are properly wrapped by a check of NO_ACTION_ONESHOT. * Run file through clang-format Co-authored-by: Ted M Lin <tedmlin@gmail.com>
2020-01-19Run clang-format manually to fix recently changed files (#7934)Joel Challis
* Run clang-format manually to fix recently changed files * Run clang-format manually to fix recently changed files - revert template files * Run clang-format manually to fix recently changed files - format off for ascii_to_keycode_lut
2020-01-10Add per-key IGNORE_MOD_TAP_INTERRUPT feature (#7838)zk-phi
* Implement IGNORE_MOD_TAP_INTERRUPT_PER_KEY - Add configurable option IGNORE_MOD_TAP_INTERRUPT_PER_KEY - Add function get_ignore_mod_tap_interrupt iff the option is enabled Unless IGNORE_MOD_TAP_INTERRUPT_PER_KEY is defined, this patch does not affect the resulting binary. * Add documentation for IGNORE_MOD_TAP_INTERRUPT_PER_KEY
2020-01-02Fix typo in action.c (#7757)xyzz
2019-10-17Move tmk_core/common/backlight to quantum/backlight (#6710)Joel Challis
* Move tmk_core/common/backlight to quantum/backlight * Add guards to backlight inclusion * Add guards to backlight inclusion * Update backlight guards on clueboard/60 * Use full paths to avoid vpath issues
2019-10-16Fix bug in `do_code16()` (#6935)fauxpark
* Fix bug in `do_code16()` * Remove qk_ mods functions
2019-08-30clang-format changesskullY
2019-08-08Extend allowed range of tappable keycodes to include modifiers (#5809)fauxpark
* Extend allowed range of tappable keycodes to include modifiers * Get rid of the magic numbers altogether * Remove some more magic numbers * Extract LM() functionality from ACT_LAYER_TAP * Use ACTION() macro everywhere
2019-07-22Add support for TAP_CODE_DELAY to Hold-Tap keys (#5400)Drashna Jaelre
* Add support for TAP_CODE_DELAY to Hold-Tap keys * Better handling for tap code delay and caps version
2019-07-16Make Caps Lock delay more reasonable (#6199)Drashna Jaelre
* Make Caps Lock delay more reasonable * Update documentation * Update docs/config_options.md Co-Authored-By: Konstantin Đorđević <vomindoraan@gmail.com> * Update docs/config_options.md Co-Authored-By: Konstantin Đorđević <vomindoraan@gmail.com>
2019-05-29Fix TO() and DF() calling layer_state_set_[kb,user] twice (#6003)fauxpark
2019-05-17Typedef'ed layer_state_t to uint32_t (#3637)Alex Ong
* Typedef'ed layer_state_t to uint32_t. This enables future work with layer_state_t to uint8_t for optimization purposes. * Removed accidental xeal60 commit * Revert to egyptian brackets, added sizeof(layer_state_t) so when layer_state_t is redefined it will automagically work. * Add additional typedefs * Add checks for setting layer state * Update tmk_core/common/action_layer.h Co-Authored-By: alex-ong <the.onga@gmail.com> * Revert commit.
2019-05-16Make delay for Capslock in Hold-Tap functions configurable (#5497)Drashna Jaelre
* Increase delay for Hold-Tap register for CAPSLOCK Because it seems that the 80ms delay wasn't too much * Screw it, make the caps delay a define and make it configurable
2019-02-10compiles, but long delay on startup and problemsskullY
2019-01-25Add support for RETRO_TAPPING to LT(layer, kc)lambda_sakura
2018-12-28Keep pressed keys on layer state change (fixes #2053, #2279) (#3905)Konstantin Đorđević
* Keep pressed keys on layer state change * Add doc comment for clear_keyboard_but_mods_and_keys * Keep pressed keys only if PREVENT_STUCK_MODIFIERS is on * Check STRICT_LAYER_RELEASE instead of PREVENT_STUCK_MODIFIERS
2018-12-14Fix up tap_code functionality (#4609)Drashna Jaelre
* Add delay in Tap Code to avoid issues I think a few people have reporting issues with it working properly, and it may be a timing issue. The 'register_code' uses this sort of delay in some of the functions, and this is probably why. Adding the 100ms delay should hopefully fix any issues with it. * Make tap_code delay configurable * Update documentation * Bring tap_code16 inline with changes * Fix type for tap_code16 Bad copy-paste job * Just use the value check for the define * Clarify timing in docs Co-Authored-By: drashna <drashna@live.com> * Wordsmithing Co-Authored-By: drashna <drashna@live.com>
2018-10-04Add mousekey_send to (un)register_codeDrashna Jaelre
2018-09-17Make `PREVENT_STUCK_MODIFIERS` the default (#3107)Joe Wasson
* Remove chording as it is not documented, not used, and needs work. * Make Leader Key an optional feature. * Switch from `PREVENT_STUCK_MODIFIERS` to `STRICT_LAYER_RELEASE` * Remove `#define PREVENT_STUCK_MODIFIERS` from keymaps.
2018-09-03fix mousekey callJack Humbert
2018-09-03Enable mouse keys in register_code and unregister_codeSteven Liu
This allows for macros to be assigned to press two mouse directions at same time, which allows for one key diagonals.
2018-05-14Allow one-shot modifiers to be chainedGergely Nagy
Many a times one would want to use multiple modifiers with the same key, preferably without having to hold anything, like `Ctrl+Shift+C` or `Ctrl+Shift+V` to copy/paste in GNOME Terminal. To make this possible, we need to be able to chain one-shot modifiers, so that we can have multiple of them active at the same time. The easiest way to accomplish this is that whenever we activate a one-shot modifier, we apply it on top of the existing set, instead of re-setting the state. When deactivating, either due to an interrupt, or due to a timeout, we deactivate all oneshots anyway, so the clearing part is covered. When we turn the one-shot modifier into a toggle, that will also clear all one-shot modifiers first, so we covered that case too. Fixes #2796, #1580, and #856. Signed-off-by: Gergely Nagy <qmk@gergo.csillger.hu>
2018-03-22Generate API docs from source code comments (#2491)skullydazed
* Generate api docs from source code * Add a bunch of doxygen comments * more doxygen comments * Add the in-progress api docs * script to generate docs from travis * Add doc generation to the travis job * make travis_docs.sh commit the work it does * make sure the docs script exits cleanly
2018-03-16Fix swap-hands tapping.Joe Wasson
This is an inelegant hack for #2522 but makes things work. Basically we give `action.c` a chance to handle the hold event early so that we can swap the keyboard for later keys. Later, to allow the hold to happen again quickly we nuke the key record so that tapping is reset. I tried to find a cleaner way, honestly.
2018-03-16Rename ONEHAND_ENABLE to SWAP_HANDS_ENABLE for consistencyJoe Wasson
2018-01-01backlight breathing overhaul (#2187)Balz Guenat
* add breathing to bananasplit * backlight breathing overhaul * fix the backlight_tick thing. * fix for vision_division backlight * fix a few keymaps and probably break breathing for some weirdly set-up boards. * remove BL_x keycodes because they made unreasonable assumptions * some fixes for BL keycodes * integer cie lightness scaling * use cie lightness for non-breathing backlight and make breathing able to reach true max brightness
2017-10-31RETRO_TAPPING (#1922)tsankuanglee
* add RETRO_TAP: tap anyway, even after TAP_TERM, if no interruption * consistent variable name * add option doc * change name for consistency * make RETRO_TAPPING default to off
2017-10-10#1792 added in waits from tmk for locking switchesJoe Martin
fixes #1792
2017-06-18Remove noisy debug lineCarlos Quiroz
2017-06-18Deactivate oneshot mods once timedoutCarlos Quiroz
2017-05-29Re-enable mouse buttonsJack Humbert
2017-05-26- Added integration of IBM Trackpointdbroqua
2017-05-19Workaround for the macOS caps lock delay (#1308)jerryen
* Add 80ms delay for KC_CAPS when used as a tap key Workaround for the macOS caps lock delay * Revert "Increase TAPPING_TERM for the Clueboard" This reverts commit a74e69e9fa889113ee31fbc8dc7e6848fdb07576.
2017-05-10Call led_set for layer action events to update LEDs on layer changesNephiel
2017-04-13Fix warnings when ACTION_ONESHOT is disabledFred Sundvik