Skip to content

Fix / search shortcut on shifted layouts and Firefox - #3227

Open
mmustafasenoglu wants to merge 1 commit into
rust-lang:mainfrom
mmustafasenoglu:fix/search-slash-shift
Open

mmustafasenoglu wants to merge 1 commit into
rust-lang:mainfrom
mmustafasenoglu:fix/search-slash-shift

Conversation

@mmustafasenoglu

Copy link
Copy Markdown
Contributor

On layouts like AZERTY where / needs Shift, the global key handler bailed out on e.shiftKey before ever checking for /, so search never opened. This exempts / from the Shift guard while still respecting Ctrl/Alt/Meta. Once the shortcut reaches the handler, the existing preventDefault() also stops Firefox from opening Quick Find instead.

Fixes #3199

@rustbot rustbot added the S-waiting-on-review Status: waiting on a review label Sep 18, 2026
e.ctrlKey ||
e.metaKey ||
e.shiftKey ||
(e.shiftKey && e.key !== '/') ||

@GuillaumeGomez GuillaumeGomez Sep 22, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we can remove the shiftKey check completely.

View changes since the review

@GuillaumeGomez GuillaumeGomez left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Also needs a GUI test.

View changes since this review

@rustbot rustbot added S-waiting-on-author Status: The marked PR is awaiting some action (such as code changes) from the PR author. and removed S-waiting-on-review Status: waiting on a review labels Sep 22, 2026
@rustbot

rustbot commented Sep 22, 2026

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-author Status: The marked PR is awaiting some action (such as code changes) from the PR author.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Search shortcut "/" is unreachable on Firefix and on keyboard layouts where "/" requires Shift (AZERTY, QWERTZ, etc.)

3 participants