Skip to content

Add a keyboard shortcut that reveals and focuses the dock - #50812

Merged
Michael Jolley (michaeljolley) merged 2 commits into
mainfrom
dev/mjolley/dock-focus-shortcut
Sep 28, 2026
Merged

Michael Jolley (michaeljolley) merged 2 commits into
mainfrom
dev/mjolley/dock-focus-shortcut

Conversation

@michaeljolley

@michaeljolley Michael Jolley (michaeljolley) commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

What's going on

The dock is mouse-only today. Set it to auto-hide and it gets worse, because you have to remember which edge to shove the pointer at before you can click anything. Keyboard users had no way in at all.

This change adds a Win+Alt+J default dock activation/focus binding. The dock must be enabled for this to apply, but if it is, the keybinding:

  • Makes visible a hidden dock and sets focus on the first button
  • Hitting the keybind when the dock is focused will hide a dock that should be hidden and gives focus back to the window you came from.

Closes #45595
Closes #50540

Video? Video!

Dock with auto-hide turned on. Me hitting Win+Alt+J

Recording.2026-09-27.174659.mp4
@github-actions github-actions Bot added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something Product-Command Palette Refers to the Command Palette utility labels Sep 27, 2026
@github-actions

This comment was marked as resolved.

@github-actions github-actions Bot added Ready for review and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Sep 27, 2026
The dock could only be reached with the mouse. If it was set to auto-hide, you
had to know where to shove the pointer to get it back. Now Win+Alt+D reveals it,
puts keyboard focus on the first item, and a second press hands focus back to
where you were. The binding is editable on the Dock settings page.

Escape backs out of the dock the same way a second press does. An auto-hide dock
holds still while it has focus so it can't slide out from under you mid-keypress.

Closes #45595
Closes #50540

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c01c4df3-a6f1-422d-a063-c865cc9c2d2a
Windows 11 already owns Win+Alt+D for the taskbar clock, so RegisterHotKey
failed and the shortcut silently did nothing. Win+Alt+J keeps the same
modifiers as the palette shortcut and isn't claimed by Windows.

Also focus the first dock item with FocusState.Keyboard. Programmatic focus
draws no focus rect, so on a pinned dock a working shortcut still looked dead.

Log a warning when hotkey registration fails so the next collision is easy
to spot.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c01c4df3-a6f1-422d-a063-c865cc9c2d2a
@jiripolasek

Copy link
Copy Markdown
Collaborator

Michael Jolley (@michaeljolley) Do you really want to close #50540 as well?

@michaeljolley

Copy link
Copy Markdown
Contributor Author

Michael Jolley (Michael Jolley (@michaeljolley)) Do you really want to close #50540 as well?

I did, yes. But I just re-read. They say two different things and I was focused on the first:

The ability to bind a keyboard shortcut to hide/show the Command Palette dock.

In my case, I use the keyboard shortcut to enable the dock when working on a project and use the keyboard shortcut to disable the dock while playing a game (since I would not want it to appear while playing), eliminating the need to open PowerToys settings to disable it manually.

That's two separate things. This PR uses a keybind to show/hide and focus but won't disable. In fact, I don't think we'll do a keybind to toggle enable/disable. So, this closes his first sentence, and we won't do the second. I mean, I guess that means it's closed but we need to tell the OP.

@michaeljolley
Michael Jolley (michaeljolley) merged commit 2bbc84c into main Sep 28, 2026
10 checks passed
@michaeljolley
Michael Jolley (michaeljolley) deleted the dev/mjolley/dock-focus-shortcut branch September 28, 2026 21:04
Michael Jolley (michaeljolley) added a commit that referenced this pull request Sep 29, 2026
The dock focus shortcut from #50812 was registered as a global hotkey
even when the dock was turned off, so Win+Alt+J got claimed for
something that couldn't do anything.

## The plan

- Only register the dock focus hotkey when the dock is enabled.
- Treat `EnableDock` as a hotkey-relevant setting so turning the dock on
or off re-registers hotkeys right away.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Product-Command Palette Refers to the Command Palette utility Ready for review

3 participants