Expand description
LPAR-04 §8 input-device adapters (Pointer, Keypad, Encoder, Button). LPAR-04 §8 input-device adapters.
Four thin typed wrappers that turn platform input into core [Event]
streams plus the routing rules defined in LPAR-04 §8. They are adapters,
not a driver framework — existing raw-event producers (PD/PM/PU/KD/
KU) remain valid without wrapping; this layer is additive.
§Device classes (LPAR-04 §8.1)
| Type | Produces | Routing rule |
|---|---|---|
[PointerDevice] | PointerDown/Move/Up, optionally Touch | Hit-test target (§6.2), canonical recognizer chain (§8.3) |
[KeypadDevice] | KeyDown/KeyUp, tick-driven auto-repeat | Focused object as ObjectEvent::Key |
[EncoderDevice] | Encoder { diff }, Enter press | Navigate → focus movement; editing → ObjectEvent::Rotary/Key |
[ButtonDevice] | Synthesized PointerDown/Up at a configured screen point | Identical to Pointer after synthesis |
§Per-instance state
Two [PointerDevice]s do not share recognizer state (§8.4). Keypad and
encoder devices address focus through the single-FOCUSED tree invariant
(§7.3); multiple simultaneous keypad/encoder devices targeting different
focus groups in one tree are out of v1 scope.
§Tick-domain durations
All durations are Tick counts (LPAR-04 §9.1). No wall-clock API appears anywhere in this module. Default constants are documented against LVGL’s nominal timings for a 30 Hz tick loop.
Structs§
- Button
Device - LPAR-04 §8 Button input device adapter.
- Button
Mapping - A hardware button mapped to a screen point.
- Encoder
Device - LPAR-04 §8 Encoder input device adapter.
- Keypad
Device - LPAR-04 §8 Keypad input device adapter with §9.7 tick-counted auto-repeat.
- Pointer
Device - LPAR-04 §8 Pointer input device adapter.
Constants§
- KEY_
REPEAT_ DELAY_ TICKS - Number of ticks a key must be held before auto-repeat begins.
- KEY_
REPEAT_ PERIOD_ TICKS - Number of ticks between successive auto-repeat deliveries after the initial repeat fires.