feat(input): gate activities on connected input devices (#96) #99
No reviewers
Labels
No labels
bug
duplicate
enhancement
future
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
albert/shepherd-launcher!99
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "u/albert/96/input-dependencies"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Add
requires_inputto entries so an activity is only shown and launchablewhile a required class of physical input device is connected — e.g. a typing
tutor on a gaming handheld that appears only once a keyboard is attached.
Supported types: mouse, touch, keyboard, gamepad (camera/mic and MIDI are
future work; the enum is closed so configuring one is a parse error).
InputDeviceTypeenum +ReasonCode::RequiredInputUnavailable.requires_inputon entries (scalar-or-list, mirrorsinput_compat); sorted/deduped into the validated
Entry.connected_inputsstate +set_connected_inputs, and a gatein
evaluate_entry.input_devices::InputMonitor— evdev enumeration + hotplug viaa notify watch on /dev/input, feeding the engine and re-broadcasting
StateChanged. Only runs when some entry declares
requires_input.This is a gating condition, distinct from the existing
input_compat(aspawn-time input-translation behaviour that shares the same vocabulary).
Fails open: before the first scan, and when /dev/input isn't readable (the
daemon's user isn't in the
inputgroup), gated activities stay visible and awarning is logged rather than silently hiding content.
Docs in config.example.toml, docs/INSTALL.md, and
docs/ai/history/2026-07-18 001 input-dependencies.md.
Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01CyP8KhzvqMpRyju5ZiPkLB
Fixes #96