KeyboardReaderIf defines the hardware contract for normalized keyboard input. KeyboardReader is the Linux evdev implementation.
It uses evdev to monitor keyboard events and reports the Linux key name when a key is pressed.
SoftKeyboardIf defines system-keyboard lifecycle separately from physical key reading. ProcessSoftKeyboard owns an explicitly configured foreground keyboard process; it does not select or install a keyboard. See the text input foundation for scope and focus requirements.
The KeyboardReader reports Linux key names such as:
The reader only reports which key was pressed.
Application-specific key mappings and behavior should be handled by higher-level components.
A simple CLI component test is provided in the component_test directory.
Run the component test from the project root:
The CLI displays the selected Linux input device and prints each key as it is pressed.
Example output:
A specific Linux input device can also be selected:
Press Ctrl+C to stop the component test.
The keyboard reader requires evdev.
Install the dependency using:
The user running this component must have permission to read Linux input devices.
On Debian or Raspberry Pi OS, the user can be added to the input group:
Log out and back in after changing group membership.
KeyboardReaderIf exposes device identity, synchronous iteration, background monitoring, and idempotent resource cleanup without depending on evdev. Importing the interface does not load the optional Linux implementation.
KeyboardReader is responsible only for reading Linux keyboard events and reporting which key was pressed. KeyboardInputAdapter converts those key names into generic InputEvent values; InputMapper assigns semantic UiAction values.
It does not assign application-specific commands or behavior to keyboard input.
Higher-level components are responsible for interpreting keyboard events.
Run the keyboard unit tests with: