inputd is the normalized input routing service.
- Rust 100%
|
|
||
|---|---|---|
| .github | ||
| src | ||
| .editorconfig | ||
| .gitignore | ||
| ARCHITECTURE.md | ||
| Cargo.toml | ||
| CODE_OF_CONDUCT.md | ||
| CONTRIBUTING.md | ||
| LICENSE | ||
| linker.ld | ||
| README.md | ||
| ROADMAP.md | ||
| rustfmt.toml | ||
| SECURITY.md | ||
inputd
inputd is the normalized input routing service.
It receives typed key/pointer events from input producers, stores them in a
bounded event ring, and exposes deterministic read/status APIs. In phase3-input
it also projects printable keyboard input to console services.
What it does
- Validates startup envelope and role contract (
SERVICE_ROLE_INPUTD). - Registers itself in
named. - Resolves
devicedand registers HAL readiness for input interface classes (INPUT_CONTROLLER,INPUT_KEYBOARD,INPUT_MOUSE). - In
phase3-inputmode, resolvesserialdandfbcondfor console projection. - Handles RPC operations:
IPC_PHASE3_INPUTD_OP_APPEND_EVENT(0x5D0)IPC_PHASE3_INPUTD_OP_READ_EVENT(0x5D1)IPC_PHASE3_INPUTD_OP_READ_STATUS(0x5D2)
- Maintains a bounded ring of normalized events and deterministic counters.
Event model
inputd stores normalized event tuples:
- source role (
DRV_PS2_KEYBOARDorDRV_PS2_MOUSEin current stack) - event kind (
KEYorPOINTER) - event code and value fields
READ_EVENT uses cursor progression:
cursor=0returns oldest available event- response carries
next_cursor NOT_FOUNDwhen cursor is outside available window
Console projection
In phase3-input, printable key make-events are mirrored to:
seriald WRITEfbcond WRITE
Projection increments console_projection_count in status output.
Input driver startup is deferred by deviced until this HAL readiness is
registered and probe evidence exists.
Feature flags
inputd-runtimeinputd-runtime-phase3-input- compatibility aliases:
inputd-integration-smokeinputd-integration-phase3-inputinputd-integration-force-fail
Build and test
cargo fmt --all -- --check
cargo clippy --all-targets --all-features -- -D warnings
cargo test --all-targets --all-features
Dependencies
lib-bootstraplib-capabilib-ipclib-serviceipc-syscall-x86_64
No third-party crates are used.