From 83a785cca3ae59092217338558c6073a283ee1dd Mon Sep 17 00:00:00 2001 From: Zsolt Parragi Date: Wed, 13 May 2020 23:36:55 +0200 Subject: 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 --- quantum/quantum_keycodes.h | 1 + 1 file changed, 1 insertion(+) (limited to 'quantum') diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index b8506ce5ac..299f772a9e 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -796,6 +796,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) -- cgit v1.2.3