Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pop-up window showing the keyboard shortcuts #2608

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

szabgab
Copy link
Contributor

@szabgab szabgab commented Mar 21, 2025

Make it display when the user presses ?.

Implements #2607

@rustbot rustbot added the S-waiting-on-review Status: waiting on a review label Mar 21, 2025
@ehuss
Copy link
Contributor

ehuss commented Mar 31, 2025

Thanks! Would it be possible to update the styling for some of the dark themes? Right now it is unreadable there:

image

Also, can you resolve the conflicts?

@shenef
Copy link

shenef commented Apr 1, 2025

How would a regular user know about the ? shortcut without seeing the list of shortcuts? (Edit: checking a bunch of websites, github was the only one that reacts to pressing ?)

Looking at the code, it seems like the shortcut is only active when shift is being held. On custom keyboard layouts the user might not have to press shift to write ? which in turn would make the shortcut inaccessible. (specifying "custom" here cause I, at a glance, wasn't able to find a language/region specific layout where that is the case)

@szabgab
Copy link
Contributor Author

szabgab commented Apr 1, 2025

I thought if this is accepted then I'd suggest to also add an icon to the menu to show a question mark.

You are right about the shift. I'll have to check how to catch ? in general also on keyboards where it might not require pressing down the Shift key, though maybe we can postpone that to when someone has such a case. (I wonder what happens when CapsLock is pressed and then some presses that key.)

szabgab added 2 commits April 2, 2025 17:50
Make it display when the user presses `?`.

Implements rust-lang#2607
Also handle the ? key with or without shift being pressed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: waiting on a review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants