drv-ps2-keyboard is the PS/2 keyboard protocol translator daemon.
Find a file
2026-03-23 10:19:51 +02:00
.github phase3-input: add PS/2 keyboard translator daemon 2026-03-11 12:18:33 +02:00
src drv-ps2-keyboard: resolve i8042 through deviced 2026-03-21 03:31:24 +02:00
.editorconfig Initial commit 2026-03-11 10:15:50 +01:00
.gitignore Initial commit 2026-03-11 10:15:50 +01:00
ARCHITECTURE.md phase3-input: fix transport framing and document keyboard translator 2026-03-11 14:14:22 +02:00
Cargo.toml drv-ps2-keyboard: resolve i8042 through deviced 2026-03-21 03:31:24 +02:00
CODE_OF_CONDUCT.md Initial commit 2026-03-11 10:15:50 +01:00
CONTRIBUTING.md Initial commit 2026-03-11 10:15:50 +01:00
LICENSE Initial commit 2026-03-11 10:15:50 +01:00
linker.ld phase3-input: add PS/2 keyboard translator daemon 2026-03-11 12:18:33 +02:00
README.md phase3-input: fix transport framing and document keyboard translator 2026-03-11 14:14:22 +02:00
ROADMAP.md phase3-input: fix transport framing and document keyboard translator 2026-03-11 14:14:22 +02:00
rustfmt.toml drv-ps2-keyboard: drop unstable rustfmt options for stable toolchains 2026-03-23 10:19:51 +02:00
SECURITY.md Initial commit 2026-03-11 10:15:50 +01:00

drv-ps2-keyboard

drv-ps2-keyboard is the PS/2 keyboard protocol translator daemon.

It reads raw keyboard bytes from drv-i8042, decodes PS/2 set-1 make/break scancodes into normalized key events, and forwards them to inputd.

Naming note

The repository and binary name remain drv-ps2-keyboard, while service discovery uses the shortened name drv-ps2-kbd (SERVICE_NAME_DRV_PS2_KEYBOARD) to satisfy the 15-byte service-name limit.

What it does

  • Validates startup envelope and role (SERVICE_ROLE_DRV_PS2_KEYBOARD).
  • Registers itself with named.
  • Resolves drv-i8042 and inputd endpoints through named.
  • Polls keyboard bytes via drv-i8042 READ_KEYBOARD_BYTE.
  • Decodes set-1 scancodes (including extended prefix handling).
  • Forwards normalized events to inputd APPEND_EVENT using lib-input.

Runtime model

  • Single-threaded translate-and-forward loop.
  • Fixed message buffer (1024 bytes).
  • Monotonic request IDs for i8042 reads and input appends.
  • No dynamic allocation.

Feature flags

  • drv-ps2-keyboard-runtime
  • drv-ps2-keyboard-runtime-phase3-input
  • compatibility aliases:
    • drv-ps2-keyboard-integration-smoke
    • drv-ps2-keyboard-integration-phase3-input
    • drv-ps2-keyboard-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
  • lib-input
  • ipc-syscall-x86_64

No third-party crates are used.