OSM(MOD_LSFT), you can type a capital A character by first pressing and releasing shift, and then pressing and releasing A. Your computer will see the shift key being held the moment shift is pressed, and it will see the shift key being released immediately after A is released.
OSL(layer)- momentary switch to layer.
OS_ON- Turns on One Shot keys.
OS_OFF- Turns off One Shot keys. OSM act as regular mod keys, OSL act like
OS_TOGG- Toggles the one shot key status.
set_oneshot_layer(LAYER, ONESHOT_START)on key down, and
clear_oneshot_layer_state(ONESHOT_PRESSED)on key up. If you want to cancel the oneshot, call
set_oneshot_mods(MOD_BIT(KC_*))to set it, or
clear_oneshot_mods()to cancel it.
OSM(mod). It is called whenever the state of any one shot modifier key is changed: when it toggles on, but also when it is toggled off. You can use it like this:
modsargument contains the active mods after the change, so it reflects the current state.
#define ONESHOT_TAP_TOGGLE 2in your
config.hfile), you may lock a modifier key by pressing it the specified amount of times. There's a callback for that, too:
OSL(layer)one shot key:
layerwill be zero. When you're looking to do something on any layer change instead of one shot layer changes,
layer_state_set_useris a better callback to use.
_uservariant to allow for further customizability.