Skip to content

Choose what each controller button and gesture does - #93

Merged
seaweeduk merged 2 commits into
masterfrom
feature/controls
Nov 22, 2026
Merged

seaweeduk merged 2 commits into
masterfrom
feature/controls

Conversation

@seaweeduk

@seaweeduk seaweeduk commented Nov 22, 2026 •

Copy link
Copy Markdown
Owner

Settings has a new Controls section for choosing what each controller button does, and which buttons plus a twist of the wrist adjust which setting. The app now decides what every button does itself, so changing a button no longer means SteamVR's binding editor.

Closes #10.

Controls Choosing a job
Settings → Controls on the Steam Frame The job chooser on its Picture section
With grip held Gestures
Jobs for buttons pressed with grip held The Gestures view: the fixed gestures, Y and D-pad up for Opacity, grip and trigger for Volume
Adding a gesture: hold its buttons … then pick what it changes
Recording grip and X, both lit on the drawings The value chooser on its Room section
After a change A job's message
The notice with Undo Tone look: On, shown over the video after its button
  • Controls page: Drawings for the selected controller layout, each button labelled with its job. Pointing at a label opens a chooser in sections (General, Playback, Videos, Sound, Picture) that shows which buttons already do each job. A notice with Undo appears when a change replaces a job or a gesture, and Reset puts every button and gesture back. Menu always keeps at least one button.
  • More jobs: Back and Forward by Skip and Big skip (their lengths are set on the page, 10 s and 60 s), Frame back and forward, Previous and Next chapter, From the start, Funscripts on or off, After video (goes to its next choice), Rating up and down, Delete video (asks first), Volume up and down, Next audio track, Subtitles on or off, Peek at the room, See-through on or off, Match the room, Remove background, Tone look, TV gamma, Motion on or off, Zoom in and out, Stereo focus, Show focus target, Reset screen and Reset picture. Where the menu has the same control, a job does what that control does, messages included.
    • Frame back and forward step one frame and pause.
    • Peek at the room shows the room instead of the video while held; Passthrough switches it on or off.
    • See-through on or off switches between solid and the video's last see-through opacity.
    • Messages: where a job's change doesn't show by itself, a one-line message over the video says what it did, or why it can't act ("This is the last video", "Turn on passthrough first"). Mute says "Sound: Off" or "On", Passthrough, Match the room and Remove background say On or Off, and Reset picture says so. Zoom in and out show Zoom's ring, and See-through shows the opacity on the flat screen too.
    • Volume: setting the volume while muted unmutes, so the volume you set is the one you hear.
  • With grip held: a button can do a second job while that hand's grip is held.
  • Gestures: hold a button, or two on one controller, and twist the wrist to change a setting. Added on the page by holding the buttons, then picking from:
    • Sound: Volume. Room: Opacity, Match brightness and colour, Remove background's Strength, Edges, Spill and Shrink. Picture: Brightness, Contrast, Saturation, Warmth, Tint, Exposure, Sharpen, Zoom. Place: Viewpoint, Screen distance, height and curve. Playback: Scrub, Rating. Funscripts: Timing. Subtitles: Size, Height, Distance.
    • A tap still does the button's job (on release); held, a held job such as Peek at the room starts after 0.3 s; twisted past 20°, only the gesture runs.
    • Letting go puts back the last 0.15 s of change, and a value holds at its ends before turning back.
    • Horizon, Height, Resize, Move the menu and Clear rating are listed with them and stay as they are.
  • The ring: a gesture shows its value as a ring in front of the eyes, on the flat screen too. The volume gesture showed nothing before.
