Commit Graph

14 Commits (b506c498a789563511f59c8c902e9d9f6a1daaa4)

Author SHA1 Message Date
Zsolt Parragi 805f5cb72b
One shot support for swap hands (#8590)
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-05-14 07:36:55 +10:00
skullY b624f32f94 clang-format changes 2019-08-30 15:01:52 -07:00
Thomas Baart 47051f506f Add One Shot Key callbacks (#4697)
* Added callbacks to one shot modifier changes

* Altered signature of callback functions

* Reordered the callback methods, shortened brief documentation

* Added One Shot Modifier callback documentation

* First attempt at unit tests

* Revert "First attempt at unit tests"

This reverts commit 5ec21a782202c0d74cf21cb852bd319f0c8b4842.

* Simplified oneshot function implementations

* Made clear_oneshot_locked_mods to be conform action_util.h, adhering to the (void) signature

* Made used datatypes for oneshot mods consistently unsigned integers

* Corrected callback to call clear callback when clear_oneshot_locked_mods is invoked

* Simplified oneshot equals statements

* Corrected return type and signature of get and set oneshot locked mods

* Consolidated one shot callbacks, added initial layer callback version

* Fixed non-updating one shot layer variable after timeout or other clear, added code comments

* Added better one shot key docs
2019-02-05 10:19:56 -08:00
Shihpin Tseng b416113616 Fix oneshot_time wrong type (#3696)
* Fix oneshot_time wrong type

* Fix oneshot_time_layer wrong type
2019-01-25 12:09:53 -08:00
skullydazed 7c9d5ace14 Generate API docs from source code comments (#2491)
* 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-22 02:50:38 -04:00
Fred Sundvik 6a76192fa4 Fix problems with undefined inlines in debug mode 2017-06-18 21:22:22 +03:00
Fred Sundvik fb95d86b39 Move functions for adding keys from to reports to report.h 2017-06-18 21:22:22 +03:00
Fred Sundvik 017458a07b Move functionality from action_util to report
The functions also takes report_kebyoard_t parameters, so that they can
be used elsewhere.
2017-06-18 21:22:22 +03:00
Fred Sundvik 6039a4f6ed Empty implementation of has_onshot_mods_timed_out
When the timeout is zero or not defined, the function now returns false.
Fixes a linker error when the visualizer is enabled
2017-04-09 18:34:59 +03:00
IBNobody 558f3ec1eb Use keyboard config for nkro (#7)
* removing nkro references - wip

* changed NKRO to be defined by keymap_config
2016-09-06 23:19:01 -05:00
Thiago Alves 74e97eefd7 Adds oneshot layer and oneshot tap toggling (#308)
This commit is mostly a cherry-pick from `ahtn` at
https://github.com/tmk/tmk_keyboard/pull/255.

These are the changes:

* Adds ACTION_LAYER_ONESHOT
* Adds ONESHOT_TAP_TOGGLE
* Mentions sticky keys in the docs on oneshot.
2016-05-05 21:41:37 -04:00
Didier Loiseau b7a81f0419 Fix #156: clear weak mods on every key press
- new macro_mods bit field for mods applied by macros
- weak_mods now only used for ACT_{L,R}MODS (i.e. LSFT, RSFT, LCTL etc.)
- clear the _weak_ mods on every key *pressed* such that LSFT etc.
  can no more interfere with the next key
2016-03-08 23:14:15 +01:00
tmk ed9766a7d4 core: Fix for disabling NKRO in Boot protocol 2015-09-20 14:34:13 +09:00
tmk 1a02ebcc61 Merge commit 'a074364c3731d66b56d988c8a6c960a83ea0e0a1' as 'tmk_core' 2015-04-10 01:32:04 +09:00