A focus-preserving on-screen keyboard for Linux applications.
Project details
Ferrokey is a unique on-screen keyboard that maintains the focus of the underlying application while injecting key events at the kernel level. By utilizing a non-intrusive UI design and operating without stealing focus, Ferrokey offers a smoother input experience for various Linux environments, overcoming the limitations of conventional on-screen keyboards.
Ferrokey: A Novel On-Screen Keyboard Solution
Ferrokey is an innovative on-screen keyboard (OSK) designed to maintain the focused state of target applications while ensuring seamless input interaction. Unlike traditional OSKs that take over keyboard focus, Ferrokey injects key events at the kernel level using /dev/uinput, thus preserving the application’s keyboard focus throughout the user’s interaction. This approach eliminates common issues such as focus-grab races and the need for the target application to regain focus after each keystroke.
ferrokeyd daemon is a non-root, constrained broker that operates with strict security measures, including zero capabilities and an allowlist for operations, ensuring a secure interaction layer.The architecture of Ferrokey comprises several key components:
┌──────────────────────────────┐
│ ferrokey (unprivileged UI) │
│ Slint + ferrokey-surface │
└──────────────┬───────────────┘
│ FK01 v2 binary protocol (AF_UNIX, SO_PEERCRED, rate-limited)
┌──────────────▼───────────────┐
│ ferrokeyd serve (constrained│
│ broker: non-root, zero caps,│
│ NO_NEW_PRIVS, seccomp, │
│ no core dumps, non-dumpable)│
└──────────────┬───────────────┘
│ EV_KEY writes to the ONE pre-created virtual keyboard (fd adopted from the bootstrap, ferrokeyd init)
┌──────────────▼───────────────┐
│ Linux input core (uinput) │
└──────────────┬───────────────┘
▼
focused application keeps focus
Ferrokey exemplifies a modern approach to on-screen keyboards, focusing on preserving application interaction fidelity while providing a user-friendly, secure, and efficient input method.
Comments
0Start the conversation
Share the first comment.