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

Zoom out: Keyboard shortcut not working on Windows #66449

Closed
t-hamano opened this issue Oct 25, 2024 · 3 comments · Fixed by #66506
Closed

Zoom out: Keyboard shortcut not working on Windows #66449

t-hamano opened this issue Oct 25, 2024 · 3 comments · Fixed by #66506
Assignees
Labels
[Feature] Zoom Out Needs Testing Needs further testing to be confirmed. OS Issues Issues or PRs that are related to OS specific problems [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@t-hamano
Copy link
Contributor

t-hamano commented Oct 25, 2024

What problem does this address?

#66400 added a shortcut to toggle zoom out, but the shortcut (Ctrl+Shift+0) for Windows OS may not be working.

I would appreciate it if you could test whether this is a problem only with my environment or a problem with the Windows OS.

@carolinan @alexstine @torounit I assume you are using Windows OS, so I would appreciate it if you could test it.

What is your proposed solution?

If this is a problem on Windows OS, I would like to suggest a different key combination:

Can we use this key as a zoom out shortcut? Shortcut Description Apps where this shortcut is used
Shift + 0 (shift + 0) It works https://defkey.com/what-means/shift-0
Alt + 0 (alt + 0) It works https://defkey.com/what-means/alt-0
Ctrl + Alt + 0 (primaryAlt + 0) It works https://defkey.com/what-means/alt-ctrl-0
Ctrl + Shift + Alt + 0 (secondary + 0) It works https://defkey.com/what-means/ctrl-alt-shift-0
Ctrl + 0 (primary + 0) At least in Chrome and Firefox this combination is not allowed as it is used to reset the browser zoom level. -
Ctrl + Shift + 0 (primaryShift + 0) This is the current shortcut, but it may not work as explained in this issue. -
Shift + Alt + 0 (access + 0) This combination is not allowed because it converts a heading block into a paragraph block. -

Screenshots, screen recording, code snippet

In this video, you can see that the key down event (event.key) itself is not fired by the key combination.

  • 0: Key down event occurs and evnet.key is 0.
  • Shift + 0: Key down event occurs, but evnet.key is the alternate key, ).
  • Ctrl + 0: Key down event occurs and evnet.key is 0.
  • Shift + Ctrl + 0: Key down event doesn't occur.
8a2d74715234b363b2498a8dd32405ef.mp4
@t-hamano t-hamano added [Feature] Zoom Out [Type] Bug An existing feature does not function as intended Needs Testing Needs further testing to be confirmed. OS Issues Issues or PRs that are related to OS specific problems labels Oct 25, 2024
@torounit
Copy link
Member

torounit commented Oct 25, 2024

I was able to reproduce the same issue in Firefox and Chrome on Windows.

I checked using https://w3c.github.io/uievents/tools/key-event-viewer.html and it seems that shift + ctrl + 0 does not trigger a keydown event. But keyup fired.

Also, shift + alt + ctrl + 0 / shift + alt + ctrl + [1-9] fires the keydown event.

@torounit
Copy link
Member

The problem of ctrl + shift + 0 not working seems to be a frequently observed problem in the Japanese environment of Windows.

https://jp.finalfantasyxiv.com/lodestone/character/8356239/blog/2960768/
https://nj-clucker.com/excel/ctrl-shift-0-not-working/
https://yashihei.hatenablog.com/entry/2019/03/18/235304

@t-hamano
Copy link
Contributor Author

Thanks for looking into it. To reproduce this issue, I think both of the following conditions must be met:

  • IME (Input method editor) is installed on the Windows OS. Whether IME is installed or not seems to depend on the OS language
  • The OS shortcut for switching input languages ​​is enabled

Below is an English article that mentions this issue:

Solved - Can't use Ctrl+Shift+0 (Windows has it) | Windows 8 Help Forums

In any case, it is not guaranteed that switching the zoom out mode with the "Ctrl + Shift + 0" shortcut will always work on the Windows OS, so I think we need to assign a different shortcut.

@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Oct 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Zoom Out Needs Testing Needs further testing to be confirmed. OS Issues Issues or PRs that are related to OS specific problems [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants