Skip to content

fix(#2138): dismiss window switcher on modifier release for custom shortcuts#2144

Open
thmsnhl wants to merge 1 commit intopop-os:masterfrom
thmsnhl:fix/issue-2138-fix-custom-shortcuts-for-switching-windows
Open

fix(#2138): dismiss window switcher on modifier release for custom shortcuts#2144
thmsnhl wants to merge 1 commit intopop-os:masterfrom
thmsnhl:fix/issue-2138-fix-custom-shortcuts-for-switching-windows

Conversation

@thmsnhl
Copy link

@thmsnhl thmsnhl commented Feb 27, 2026

The window switcher previously only auto-dismissed (activating the selected window) when the Super key was released, which was hardcoded specifically for the default Super+Tab binding. Custom shortcuts using other modifier keys (e.g. Ctrl+Tab) would leave the switcher open after key release, requiring the user to manually click a window or press a number key to confirm the selection.

This fix extends the auto-dismiss-on-release behavior to any custom window-switcher shortcut: when the trigger modifier(s) are released, the switcher now activates the highlighted window and closes, matching the behavior of the built-in Super+Tab binding.

Fixes #2138

The code has been written in collaboration with Claude Code Opus 4.6, in order to for me to understand the repository and code structure of Pop!_OS. I Tested it on my own machine running the latest stable build of Pop!_OS.

  • I have disclosed use of any AI generated code in my commit messages.
    • If you are using an LLM, and do not fully understand the changes it is making to the code base, do not create a PR.
    • In our experience, AI generated code often results in overly complex code that lacks enough context for a proper fix or feature inclusion. This results in considerably longer code reviews. Due to this, AI authored or partially authored PRs may be closed without comment.
  • I understand these changes in full and will be able to respond to review comments.
  • My change is accurately described in the commit message.
  • My contribution is tested and working as described.
  • I have read the Developer Certificate of Origin and certify my contribution under its conditions.

The window switcher previously only auto-dismissed (activating the
selected window) when the Super key was released, which was hardcoded
specifically for the default Super+Tab binding. Custom shortcuts using
other modifier keys (e.g. Ctrl+Tab) would leave the switcher open after
key release, requiring the user to manually click a window or press a
number key to confirm the selection.

This fix extends the auto-dismiss-on-release behavior to any custom
window-switcher shortcut: when the trigger modifier(s) are released,
the switcher now activates the highlighted window and closes, matching
the behavior of the built-in Super+Tab binding.

Fixes pop-os#2138

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@thmsnhl thmsnhl force-pushed the fix/issue-2138-fix-custom-shortcuts-for-switching-windows branch from 97e1661 to 8721c51 Compare March 1, 2026 07:40
@Drakulix
Copy link
Member

I don't think this is a particularly good solution to the problem, as we are duplicating logic across cosmic-launcher and cosmic-comp. cosmic-launcher should rather track the modifier state on it's invocation to handle different shortcuts or read the shortcuts file from cosmic-comp to figure out the state.

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.

[Bug] Custom shortcuts for "Switch between open windows" don't auto-dismiss on modifier release

2 participants