Signed-off-by: Gergely Nagy <algernon@keyboard.io>
@ -102,6 +102,10 @@ modifiers and one-shot layer keys. It has the following methods:
> useful for macros that need to fiddle with either modifier or layer state: if
> one-shots are not active, they need not restore the original state.
### `.isPressed()`
> Returns true if any one-shot key is still held.
### `.isSticky(key)`
> Returns if the key is currently sticky.
@ -34,6 +34,9 @@ class OneShot : public kaleidoscope::Plugin {
return (key.raw >= kaleidoscope::ranges::OS_FIRST && key.raw <= kaleidoscope::ranges::OS_LAST);
}
static bool isActive(void);
static bool isPressed() {
return !!pressed_state_.all;
static bool isActive(Key key);
static bool isSticky(Key key);
static void cancel(bool with_stickies);