From ed3c360f0da27278e681e28b1801b7e0c0a36198 Mon Sep 17 00:00:00 2001 From: DeeJanuz <45082401+DeeJanuz@users.noreply.github.com> Date: Mon, 28 Sep 2026 16:59:56 -0600 Subject: [PATCH] Add a Global input switch to the Controllers page SteamVR's "Enable global input from overlays (Experimental)" could only be turned on from the settings app: its notice, with the button, hid once the setting was on. It's now a switch, and the notice shows only when buttons are mapped and the setting is off. Co-Authored-By: Claude Opus 5.5 --- docs/reference.md | 2 +- input-settings/main.qml | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/reference.md b/docs/reference.md index fe298e3..defd092 100644 --- a/docs/reference.md +++ b/docs/reference.md @@ -106,7 +106,7 @@ A Kirigami app with a Python backend, in the Plasma menu under Settings. It runs - Devices lists every USB and Bluetooth mouse and keyboard, with a light that flashes when the device is used. Each device gets a role: 3D pointer (grabbed, drives the pointer; the default for anything with a mouse), Pass through (grabbed only while typing goes to the desktop; the default for keyboards, where a Meta tap toggles the dashboard if `META_DASHBOARD=1` is in `~/.config/frametop.conf`), or Ignore. A device is identified by its Bluetooth address, or its USB ids and name, so all of its input nodes share one role. Forget drops everything saved for a device. - Buttons maps a pointer device's buttons. Choose Capture a button, press the button or key, then pick an action: a click, back, scroll, toggle dashboard, recenter, pointer on or off, head follow on or off, gaze pointer on or off, faster or slower, pass the key through, or nothing. Devices with saved mappings are listed even while they're asleep. -- Controllers maps the Frame controllers' buttons (every button but the system button) to the same actions, except passing a key through. Capture a button and press it on a controller, or pick it from the list. The controllers aren't input devices on the host; only SteamVR sees them. So the pointer helper reads them with SteamVR input (`pointer/helper/vrbuttons.h`, `pointer/helper/actions/`) and sends presses to the relay (`vrbtn right/a 1`), which does the mapped action. The helper only takes the buttons that are mapped (the relay tells it with `vrbind`), at an overlay-global priority, and only while no game (scene application) runs, so games keep every button; with In games on (`controller_in_games`), a mapped button is taken from games too. That needs SteamVR's "Enable global input from overlays (Experimental)" setting (`steamvr/globalActionSetPriority`); the page offers to turn it on. Mappings are saved as `controller_buttons` in `~/.config/frametop-input.json`. +- Controllers maps the Frame controllers' buttons (every button but the system button) to the same actions, except passing a key through. Capture a button and press it on a controller, or pick it from the list. The controllers aren't input devices on the host; only SteamVR sees them. So the pointer helper reads them with SteamVR input (`pointer/helper/vrbuttons.h`, `pointer/helper/actions/`) and sends presses to the relay (`vrbtn right/a 1`), which does the mapped action. The helper only takes the buttons that are mapped (the relay tells it with `vrbind`), at an overlay-global priority, and only while no game (scene application) runs, so games keep every button; with In games on (`controller_in_games`), a mapped button is taken from games too. That needs SteamVR's "Enable global input from overlays (Experimental)" setting (`steamvr/globalActionSetPriority`), which the page's Global input switch turns on and off. Mappings are saved as `controller_buttons` in `~/.config/frametop-input.json`. - Pointer has a Head follow switch and sliders for the pointer settings, which apply immediately, and a Recenter button. - Gaze has the gaze pointer switch (on now and from now on; a mapped button toggles it until the helper restarts), the gaze mode sliders, the gaze service's state (headset, samples per second, whether only one eye is tracked, the calibration, the nudges learned), and Calibrate (opens the gaze probe), Reload calibration, and Forget nudges. - Bluetooth lists paired devices and has Apply Bluetooth fixes, which runs `/etc/steamframe/bt-fixups.sh` through `pkexec`. Pair new devices in Steam. diff --git a/input-settings/main.qml b/input-settings/main.qml index ab13372..8493dc2 100644 --- a/input-settings/main.qml +++ b/input-settings/main.qml @@ -357,22 +357,22 @@ Kirigami.ApplicationWindow { } Kirigami.InlineMessage { Layout.fillWidth: true - visible: cpage.status.helper && !cpage.status.global + visible: cpage.status.helper && !cpage.status.global && backend.controllerMappings.length > 0 type: Kirigami.MessageType.Warning - text: "SteamVR's \"Enable global input from overlays (Experimental)\" is off. Without it the " - + "buttons only reach Frametop when nothing else has focus, if at all." - actions: [ - Kirigami.Action { - text: "Turn it on" - icon.name: "dialog-ok-apply" - onTriggered: backend.setGlobalInput(true) - } - ] + text: "Global input is off, so the mapped buttons only reach Frametop when nothing else has " + + "focus, if at all." } Kirigami.FormLayout { Layout.fillWidth: true + Controls.Switch { + Kirigami.FormData.label: "Global input:" + text: "SteamVR's \"Enable global input from overlays (Experimental)\", which mapped buttons need" + checked: cpage.status.global + enabled: cpage.status.helper + onToggled: backend.setGlobalInput(checked) + } Controls.Switch { Kirigami.FormData.label: "In games:" text: "Mapped buttons work while a game is running too (the game loses them)"