inputd is the normalized input routing service.
Find a file
Erik Inkinen 47d7f284e1
All checks were successful
CI / test (push) Successful in 5s
inputd: drop unstable rustfmt options for stable toolchains
2026-03-23 10:19:52 +02:00
.github phase3-input: add input routing daemon 2026-03-11 12:18:33 +02:00
src inputd: format runtime source 2026-03-21 03:31:24 +02:00
.editorconfig Initial commit 2026-03-11 10:15:11 +01:00
.gitignore Initial commit 2026-03-11 10:15:11 +01:00
ARCHITECTURE.md inputd: register input HAL readiness with deviced 2026-03-17 13:52:30 +02:00
Cargo.toml phase3-input: add input routing daemon 2026-03-11 12:18:33 +02:00
CODE_OF_CONDUCT.md Initial commit 2026-03-11 10:15:11 +01:00
CONTRIBUTING.md Initial commit 2026-03-11 10:15:11 +01:00
LICENSE Initial commit 2026-03-11 10:15:11 +01:00
linker.ld phase3-input: add input routing daemon 2026-03-11 12:18:33 +02:00
README.md inputd: register input HAL readiness with deviced 2026-03-17 13:52:30 +02:00
ROADMAP.md inputd: register input HAL readiness with deviced 2026-03-17 13:52:30 +02:00
rustfmt.toml inputd: drop unstable rustfmt options for stable toolchains 2026-03-23 10:19:52 +02:00
SECURITY.md Initial commit 2026-03-11 10:15:11 +01:00

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 deviced and registers HAL readiness for input interface classes (INPUT_CONTROLLER, INPUT_KEYBOARD, INPUT_MOUSE).
  • In phase3-input mode, resolves seriald and fbcond for 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_KEYBOARD or DRV_PS2_MOUSE in current stack)
  • event kind (KEY or POINTER)
  • event code and value fields

READ_EVENT uses cursor progression:

  • cursor=0 returns oldest available event
  • response carries next_cursor
  • NOT_FOUND when cursor is outside available window

Console projection

In phase3-input, printable key make-events are mirrored to:

  • seriald WRITE
  • fbcond 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-runtime
  • inputd-runtime-phase3-input
  • compatibility aliases:
    • inputd-integration-smoke
    • inputd-integration-phase3-input
    • inputd-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-bootstrap
  • lib-capabi
  • lib-ipc
  • lib-service
  • ipc-syscall-x86_64

No third-party crates are used.