diff options
author | Zsolt Parragi <zsolt.parragi@cancellar.hu> | 2020-05-13 23:36:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-14 07:36:55 +1000 |
commit | 805f5cb72bb04c10327b40ed0c41e3848ad9ca75 (patch) | |
tree | 249680bec133e18dd2399b80cbeb14e980f1095c /quantum/quantum_keycodes.h | |
parent | a8a8bf0ff3d6e1c9637079b925b30cf7eb8913fd (diff) |
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
Diffstat (limited to 'quantum/quantum_keycodes.h')
-rw-r--r-- | quantum/quantum_keycodes.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 0958c4f4eb..d8f1fa4bbb 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -794,6 +794,7 @@ enum quantum_keycodes { # define SH_T(kc) (QK_SWAP_HANDS | (kc)) # define SH_TG (QK_SWAP_HANDS | OP_SH_TOGGLE) # define SH_TT (QK_SWAP_HANDS | OP_SH_TAP_TOGGLE) +# define SH_OS (QK_SWAP_HANDS | OP_SH_ONESHOT) # define SH_MON (QK_SWAP_HANDS | OP_SH_ON_OFF) # define SH_MOFF (QK_SWAP_HANDS | OP_SH_OFF_ON) # define SH_ON (QK_SWAP_HANDS | OP_SH_ON) |