Skip to content

feat: controller shortcut for Windows' Task View - #188

Merged
lippdev merged 5 commits into
mainfrom
feat/task-view-shortcut
Nov 1, 2026
Merged

lippdev merged 5 commits into
mainfrom
feat/task-view-shortcut

Conversation

@lippdev

@lippdev lippdev commented Nov 1, 2026 •

Copy link
Copy Markdown
Owner

What

A fourth controller shortcut (ShortcutSlot.TaskView, config taskViewShortcut) that does what Win + Tab does: opens Windows' Task View, in a session or outside one (the watcher runs whenever Console Mode is open, tray included). Asked by the owner: holding the Xbox button used to bring up Task View on this PC and no longer does.

  • Driving Task View: Windows already moves Task View with an Xbox (XInput) controller, so those are left to it (driving them too doubled every move, reported by the owner). A PlayStation controller, which Windows doesn't understand there, is driven from here (Services/TaskViewDriver, Sony HID on its own thread, no focus needed): D-pad / left stick → arrows (held = repeat, 420 ms then every 140 ms), ✕ → Enter, ○ → Esc. Optional: System → Controller → Move around Task View with a PlayStation controller (taskViewPlayStation, default on; off for DS4Windows / Steam Input users whose pad is also an Xbox one). The shortcut again sends Esc for any pad. Services/TaskViewKeys holds the pure rules (tested): nothing counts until every button is let go once, A/B once per press, D-pad over stick, stick along its stronger axis past 0.55.
  • Safety: it stops when Task View closes by any means (foreground changes from the window it settled on), after 2 minutes, or at once if Task View never took the foreground within 350 ms, so A never becomes Enter in the game behind it.
  • The controller mouse is paused while it drives Task View; an open session menu closes first.
  • On by default as Select + X (owner's request): AppConfig.TaskViewShortcut defaults to Back | X, so an older config without the field gets it too; turned off (0) it stays off, and one colliding with another shortcut is dropped by the existing load rule. Changed in System → Controller → Controller shortcut for Task View, and a fourth card in the shortcut editor.
  • Hint toast, the first three uses: nothing of ours can be drawn over Task View (Windows puts it above every always-on-top window; a test topmost window only showed up as one more window in its list), so the toast comes first — "Task View · D-pad or stick picks a window · A opens · B closes" with the pad's own buttons — and Task View opens 1.6 s later. From the fourth use it opens at once (taskViewHintsShown). The Xbox button alone is allowed as usual and is a 600 ms hold here; it can't be shared with the Home shortcut (existing collision rule).
  • Strings in the six catalogs; Windows' own names for the view (Visão de tarefas, Vista de tareas, Aktive Anwendungen, Affichage des tâches, Представление задач).

Tests

  • dotnet test: 671 passed (new TaskViewKeysTests and a default test in AppConfigTests; the ControllerShortcutsTests helper gained the fourth slot).
  • Run on this PC with the debug build and a temporary trigger (not committed): an old config came in with taskViewShortcut 16416 (Back + X); the toast showed in the corner; Task View opened 1.6 s later (foreground XamlExplorerHostIslandWindow, the toast not listed in it); Esc closed it and the driver let go (controle solto (fechada)). Driving it with a real pad is in docs/TESTING.md (Atalho da visão de tarefas).

Build on Windows also left to CI.

🤖 Generated with Claude Code

lippdev and others added 2 commits November 1, 2026 02:39
A fourth controller shortcut, set in System -> Controller like the others,
does what Win + Tab does: it opens Windows' Task View, in a session or not.
While it is open the pad drives it (TaskViewDriver, on its own thread, XInput
and Sony HID): the D-pad or the left stick send arrow keys (a held direction
repeats), A sends Enter and B Escape, and the shortcut again closes it.
Nothing counts until the shortcut's buttons are let go (TaskViewKeys). It
stops when Task View closes by any means, after two minutes, or at once if
Task View never took the foreground, so the pad never types into the game.
The controller mouse waits meanwhile; the session menu closes first.

Suggested combo: Select + X (free of the other three). The Xbox button
alone works as a held shortcut (600 ms) when it isn't the Home shortcut.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…list (#188)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

The foreground check can mistake an unrelated window for Task View and send controller input to it.

Reviewed changes The review covers the Task View shortcut, controller-driven navigation, configuration and UI wiring, translations, tests, and documentation.

  • Shortcut and driver: Adds a configurable controller shortcut that opens Task View and maps controller navigation and A/B to keyboard input.
  • Configuration and UI: Adds the fourth shortcut slot, settings/editor presentation, and translations across all catalogs.
  • Verification and docs: Adds tests for pure input rules and manual checks in the guides and testing checklist.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-6-luna | 𝕏

why = "não ficou em primeiro plano";
break;
}
view = foreground;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A changed foreground HWND is not proof that Task View took focus: if another window steals focus during the 350 ms settle period, this accepts it as view and sends the subsequent controller keys there, including Enter/Escape. Please only start driving after confirming the foreground window is Task View; otherwise stop without injecting input.

