plover.oslayer.keyboardcontrol – Keyboard control¶
This module handles platform-specific operations relating to the keyboard, both for capturing keyboard input (using the keyboard to write steno) and keyboard emulation (writing the output from steno translation).
- class plover.oslayer.keyboardcontrol.KeyboardCapture¶
Encapsulates logic for capturing keyboard input. An instance of this is used internally by Plover’s built-in keyboard plugin.
- SUPPORTED_KEYS_LAYOUT: str¶
A human-readable text representation of the layout of keys on the keyboard. This is the same across platforms.
- SUPPORTED_KEYS: Tuple[str]¶
A tuple containing the list of individual keys from
- suppress_keyboard([suppressed_keys: List[str] = ()])¶
Suppresses the specified keys, preventing them from returning any output through regular typing. This allows us to intercept keyboard events when using keyboard input.
- key_down(key: str)¶
A custom method that is called when a key is pressed.
keyis a string representing the name of the key, and must be in
SUPPORTED_KEYS. Does nothing by default.
- class plover.oslayer.keyboardcontrol.KeyboardEmulation¶
Encapsulates logic for sending keystrokes. Pass an instance of this to the
StenoEnginewhen it is initialized.
- send_backspaces(number_of_backspaces: int)¶
Sends the specified number of backspace keys.
- send_string(s: str)¶
Sends the sequence of keys that would produce the specified string.