plover.machine.keyboard_capture – Keyboard capture#

This module provides a skeleton for implementing keyboard input to grab steno keystrokes. This is typically platform-specific, so actual implementations are contained in platform-specific oslayer modules.

class plover.machine.keyboard_capture.Capture#

Encapsulates logic for capturing keyboard input. An instance of this is used internally by Plover’s built-in keyboard plugin.

Define the key_down() and key_up() methods below to implement custom behavior that gets executed when a key is pressed or released.

start()#

Start collecting keyboard input.

cancel()#

Stop collecting keyboard input.

suppress([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.

The following methods are available to implementors to hook into the keyboard capture system:

key_down(key: str)#

Notifies Plover that a key was pressed down.

key_up(key: str)#

Notifies Plover that a key was released.