Technical details
# Confirm Task View owns the foreground before injecting controller input

## Affected sites
- `src/ConsoleMode/Services/TaskViewDriver.cs:75-82` — accepts any foreground HWND other than the original as Task View, then `Run` sends navigation and activation keys while that HWND remains foreground.

## Required outcome
- Do not send controller-generated keyboard input unless Task View is confirmed to be the active target; abort safely if that cannot be confirmed.

…imes

The shortcut now comes set to Select + X (the config default), also for a
config saved before it existed; turned off, it stays off, and one that
collides with another shortcut is dropped as before.

Nothing of ours can show over Task View (Windows draws it above every
always-on-top window; a test topmost window only became one more window in
its list), so the first three uses show the hint first: a toast with the
buttons of the pad in use ("D-pad or stick picks a window - A opens - B
closes") and Task View 1.6 s later. From the fourth use it opens at once.
The count is saved (taskViewHintsShown).

Checked with the debug build: an old config came in with 16416 (Back + X),
the toast showed, Task View opened 1.6 s later (foreground
XamlExplorerHostIslandWindow, the toast not in its list), and Esc closed it
and released the pad ("controle solto (fechada)").

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ No new issues found in this delta; the prior foreground-target concern remains open.

Reviewed changes Reviewed the changes since the prior Pullfrog review: enabling Task View by default and adding a persistent first-use hint before it opens.

  • Default shortcut: Made Select + X the default for new and existing configs while keeping an explicit off setting.
  • First-use guidance: Added a localized hint before Task View on the first three uses and persisted the count.
  • Docs and tests: Updated translated guides, changelogs, the test checklist, and the config-default test.

Pullfrog  | Fix it ➔ | View workflow run | Using gpt-6-luna | 𝕏

…optional

Windows already moves Task View with an Xbox (XInput) controller, so the
driver sending arrows for it too made every move happen twice (reported by
the owner). TaskViewDriver now reads only Sony HID pads, which Windows
doesn't understand there, and only while System -> Controller -> "Move around
Task View with a PlayStation controller" is on (default on; off for anyone
whose DS4Windows or Steam Input also turns the pad into an Xbox one). The
shortcut, the hint toast, closing with the shortcut again and the paused
controller mouse are unchanged for every pad.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ No new issues found in this delta; the prior foreground-target concern remains open.

Reviewed changes Reviewed the changes since the prior Pullfrog review: controller navigation was split between Windows' native Xbox handling and optional PlayStation input from Console Mode.

  • Controller ownership: Removed XInput key injection to avoid duplicating Windows' native Xbox navigation, and added an enabled-by-default setting for the PlayStation HID driver.
  • Settings and guidance: Wired the option through config, the controller settings UI, all catalogs, translated guides, changelogs, and manual test steps.

Pullfrog  | Fix it ➔ | View workflow run | Using gpt-6-luna | 𝕏

# Conflicts:
#	CHANGELOG.en-US.md
#	CHANGELOG.md
@lippdev
lippdev merged commit 6015214 into main Nov 1, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant