Expand description
Kernel uinput devices, the first rung of host-capture input injection.
Kernel input devices for host-capture injection, over /dev/uinput.
A host session takes its input from the kernel, so a uinput keyboard and
pointer reach it whatever display server it runs: no compositor protocol to
advertise, no portal on the bus, and no consent dialog to answer. That puts
it on the host-capture input ladder below libei and the virtual keyboard and
pointer protocols, which a compositor may not offer, and above the portalβs
own methods (a socket write to the compositor lands in about 4 us, a uinput
write in about 12 us, a portal call in about 2 ms); it is taken only where
/dev/uinput is writable β a bare-metal host rather than an unprivileged
container.
The pointer carries a normalized absolute axis rather than the layoutβs own pixels: a uinput device fixes its axis range when the kernel creates it, while the union layout changes whenever a display is added or resized.
StructsΒ§
- AbsInfo π
- Device
- One kernel device: the fd that created it carries its events until it drops.
- Input
Event π - InputId π
- Pair
- The keyboard and pointer one host session injects through.
- Uinput
AbsSetup π - Uinput
Setup π
ConstantsΒ§
- ABS_
RANGE - The span an absolute axis is declared over; positions are scaled onto it.
- ABS_X
- ABS_Y
- BTN_
LEFT π - BTN_
MIDDLE π - BTN_
MISC π - BTN_
RIGHT π - BUS_
VIRTUAL π - EV_ABS
- EV_KEY
- EV_REL
- EV_SYN
- IOC_
WRITE π - REL_
HWHEEL - REL_
WHEEL - REL_X
- REL_Y
- SYN_
REPORT π - UINPUT_
NAME_ πLEN - UI_
ABS_ πSETUP - UI_
DEV_ πCREATE - UI_
DEV_ πDESTROY - UI_
DEV_ πSETUP - UI_
SET_ πABSBIT - UI_
SET_ πEVBIT - UI_
SET_ πKEYBIT - UI_
SET_ πRELBIT