Before After
Opacity: 70 % as text Opacity 70 % as a ring
  • Flat screen: the trigger now carries it and resizes it from a corner, as it drags 180° and 360° video. The grip moves only the menu, so grip and a twist or another button work the same in 2D and 3D. Stick up or down shows the screen's distance as a ring, or its height with a grip held, as stick forward and back on 180° and 360° video shows the viewpoint.
  • New default layouts:
    • Steam Frame: either controller does everything on its own. Right: Menu and B open the menu, A plays or pauses, X stops, Y goes to the next video. Left: View opens the menu, and the D-pad matches the right hand's face buttons by position. Y and D-pad up + twist: Opacity. Both stick clicks recenter. The bumpers do nothing until given a job.
    • Touch: A and X play or pause, B and Menu open the menu, Y switches passthrough, Y + twist: Opacity, both stick clicks recenter.
    • Index: on both hands, A plays or pauses (A + twist: Opacity), B opens the menu and the stick click recenters.
    • Every controller with a grip: grip, then the trigger, + twist: Volume. Both sticks seek sideways; the left stick no longer turns the view.
  • First-run setup: "Your controllers" shows the buttons and gestures as they are set, and says where to change them.
Before After
First-run Your controllers before First-run Your controllers after
flowchart LR
  XR["OpenXR: one action per physical control<br/>(trigger, grip, A, D-pad up, …)"] --> CI["ControlInput:<br/>presses → jobs, taps held back<br/>on buttons with a gesture"]
  MAP["ControlMap + GestureMap:<br/>layout defaults + the user's changes"] --> CI
  CI --> J["Jobs: a MenuCommand,<br/>or main.cpp for the few others"]
  CI --> G["GestureInput: twist → value,<br/>dead zone, limit hold, release guard"]
  G --> R["Ring overlay"]
Loading
  • src/controls.h holds the controls, each controller type's layout and defaults, the job table and the gesture value table. A new job or value is one table entry and its label; a new control is one kControlTable entry and its paths in the layouts that have it.
  • src/gesture_input.cpp runs every gesture; src/screen_control.cpp takes the flat screen by the trigger.
  • Changes are saved per controller type as string ids, for example buttons_frame=right_b_button:stop,grip_left_x_button:none and gestures_frame=right:y_button:twist:opacity,either:grip+trigger:twist:volume. Unknown ids are ignored, and anything missing takes the default.
  • Bindings made in SteamVR's editor no longer apply.
  • The new strings are translated into all six languages.

Known and left as is

  • Settings shows one controller layout. With different controller types, it uses the right hand's layout for both. Steam Frame drawings can also differ from the active Touch bindings when SteamVR remaps them.
  • See-through opacity is remembered for the current run. It can fall back to 50% if the app saved the value before identifying the video and you reopen it through a different path.
  • The debug fit check covers representative Undo notices, not every possible wrap. The notice itself supports wrapped text.
  • If a button is given Choose with grip held and also starts a twist gesture, twisting while choosing with it changes the gesture's value too. No default layout binds it that way.
  • With the default grip + trigger Volume gesture removed, holding grip and pulling the trigger away from the menu still drags 180° and 360° video, which is the trigger's own job there. The tooltip on that row says the trigger then only chooses in the menu.
  • Rating up or down pressed while the video is still being identified leaves its rating alone, but the message can say "Not rated" for that moment.

Important

AI disclosure

Model Variant Role
anthropic/claude-opus-5-5 high Investigation, prototype, planning, implementation, review fixes
openai/gpt-6.2-astra high Independent review
openai/gpt-6.2-sol high Desktop testing in Monado, layout check, screenshots
Gemini 4 Neon High (MAX) Translation

Agent harness OpenCode 2.3.2; translation in Cursor 3.27.6, model named as Cursor shows it

@seaweeduk seaweeduk added the feature New feature (release notes: New) label Nov 22, 2026
@opencode-agent

