Class SlowKeys¶
Defined in File slow_keys.h
Class Documentation¶
-
class SlowKeys¶
Enables configuring slow keys at runtime.
Slow keys is an accessibility feature that enables the rejection of keypresses that don’t last long enough. It can be useful in cases where the user has issues that cause them to press buttons accidentally.
You can optionally assign handlers for when the key is pressed down, is rejected, or when the press is accepted.
Remark
Since MirAL 5.5
Public Functions
-
explicit SlowKeys(miral::live_config::Store &config_store)¶
Construct a
SlowKeys
instance with access to a live config store.
-
void operator()(mir::Server &server)¶
-
SlowKeys &hold_delay(std::chrono::milliseconds hold_delay)¶
Configures the duration a key has to be pressed down for to register as a key press.
-
SlowKeys &on_key_down(std::function<void(unsigned int)> &&on_key_down)¶
Configures the callback that’s invoked when the key is pressed down. Useful for providing feedback to users.
-
explicit SlowKeys(miral::live_config::Store &config_store)¶