forked from mirrors/qmk_userspace
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
This commit is contained in:
parent
a8a8bf0ff3
commit
805f5cb72b
7 changed files with 93 additions and 1 deletions
|
@ -77,6 +77,7 @@ void reset_oneshot_layer(void);
|
|||
bool is_oneshot_layer_active(void);
|
||||
uint8_t get_oneshot_layer_state(void);
|
||||
bool has_oneshot_layer_timed_out(void);
|
||||
bool has_oneshot_swaphands_timed_out(void);
|
||||
|
||||
void oneshot_locked_mods_changed_user(uint8_t mods);
|
||||
void oneshot_locked_mods_changed_kb(uint8_t mods);
|
||||
|
@ -88,6 +89,13 @@ void oneshot_layer_changed_kb(uint8_t layer);
|
|||
/* inspect */
|
||||
uint8_t has_anymod(void);
|
||||
|
||||
#ifdef SWAP_HANDS_ENABLE
|
||||
void set_oneshot_swaphands(void);
|
||||
void release_oneshot_swaphands(void);
|
||||
void use_oneshot_swaphands(void);
|
||||
void clear_oneshot_swaphands(void);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue