Commit Graph
171 Commits
Author SHA1 Message Date
Kurt Himebauch 97e0251e6a fix(input): preserve control visibility and routing 2026-11-20 07:48:12 -05:00
Kurt Himebauch dcebdac765 fix(input): removed kit controls keep their actions in gamepad layouts 2026-11-19 00:44:41 -05:00
Kurt Himebauch cd5e824c1b fix(input): keep full insets while the kit fits, restore the library after a failed save 2026-11-19 00:19:56 -05:00
Kurt Himebauch 10b21321b7 fix(input): save per-game copies with the edit, keep failed choices visible and grips clear of the d-pad 2026-11-19 00:11:01 -05:00
Kurt Himebauch 885c4f0a44 fix(input): keep reported insets unless they crowd out the pad 2026-11-18 23:58:48 -05:00
Kurt Himebauch 968828afbd fix(input): kit scale fits the safe area and oversized insets are capped 2026-11-18 23:52:00 -05:00
Kurt Himebauch 446480aa19 feat(input): Settings Controller is the in-game page for the default, with per-game layouts, Just this game and a direct remap page 2026-11-18 23:45:46 -05:00
Kurt Himebauch afa696cef2 fix(input): Steam kits and PlayStation face buttons no smaller than the old gamepad; Steam layout menu opens the Controller page 2026-11-18 23:11:52 -05:00
Kurt Himebauch bf75dfb9c0 fix(input): saved D-pad keeps direction overrides, held directions wait for neutral and Reset regenerates an emptied gamepad 2026-11-18 21:00:31 -05:00
Kurt Himebauch 952f363b45 fix(input): D-pad keeps direction overrides, kit bindings survive layout edits and an emptied gamepad stays empty 2026-11-18 20:41:54 -05:00
Kurt Himebauch b29a5ef8aa feat(input): both sticks and both trackpads for Steam kits in portrait 2026-11-18 20:19:02 -05:00
Kurt Himebauch 0364792111 fix(input): Steam touch tint colors the D-pad and system buttons again 2026-11-18 20:11:39 -05:00
Kurt Himebauch e67c185f13 fix(input): hide on physical controller use only and refresh the kit when the virtual controller changes 2026-11-18 20:09:36 -05:00
Kurt Himebauch 318d64f3d6 fix(input): keep Steam grips on a small portrait pad and fit the bottom row 2026-11-18 20:04:00 -05:00
Kurt Himebauch 6f564caba6 fix(input): keep kit bindings, D-pad directions and Steam touch tint through the redesign 2026-11-18 20:02:37 -05:00
Kurt Himebauch 695ae21f93 feat(input): full-size portrait pad, one top row and sticks for every non-Steam kit 2026-11-18 19:40:27 -05:00
Kurt Himebauch 40665bbb1a feat(input): portrait pad under the game, kit-aware editor reset and leaner controller settings 2026-11-18 19:06:54 -05:00
Kurt Himebauch 0fba656ee2 feat(input): draw on-screen controls per virtual controller with a corner button and a simpler controller page 2026-11-18 18:08:30 -05:00
kingokksaandmaxjivi05 fc5dd7f3c5 fix(input): the layout editor shows the same placement as the session (#2783)
* fix(input): the layout editor shows the same placement as the session

Editing a layout stored for one orientation while the editor is open in
the other drew raw stored coordinates, so elements turned into flat,
overlapping bars. Route the editor through OnScreenLayout like the
on-screen controls: matched layouts are regenerated for the current
screen, everything else follows the same fit, and the dirty check
compares against what was shown when the editor opened.

* fix(input): reset and scale in the editor frame the session saves

The editor draft now carries the frame it was rebased to: the gamepad
scaler is rebuilt with the editor surface's real dimensions when edits
begin, so reset regenerates legacy controls for the display the user is
editing instead of the primary display. Stock default positions keep
their own frame aspect and are refitted into the draft frame before
being applied, so reset on a differently shaped display lands where the
editor shows and no longer marks an untouched layout as changed.

* fix(input): refit only the default positions on reset and update the test callers

---------

Co-authored-by: maxjivi05 <maxjividen@gmail.com>
2026-11-18 12:57:15 -05:00
MaxsTechReview c31f19a9f0 fix(input): detect which axis pair is the right stick (#2333)
* fix(input): detect controller right stick axes

* fix(input): read dedicated triggers when the right stick is on RX/RY

* fix(input): stabilize mixed controller axis detection

* fix(input): normalize ranged signed triggers

* fix(input): reuse the event's device for stick and trigger detection

Pass the InputDevice captured at the start of motion handling into the
right-stick and trigger helpers instead of looking it up again, so a pad
that disappears mid-event keeps its axis layout. Write each pad-mouse
trigger only when that side has an analog source, so a held digital
trigger on the other side is not cleared.
2026-11-17 11:24:33 -05:00
MaxsTechReview f84e9d5191 fix(input): the controls editor shows the layout the game uses (#2339)
* fix(input): align layout editor with game controls

* fix(input): regenerate built-in layouts for measured surfaces

* fix(input): preserve edge stick travel bounds

* Drop editor strings now translated on main

* fix(input): keep editor frame, undo state and previous edge sticks consistent

* fix(input): preserve draft controls and aspect in editor
2026-11-17 11:23:34 -05:00
MaxsTechReview 2ff890f0ec fix(dual-screen): allow game swap to external second screens (#2350)
* fix(dual-screen): allow game swap to external second screens

* fix(dual-screen): name external screens primary and secondary in the game screen choice

* Keep the selected game screen in step with display changes and session mode

* Refresh the game output when the screen is picked automatically

* Keep the game screen when controls open automatically

* Keep the external game screen across restarts and show the controls on the primary screen

* fix(dual-screen): preserve selected game display

* fix(dual-screen): retain fallback selection and keyboard access

* fix(input): clear field keyboard ownership on transitions

* fix(dual-screen): route keyboard when selected display is occupied

* fix(dual-screen): enable keyboard fallback routing

* fix(dual-screen): defer keyboard requests until focus returns

* fix(dual-screen): recheck keyboard destination on focus return and ignore stale hide events

* fix(dual-screen): end guest keyboard ownership on real dismissals
2026-11-17 11:22:33 -05:00
MaxsTechReviewandKurt Himebauch 7852098e63 fix(input): screen taps move the pointer without clicking while an on-screen mouse button is shown (#2465)
* fix(input): screen taps move the pointer without clicking while an on-screen mouse button is shown

* fix(input): keep tap-to-click with the stock Desktop on-screen gamepad

Only mouse buttons the user bound, not the profile base's stock bindings, make screen taps pointer-only.

* fix(input): count mouse buttons on the second-screen and foldable panels

* fix(input): keep tap clicks off on the swapped panel, copied stock panels and the scroll layer

* fix(input): move the pointer before the desktop gesture buffer when an on-screen mouse button clicks

* fix(input): the on-screen button gate leaves uninitialized gestures alone

---------

Co-authored-by: Kurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com>
2026-11-17 11:21:32 -05:00
Kurt Himebauch 637f4b21ee fix(shortcuts): the companion no longer keeps DroidDeck running, so Cocoon stops calling it open (#2764)
* fix(shortcuts): the companion no longer keeps DroidDeck running, so Cocoon stops calling it open

* fix(shortcuts): reset the relay holder when it is installed again
2026-11-17 10:03:25 -05:00
Kurt Himebauch 605f85b4b9 fix(input): a failing BLE disconnect no longer ends the app or the unit test run (#2670) 2026-11-15 10:46:16 -05:00
OmarAlTaki1 a8aff1c1a3 fix(input): read a USB mouse directly where Android won't capture it, as in REDMAGIC cast mode (#2298)
* fix(input): read a USB mouse directly where Android won't capture it, as in REDMAGIC cast mode

REDMAGIC's cast mode shows the session on a virtual display while its own
mirror activity keeps focus on the phone's display. Android only grants
pointer capture on the focused display, so the session got a cursor that
stopped at the screen edge and the camera stopped turning in mouse-look games.

When capture is wanted but not granted within 500 ms, the session claims the
mouse's USB HID boot interface instead, reads its reports with the layout from
its report descriptor (boot protocol if that can't be read), and sends motion,
five buttons and the wheel the way captured motion goes. The mouse goes back
to Android whenever capture is no longer wanted.

* feat(input): hold the middle button still to open the session menu while the mouse is read over USB

While the session reads the mouse over USB, Android has no cursor, so the
mouse can't reach REDMAGIC's cast-mode panel or anything else outside the
session. Holding the middle button for two seconds without moving opens the
session menu, which hands the mouse back to Android until the menu closes.
Quick middle clicks and middle-button drags still reach the game.

Relative motion sent to a locked pointer now hides the session's own cursor,
as pad pointer motion already does. A desktop keeps its grab while the menu
is open, so a click made with Android's cursor on the way back showed the
session cursor, which then stayed where the click was.

* fix(input): give a USB mouse back to Android when the app starts after being killed while reading it

A process killed while it reads the mouse, by a crash or an update, leaves
the mouse's interface with no driver, so Android has no mouse until it is
replugged. At startup, any permitted USB boot mouse that can be claimed
without force has no driver, and releasing it reattaches Android's.

* fix(input): only sessions shown off the phone's screen fall back to reading the USB mouse

Android grants pointer capture on the focused display, which the phone's own
screen is, so a session there never needs the USB mouse. Checking the display
keeps a slow capture grant from ever asking for the mouse's USB access there.

* fix(input): reject out-of-range HID report sizes and counts, and release USB buttons when the mouse is lost

A report descriptor can give any 32-bit report count or size, which drove the
field loop for billions of iterations and could overflow bit offsets into a
negative index on the reader thread. Items outside 32 bits and 4096 fields are
rejected, so such a mouse falls back to the boot protocol.

A mouse that stops responding while it is read over USB now releases the
buttons it held and cancels a pending menu hold, through a separate onLost
callback, since the session's own release path only runs while the grab is
still active.

* test(input): an oversized report count is rejected even when X and Y follow it

The earlier case had no X or Y fields, so it returned null without the count
check too. A 4097-field item before valid X and Y is now rejected, and a
4096-field one still parses.

* fix(input): Auto relative mouse sees a mouse read over USB, and re-checks when it is lost

The Auto relative-mouse decision from #2305 reads mouseAttached() on the
relative-mouse thread, which counts a mouse read over USB, so the grab's
state is now volatile. Losing that mouse re-runs the decision, as removing
an Android mouse does.

* fix(input): set up the USB mouse on its reader thread, select report protocol, and retry a failed permission request

Opening the receiver and its descriptor and protocol transfers now run on the
reader thread, so an unresponsive receiver can't stall the session for up to
two seconds. A release during setup lets the thread clean up as it already
did. A mouse that fails setup isn't tried again until it is replugged, since
releasing it re-adds Android's mouse, which would start another attempt.

A parsed report descriptor now selects report protocol first: HID 1.11
7.2.6 says a host must not assume the protocol a device is in.

A permission request that throws no longer marks the mouse as asked.

* fix(input): a cancelled or overlapping USB reader can't claim the mouse or mark it failed

A new reader waits for the previous one to let go of the interface, so a
quick release and grab, like toggling the session menu, no longer fails the
claim. A reader released before or during setup doesn't claim the interface
or keeps going. Failing to open or claim leaves the mouse with Android without
marking it failed, since nothing re-adds it to start another attempt; only a
failure after claiming, or a lost mouse, marks it, and only for the current
reader.

If SET_PROTOCOL(report) fails, setup tries boot protocol before giving up,
so the decoder always matches the protocol the mouse was set to.

* fix(input): release can't slip between the USB reader's cancellation check and its claim

The reader checked `running` and then claimed the interface, so a release in
between still let it claim and start setup. The check and claim now share a
lock with release, so the reader either never claims or claims first and sees
the release before setup.

* fix(input): hand the mouse back to Android while the WoW chat bar is on top

appUiOwnsPointer() already shows Android's pointer for the on-top chat bar,
but pointer capture, and now the USB mouse, stayed on, so that pointer
couldn't reach the bar. The bar on top now ends capture and USB reading like
the session menus do, and its changes re-run the capture decision.
2026-11-15 10:21:15 -05:00
Kurt Himebauch de5f0fe6df fix(shortcuts): move the accessibility service into an optional companion so Play Protect stops blocking the install (#2654)
* fix(shortcuts): move the accessibility service into an optional companion so Play Protect stops blocking the install

* fix(shortcuts): bind only same-signer relays, recheck enablement per call, drop timed-out keys
2026-11-15 09:55:30 -05:00
George VineandKurt Himebauch 5dd973587f Fix: Remote Play gets the Steam Deck, Steam Deck Controller, Stream Controller, and touch controls (#2033)
* fix: Remote Play gets the Steam Deck controller

Steam's Remote Play client reads the controller itself from its own
streaming_client process. The input preload only exposed the virtual
Deck controller (and the DualShock 4 / DualSense pads that share its
code) to the process named steam, so in Steam Deck controller mode
streaming_client was refused /dev/hidraw16 and the stream got no input:

  streaming_clien: deck: /dev/hidraw16 refused: not the Steam client

streaming_client now sees the same Deck, DualShock 4 and DualSense pads
as Steam. Each opener gets its own report stream from the read-only
ring, so the two processes do not compete for input. The Steam
Controller paths stay Steam-only: the paired controller's feature and
output slot is serialised only within one process.

Fixes #1860

* fix: Remote Play also gets the Steam Controller and touch controls

streaming_client now opens the Steam Controller pads (the app's
emulated one and a paired controller) and Steam's touch controller,
like the Steam Deck pad.

A paired controller's feature request and output slots, and the touch
controller's state, are shared with the app and written under a
seqlock that expects one writer. Their writers now also take a flock
on a lock file in the hook directory, so Steam and streaming_client
take turns. touch_state() was a template holding its own static mutex,
so each caller had a separate one; it now shares a single mutex.

The pad type and touch plug watchers run in streaming_client too, so
it gets the udev events for mode switches and replugs; those only reach
the process that injects them. Poking /dev watchers and moving event0
on the shared filesystem stay with Steam, so they happen once.

* fix: the shared slot lock fails safe and never waits forever

If the lock file cannot be opened or locked, ProcessSlotLock used to
carry on unlocked. Steam alone is still a single writer then, exactly
as before streaming_client could open these devices, so it carries on;
streaming_client now leaves the paired controller's feature and output
slots and the touch state alone instead (feature reads fail with EIO).
The first failure is logged.

The wait for the lock is now bounded: a session freeze can stop the
process holding it, and writers wait with controller_mutex held, so an
unbounded flock could stall all input in the other process. Feature
reads wait up to their 500 ms reply timeout, outputs 100 ms and touch
state 20 ms. When the deadline passes the lock is held by the other
process, so neither proceeds; the operation is skipped and logged.

* fix: Steam no longer turns motion off under its Remote Play client

Steam and streaming_client both set the Deck pad's IMU mode, and both
wrote the one word Android reads to decide whether to feed the gyro.
Steam keeps toggling its own mode during a stream, so it could switch
motion off while the Remote Play layout needed it, and the client never
re-sent an unchanged mode.

Each process now has its own word. Android reads motion while either
wants it, and ignores the Remote Play word once that process is gone.

* fix: Remote Play decides motion while Steam has set no mode

Until Steam published its IMU mode, Android reported the mode as unknown
without reading the Remote Play client's word, so a Remote Play request
to stop motion had no effect. The word that has been set now decides,
and the mode stays unknown only while neither process has set one.

The rule moves into ImuModes so it can be tested on the JVM.

---------

Co-authored-by: Kurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com>
2026-11-15 09:55:25 -05:00
alien2003andalien2003 decab6ea90 feat(input): a pen moves the pointer while hovering, clicks with its tip and right-clicks with its side button (#2625)
* feat(compositor): pen samples drive the pointer like a mouse

Input record 13 carries the pen's state (in proximity, tip, right and
middle button) and its position in input space as 24.8 fixed point.
Hover moves the pointer, the tip holds the left button, and a record
without the in-proximity bit releases every button. Under a pointer
lock only the buttons pass. A button pressed or released mid-stroke
keeps the implicit grab on the window the stroke started in, unless
that window closed.

* feat(input): a pen moves the pointer while hovering, clicks with its tip and right-clicks with its side button

In Mouse mode (the default) a pen's hover moves the pointer, the tip
holds the left button and the side button right-clicks; Touch keeps it a
finger. The side button can send a middle click or nothing instead, and
a Bluetooth pen key counts as the side button while the pen is near.
With glasses or a program's pointer lock the pen drives the touchpad.
A hover exit followed within 50 ms by more hover or a touch keeps the
pen near, so a pen at the edge of its hover range does not flicker out,
and a hover that sends nothing for 2 s leaves proximity. On the desktop
a pen that comes near releases KWin's grab of a hardware mouse, so the
pen moves KWin's pointer. Whatever cancels touches also ends the pen,
and stylus devices no longer count as hardware mice.

* feat(input): pen mode and side button settings in the Controls tab and the session drawer

A Pen group follows the touch settings once the phone has a stylus
device or a pen event was seen, which is remembered as penSeen and kept
by a settings reset. It holds Pen (Mouse, Touch) and Side button (Right
click, Middle click, Off); Side button is hidden in Touch. Before
Android 14 a touchscreen reports the stylus source without a pen, so
there it counts only with its first pen event. The strings are
translated into all 32 languages.

* docs: describe pen input and its limits

---------

Co-authored-by: alien2003 <11610652+alien2003@users.noreply.github.com>
2026-11-15 09:38:01 -05:00
Shawn Montgomery 9c349e185e fix(input): Back gesture opens the menu when a controller exposes its own mouse (#2666)
The 8BitDo Ultimate Mobile registers a mouse interface next to its gamepad.
On REDMAGIC the back gesture has no virtual-hard-key flag, so with that
mouse attached it was sent to the game as a right-click. A mouse that
shares its USB id with an attached controller no longer counts.
2026-11-15 09:35:31 -05:00
MaxsTechReview bc929c08b2 fix(input): save Steam touch layout without existing config (#2580)
* fix(input): save Steam touch layout without existing config

* fix(input): preserve unreadable Steam touch config on save

* test(input): register configset in unreadable touch config fixture
2026-11-13 17:24:25 -05:00
MaxsTechReview 02a5be62da fix(input): a controller that disconnects mid-event no longer closes the app (#2369)
* fix(input): a controller that disconnects mid-event no longer closes the app

KeyEvent.getDevice() looks the device up on every call, so a controller removed while its event was handled made a later lookup return null and crashed in noteDevice. Look the device up once per event and ignore events whose device is gone.

* fix(input): retain controller layout during disconnect

* fix(input): look up the controller once per key and motion event
2026-11-11 21:57:56 -05:00
MaxsTechReview 65554a544c fix(input): digital trigger keys work again on pads that also list analog axes (#2291)
Since #2205 a pad that lists an analog trigger axis had its L2/R2 keys
ignored. Handhelds whose triggers can be switched to digital keep listing
the axis but only send the keys in that mode, so the triggers stopped
responding.

A trigger key now presses its trigger when the axis is idle at that
moment and holds it until the key is released; motion events with an
idle axis keep it held. As soon as the axis reports a value it takes
over again, so pads that send both (the #2205 case) still follow their
analog axis and key repeats never change the value.
2026-11-11 20:56:19 -05:00
MaxsTechReview 9bf638a3c4 fix(input): system Back only turns into a right-click with an external mouse (#2323)
* fix(input): injected Back is a right-click only while an external mouse is attached

* input: order imports

* fix(input): reject built-in devices for injected Back

* fix(input): log matched mouse for injected Back

* fix(input): ignore mice that name themselves virtual for injected Back
2026-11-10 11:55:38 -05:00
MaxsTechReview 75a0230304 fix(input): Auto relative mouse stays off for direct touch without a mouse (#2305)
* fix(input): Auto relative mouse stays off for direct touch without a mouse

* fix(input): re-check relative mouse when an input device changes

* fix(input): reapply relative mouse after agent readiness

* fix(input): only the current session clears the agent-ready hook and readiness resets relative mouse retries
2026-11-09 15:02:12 -05:00
MaxsTechReview 2ade269be3 fix(gamescope): direct-touch drags work again in games that confine a hidden cursor (#2220)
* gamescope: a confine is relative only while it holds the X pointer

Patch 0128 made every hidden-cursor confine relative. Games that hide the
system cursor, draw their own and confine the pointer to their window then
took the host lock, and a direct touch drag became camera motion with no
button held, so cards and items could not be dragged.

A confine now goes relative once the X pointer stays away from the seat
position while input moves, as when a game recentres it or clips it to a
small rectangle, and returns to absolute when the pointer follows again or
the confine ends. Locks and the warp follow rule are unchanged.

* gamescope: a constraint without a hint is relative only while the game holds the X pointer

Xwayland turns a hidden-cursor grab into a lock with no cursor position hint, so the confine-only rule never applied to games that draw their own cursor (Stardew Valley, Balatro). A hinted constraint is relative at once, as upstream. An unhinted lock or confine goes relative once the X pointer stops following the seat's motion, which a recentring or clipping game does and a drawn-cursor game does not.

* gamescope: a pointer constraint is relative only while the game holds the X pointer

Stardew Valley's grab with a hidden cursor becomes an Xwayland lock with a cursor position hint, which upstream made relative at once. Without relative mode that lock still follows gamescope's relative motion and touches still place the pointer, so the hold rule now decides for every constraint, hinted or not.

* gamescope: a hinted lock starts relative and is released once the X pointer follows

Releasing a hinted lock only through the hold rule let a recentring game's first touch swipe press the button. A hinted lock now starts relative as upstream and is released after 30 moving frames on which the X pointer follows the motion gamescope sends, counted from the relative motion while the seat is locked.

* gamescope: count away frames within one half-second window

* gamescope: a hint that arrives with the game's first warp starts the lock relative

* fix(input): end the touch press when a program locks the pointer mid-swipe

A game that only shows its pointer lock after its first warp took the first
swipe as an absolute drag, with the button held until the finger lifted.
The first locked move now ends the forwarded touch before sending deltas.

* gamescope: a new focus window or constraint starts its own pointer hold

A held state from one constrained window carried over to the next one
when focus moved before a reset frame. Track the input focus window and
the constraint, and restart the hold when either changes.

* gamescope: read the pointer constraint under the wlserver lock

GetCursorConstraint asserts the lock is held, so the hold tracker
aborted as soon as a program constrained the pointer.

* fix(input): a mid-swipe pointer lock ends the touch but keeps a held button

The first locked move cancelled the whole direct-touch hold, releasing a
right button held by a long press. It now cancels only the forwarded touch;
the held button is released when the finger lifts, as before.

* fix(input): extra fingers during a locked swipe stay out of the cancelled touch

Once a locked swipe has ended the forwarded touch, a second finger restarted
it with a new touch-down while the swipe carried on as relative motion. Extra
fingers are now ignored until the swipe ends; the final lift still releases a
held button.

* fix(input): a swipe that ended its touch stays closed until the finger lifts
2026-11-07 21:30:21 -05:00
MaxsTechReview 0d034b1996 fix(input): restore the rest of what #1439 removed, and keep the editor on the bottom screen (#2242)
* fix(session): close the bottom panel from the docked menu's Close again

* fix(input): keep imported screen keys on screen when the gamepad is hidden

Screen keys used to be shown on their own, whatever the gamepad did. Since
they were merged into the gamepad layout they disappeared with a controller
connected, in desktop sessions, with on-screen controls set to Never, in
Steam + QAM mode and in Steam's touch mode.

Elements now carry an always-shown flag. The screen key migration sets it on
imported keys (and once on keys merged by earlier builds), and the on-screen
controls keep flagged elements drawn while the rest of the pad is hidden,
in buttons-only mode and with the quick toggle, without duplicating them in
the unfolded strip.

* fix(dual-screen): give the profile controls panel the bottom bar with swap

* fix(dual-screen): keep the layout editor on the bottom screen

The bottom panel was recreated above an open input editor or input
settings window whenever it closed and reopened (session stop/start, or
the bottom screen briefly reported as taken), hiding the editor. The panel
now waits while one of our input windows holds its display and reopens
when the last one closes.

An app arrival recorded before one of our windows covered the bottom
screen no longer marks the screen taken, the editor picks its display only
when a display is added or removed, and it skips a bottom screen another
app holds.

* fix(input): label keyed D-pads and sticks with their keys

Screen key D-pads and sticks used to show each direction's key (W, A, S, D)
when labels were on. The unified renderer drew no direction labels and only
offered Show label for buttons and gamepad sticks, so imported labels did
nothing.

D-pads and sticks bound to directional keys now draw each bound key's name
at its direction through the shared key-label helper, and Show label is
offered for every D-pad and stick.

* fix(input): remember the layout editor's snap choice

* refactor(input): drop controller pref setters and drawer field nothing uses

* fix(input): restore the Deck tabs and right trackpad in the unfolded strip

With Deck controls, the unfolded strip used to offer the Gamepad, Grips,
Left, Right and Both tabs and put a trackpad in the right stick slot. The
unified strip only showed the gamepad with two sticks.

For Deck pads the strip bar now carries the shared Deck panel tabs and
title, the other tabs show the same stock Deck panel layouts as the second
screen, and the docked gamepad takes its stick or trackpad per side from the
Deck gamepad layout. Other pads keep the plain two-stick strip.

* fix(input): carry the Deck gamepad stick or trackpad choice into its layout

The Deck controls Gamepad tab used to let each side switch between a stick
and a trackpad. That choice is now part of the editable Deck gamepad
layout, but the saved choice was never moved over and its setter was left
without callers.

The library upgrade now applies a saved non-default choice to the Deck
gamepad layout once, only while that layout is still the stock one, and the
unused setter is removed.

* chore(i18n): drop the Deck surface switch string nothing shows

* fix(input): offer Show label only where a label can be drawn

* fix(input): Show label follows the unsaved action and diagonal-only sticks

The element properties now get the editor's draft action, so changing a
stick or D-pad to keys offers Show label before saving. A stick bound only
on its diagonals counts as labelled too.

* fix(input): only sticks count their diagonal keys for Show label

Diagonal key names are drawn on sticks only, so a D-pad bound just on its
diagonals no longer offers a label it can't show.
2026-11-07 21:04:34 -05:00
MaxsTechReview 8fa30b99f9 fix(input): restore the controls, panels and settings #1439 removed (#2238)
* fix(input): restore on-screen touch behaviour: slide between buttons, mouse pass-through, keyboard on release, overlay haptics, stick reach and hit areas

* fix(dual-screen): restore second-screen bars, swapped Terminal and Deck panel tabs

* fix(input): fit on-screen layouts to the real view size, cutout, Steam + QAM mode and unfolded strip

* fix(input): unfolded strip keeps press haptics

* fix(input): restore layout import/export, element editor rows and layout tools

Bring back .icp layout import and export on the saved layouts page, the
per-element image, opacity and label controls, a uniform size slider and
reset positions in the layout editor, and non-destructive Steam, QAM and
keyboard button toggles stored on the layout style. Remove strings left
unused by the input profile unification.

* fix(input): keep hit slack to gamepad-shaped buttons and fit touch tests to saved layout geometry

* fix(input): button size regenerates the gamepad and scales spacing

A generated gamepad now stores its button size and is regenerated at that
size, so spacing follows the radius and the layout keeps regenerating on
rotation. Edited layouts scale positions from their anchor edge or centre
so gaps grow and shrink with the controls.

* fix(input): button size rescales moved gamepads around the generator

Gamepad layouts that no longer match the generated positions exactly were
scaled element by element from screen thirds, which split the face buttons
and D-pad across anchors. Gamepad controls now take the generator's
positions at the new size plus each control's own offset from the
generated position, so groups keep their shape and spacing.
2026-11-07 16:36:23 -05:00
MaxsTechReview 7f0427b830 fix(input): L2/R2 keys stop overriding analog trigger axes (#2205)
fix(input): stop L2/R2 keys from overriding analog trigger axes

Pads such as the GameSir X2 Pro send KEYCODE_BUTTON_L2/R2 alongside
their analog trigger axes. Each key-down and every key repeat set the
trigger to full, and the next motion event set it back to the axis
value, so a held trigger jumped to full. Android repeats only the most
recently pressed key, so with both triggers held one side kept being
forced to full while the other tracked its axis.

When a device reports an analog axis for a trigger side (LTRIGGER or
BRAKE, RTRIGGER or GAS, or the wired Xbox Z/RZ layout), its key no
longer drives that trigger. Key repeats never change a trigger value.
Pads with digital-only triggers keep the key behaviour unchanged.
2026-11-07 15:48:41 -05:00
MaxsTechReview 2476c824f6 fix(dual-screen): docked handhelds switch to single-screen mode (#2232)
* fix(dual-screen): docked handhelds switch to single-screen mode

With Dual screen on Auto, a dual-screen handheld connected to a wired
external display (dock, HDMI or USB-C monitor) no longer puts the menu,
tabs or session controls on the built-in bottom screen, which nobody can
see while it sits in a dock. The launcher and sessions use the single-screen
layout on the main screen, which the external display mirrors. A bottom
panel opened automatically closes once when the dock is connected and comes
back after undocking.

XR glasses, virtual and overlay displays and switched-off displays do not
count as a dock, and Dual screen set to On keeps the bottom screen.

* fix(dual-screen): only an automatic bottom panel closes on docking, and glasses are told apart from the dock display

* fix(dual-screen): keep the automatic-panel state across activity recreation and reconcile docking before settling the panel
2026-11-07 15:48:17 -05:00
MaxsTechReview b474cba79e fix(dual-screen): bring back the trackpad and Deck panels on the second screen (#2229)
Keyboard + trackpad and Deck grips + trackpads are second-screen panels again, rendering the stock layouts without changing the input profile. The last panel is remembered separately for desktop and game sessions; desktop sessions start on the trackpad. A Deck panel without the Deck pad falls back to the default. Stock panels left Steam blue return to the neutral look once.
2026-11-07 14:36:30 -05:00
MaxsTechReviewandKurt Himebauch 98a670fb81 fix(input): classic on-screen gamepad look, quick hide toggle and adaptive sticks switch (#2215)
* fix(input): bring back the classic on-screen gamepad look, quick hide toggle and adaptive sticks switch

The unified input surfaces (#1439) drew the built-in gamepad as large
rounded boxes labelled with control names, swapped the compact keyboard
button for a wide pill, dropped the bottom-left show/hide toggle and left
the Adaptive sticks setting with no effect once a layout was migrated.

Gamepad elements are round again with shoulder pills, D-pad arrows, the
old glyph labels and the tint-derived fill and outline. The keyboard is a
small round button beside a restored quick show/hide toggle. Stick touch
areas reach 25% further outward while keeping their inner edge, and the
session menu gets an Adaptive sticks switch that writes the active
layout's sticks. Libraries saved by the first unified build are restyled
once without touching user edits or other layouts.

* fix(input): overlay keyboard opens on the main screen and the D-pad matches the face buttons

A keyboard command now carries the role of the surface that sent it, so the
overlay's keyboard button opens the main screen keyboard as before the
unified surfaces, while lower-screen and controller bindings still use a
second screen. The D-pad buttons take the face buttons' size and spacing,
and an untouched saved D-pad is resized around its own centre. Classic
outlines sit where the old ones did and shoulder labels use their old size.

* fix(input): keep edited D-pads and keyboard buttons, harden the quick and adaptive toggles

Resize a saved D-pad only while its four buttons keep their original geometry, and
replace the old keyboard button only while its name and shape are untouched.
The quick toggle needs its own press before a release toggles it, and a cancelled
touch does nothing. A rejected library write no longer crashes the session or
changes the controller preference, and the Adaptive sticks switch shows whenever
the built-in gamepad is the surface in use.

* fix(input): show the adaptive sticks switch while the unfolded controls are up

* fix(input): run the gamepad restyle as library version 10 and draw the quick toggle in Gray

* fix(input): show the adaptive sticks switch whenever the built-in gamepad is the surface in use

---------

Co-authored-by: Kurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com>
2026-11-07 12:42:45 -05:00
MaxsTechReview 6026d72435 fix(input): restore the neutral look of the bottom-screen controls (#2221) 2026-11-07 12:06:03 -05:00
Delete228 aff9738748 Preserve second-screen choices across partial selections and migration retries
Track explicit whole-profile choices, including Auto, separately from inherited profiles so physical and main-screen overrides do not suppress legacy panel migration. Persist this distinction in library version 8 and read older selection records compatibly.

Keep saved Deck panels during unavailable-controller fallbacks and retain legacy preferences when migration fails. Add regressions for all three review findings, explicit Auto selection and older saved libraries.

Validation: all 992 input/UI tests passed.
2026-11-07 02:44:47 +03:00
Delete228 c2d7765619 Fix desktop profile selection and simplify default touch layouts 2026-11-07 02:10:26 +03:00
Delete228 f44826ae3a Merge main and retain unified input behavior 2026-11-07 00:01:20 +03:00
Delete228 31b8adbb55 Guard shared input slots and mouse backend transitions 2026-11-06 23:56:30 +03:00
MaxsTechReview 5f180d909b fix(input): Click a touch stick only on a fast double tap (#2173)
* fix(input): Click a touch stick only on a fast double tap

* fix(input): Count the release position in stick tap travel

* fix(input): Treat cancelled pointer-ups as cancelled stick touches
2026-11-06 13:56:25 -05:00
MaxsTechReview 6060f2288f feat(wow): voice type and keyboard chat bar for World of Warcraft (#2171)
* Add voice and keyboard chat input for World of Warcraft

Open a chat bar with an editable text field when a WoW client focuses
a text box (reported by Proton's winex11 IME context hook through
agent/wine-ime.json). First use asks for Voice type or Android keyboard
with a remember toggle; the choice is also in the side menu's Keyboard
group while a WoW client runs. Voice type uses the device's speech
recognition service. On dual-screen devices the bar and keyboard open
on the second screen. Send types the text and presses Enter; Cancel
presses Escape.

* Cover the Arm64 WoW client in the chat match test

* Give the second-screen chat bar the session's result and back owners

* Open the WoW chat bar with the game field's current text

When the bar opens, select and copy the game's text field and fill the
bar with it through the session clipboard bridge, then put the guest
clipboard back. Send selects the field first, so the bar's text
replaces what was there instead of being appended.

* Keep WoW chat consistent across screen changes and failed field reads

Close the bar when the game field closes even after the program name
is cleared, move the bar to the top screen when the second screen drops
it, and drop any pending second-screen keyboard request when the bar
opens. A field read that gets no copy of its own leaves the game text
unselected and Send then types without replacing it. Ctrl is only
pressed and released when nothing else holds it, and a pending read
ends when the clipboard bridge stops.

* fix(session): Close WoW chat for other programs and keep the game cursor on cancelled reads
2026-11-06 12:17:37 -05:00
Delete228 915f373d82 Harden input migration and session lifecycle
Keep migration binding IDs stable, preserve unreadable libraries before recovery, and retain forward-version protection. Release keyboard owners on focus loss, handle unavailable settings displays, and allow controller confirmation or cancellation after physical key capture. Stop BLE routing and publication synchronously before asynchronous disconnect. Add regression coverage and record local and Thor validation.
2026-11-06 19:53:40 +03:00