Class StickyKeys¶
Defined in File sticky_keys.h
Class Documentation¶
-
class StickyKeys¶
Sticky keys is an accessibility feature that enables the user to click a modifier key and have it “stick” until the keyboard shortcut is complete.
Public Functions
-
explicit StickyKeys(live_config::Store &config_store)¶
Construct a ‘StickyKeys’ instance with access to a live config store.
Available options:
{sticky_keys, enable}: Enable or disable sticky keys
{sticky_keys, disable_if_two_keys_are_pressed_together}: When set to true, clicking two modifier keys are once will result in sticky keys being temporarily disabled until all keys are released.
-
void operator()(mir::Server &server)¶
-
StickyKeys &enable()¶
Enables sticky keys. Enabling while already enabled is idempotent.
-
StickyKeys &disable()¶
Disables sticky keys. Disabling while already disabled is idempotent.
-
StickyKeys &should_disable_if_two_keys_are_pressed_together(bool on)¶
When set to true, depressing two modifier keys simultaneously will result in sticky keys being temporarily disabled until all keys are released. Defaults to true.
-
StickyKeys &on_modifier_clicked(std::function<void(int32_t)>&&)¶
Configure a callback to be invoked whenever a modifier key is clicked and is now sticky pending an action that will release it. The integer argument is the scan code of the modifier, which you may match against those found in <linux/input-event-codes.h>.
Public Static Functions
-
static auto enabled() -> StickyKeys¶
Creates a ‘StickyKeys’ instance that is enabled by default.
-
static auto disabled() -> StickyKeys¶
-
explicit StickyKeys(live_config::Store &config_store)¶