Add touch screen support
A blind user can now run the desktop with the touch screen as the only input, in the style of TalkBack, VoiceOver and NVDA touch. It is off by default: "Use the touch screen with gestures" in preferences, the "Touch screen" quick setting, or Cthulhu+Ctrl+Alt+T (toggle-touch-screen). Input: internal/platform/evdev reads the touch screen from the Linux input layer in pure Go and grabs it with EVIOCGRAB while touch is on, so no other program sees touches until it is turned off. It needs read access to /dev/input (the input group, as Fenrir already needs); Cthulhu never uses sudo. internal/touch recognizes taps, double and triple taps, holds, double tap and hold, flicks, two finger rotation and up to ten fingers. Gestures send Cthulhu's keyboard commands through the normal command dispatch. Modes, chosen with a three finger tap, each have their own rotor: navigation (default: items, then scroll, windows, workspaces or notifications), text (lines, words, characters), browse (page order, then element types; entered automatically on web pages), object (tree) and speech settings. Exploring speaks what is under the finger and moves object review there; double tap activates. docs/touch-support.md has the full gesture table, design, testing notes and open issues. Supporting changes: - Object review gains next and previous item in reading order, skipping unnamed containers, and object-activate, which runs the default action of the object of interest. Its results no longer need a known focus, because a touch user may never produce a focus event. - browserModeController exposes Browsing for other goroutines. - internal/i3command sends i3 commands; internal/i3ipc stays observe-only. - X11 helpers find the client under a point and send XTest clicks and keys. The window lookup releases the X11 guard before the XRes fallback, which takes the guard itself; a native test reproduces the old deadlock. - Mouse review stays quiet for one second after touch input. Tested live on a Lenovo Yoga 7 2-in-1 14AKP10 (Wacom HID 53FC, ten touch points) under i3, MATE and in Brave, Thunar and GTK dialogs. Not yet handled: the lock screen, rotation and multiple monitors, pass-through, and touch typing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
418b72329e
commit
e68d2fa440
39 files changed
+3492
-49
No files matched your search
@@ -16,6 +16,8 @@ After synchronization, check whether the reported issue still exists and inspect
|
||||
|
||||
Cthulhu is a Go Linux screen reader. `cmd/` contains executables; `internal/` owns reader subsystems. Embedded audio lives in `assets/sounds/`, Tentacle libraries in `sdk/`, native harnesses in `tests/`, and parity records in `testdata/`. Go tests sit beside implementation files. Arch packaging lives in `distro-packages/Arch-Linux/cthulhu-git/`.
|
||||
|
||||
Touch screen support lives in `internal/touch` (gesture recognizer), `internal/platform/evdev` (direct touch screen input with `EVIOCGRAB`; needs the `input` group), `internal/platform/xorg/touch*` (window lookup and activation clicks) and `internal/app/touch.go` (service). Read [touch support](docs/touch-support.md) for its design, status, test procedure and running log before changing it, and update that file when touch behavior changes.
|
||||
|
||||
Reader-independent Go code shared with Fenrir lives in
|
||||
`git.stormux.org/storm/screenreader-common`; check it before duplicating pure
|
||||
data or behavior. Shared packages own the emoji catalog, internal interaction
|
||||
|
||||
Reference in new issue
Block a user