Copy link
Copy Markdown
  1. Medium — Rating up can lower a saved rating while the file is being identified (src/menu_rating.cpp:159–163). Library::open() marks the path pending until its fingerprint resolves. During that window, record(file).rating can be zero even for a four-star video. Pressing Rating up then queues an absolute rating of 0.5, which overwrites the four stars when the identity resolves. This is reachable when opening a rated video from a slow network share; the Rating twist uses the same provisional value. Gate both the relative rating jobs and the gesture on library.known(file), and tell the user the rating is not ready yet.

  2. Medium — A grip-modified Choose press can also run a twist gesture (src/gesture_input.cpp:59–62). On Index, keep the default A + twist gesture and assign grip+A to Choose. With grip held, pressing A starts Choose, but choosingButton() checks the plain A job because the gesture definition does not include grip. Twisting while dragging the surround picture can therefore change opacity as well as the horizon. When matching a gesture, check the job ControlInput latched for each non-trigger button on that press; a button currently performing Choose must not start a gesture.

  3. Low — Removing grip+trigger still leaves an undisclosed surround-video drag (src/main.cpp:3841–3847). After removing the default Volume gesture, Controls labels grip+trigger “Nothing” and says the trigger only chooses in the menu while grip is held. On 180°/360° video, holding grip and then pulling the trigger off-menu nevertheless starts turnDrag: no gesture claims the trigger, and this path does not check grip. Moving the hand then rotates the picture. Suppress drag initiation for that grip-held trigger press, as the flat-screen path already does.

  4. Low — An ordinary tap reports an error for a gesture the user never performed (src/gesture_input.cpp:72–75). With the default Index layout on a runtime without alpha blending, tapping A to pause displays “This headset doesn't show the room.” The Opacity gesture reports its refusal on button-down, before any twist, and Play/Pause succeeds on release without replacing the message. Defer the refusal notice until the wrist crosses the 20° threshold, and emit it once; a tap should give feedback only for its button job.

github run

@seaweeduk

Copy link
Copy Markdown
Owner Author

/oc Please re-review the changes since the first review.

  1. Rating up during identification: fixed in 12fb77f. Menu::stepRating() returns until library_->known(file) is true, and the Rating gesture's why refuses silently ("") until then, so neither can turn a provisional 0 into an absolute rating.
  2. Choose with grip and a twist gesture: declined. It needs a custom layout that gives grip+A Choose while A also starts a twist gesture. No default layout does that. Fixing it needs per-press latched jobs in GestureInput, which is more machinery than the case is worth. It's listed under "Known and left as is".
  3. grip+trigger drag after removing the Volume gesture: declined. On 180°/360° video, dragging is the trigger's own job (it's one of the fixed controls). Holding grip doesn't make that a different job, so the drag isn't hidden behaviour. Listed under "Known and left as is".
  4. A refusal on an ordinary tap: fixed in 12fb77f. GestureInput keeps the refusal (refusal_) and says it only once the twist passes the dead zone, at most once per gesture. A tap only does its button's job.

@opencode-agent

Copy link
Copy Markdown

12fb77fe fixes the rating overwrite and the refusal on an ordinary tap. Two low-severity feedback issues remain:

  1. Rating up/down can still report “Not rated” for a rated video. While identification is pending, stepRating() now returns safely, but the button handler still reads the provisional rating and announces it. Pressing Rating up on a four-star video can therefore say “Not rated” even though the four stars are preserved. Check library.known(app.currentFile) before both the step and its feedback; returning silently would match the Rating gesture.
  2. The grip+trigger tooltip contradicts the intended drag behavior. After the Volume gesture is removed, the tooltip says, “With grip held, the trigger only chooses in the menu.” The trigger can still drag 180°/360° video off-menu. Keeping that fixed control is reasonable; wording the tooltip as “No grip + trigger twist gesture is assigned” would describe the setting accurately.

The custom grip+Choose overlap remains as documented. For ordinary taps, I confirmed that the refusal is emitted only after the twist passes 20° and is then cleared. This was a source review; I did not test on a headset.

github run

@seaweeduk

Copy link
Copy Markdown
Owner Author

Thanks. Both are declined with no further change, and both are now in "Known and left as is". (1) While the video is being identified, the rating itself is safe; only the message is wrong, for under a second. Fixing it means porting into ButtonJobs across the whole stack. (2) Rewording the tooltip is a string change in all seven languages, for a case that's already documented.

@seaweeduk
seaweeduk changed the base branch from fix/advanced-switch to master November 22, 2026 20:58
@seaweeduk
seaweeduk merged commit e769bd6 into master Nov 22, 2026
1 check passed
@seaweeduk
seaweeduk deleted the feature/controls branch November 22, 2026 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature (release notes: New)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remappable controls and gestures

1 participant