fix(desktop): support JIS keyboard zoom shortcut - #38904
Draft
katanumahotori wants to merge 1 commit into
Draft
Conversation
Co-Authored-By: OpenAI <support@openai.com>
teknium1
reviewed
Jul 14, 2026
teknium1
left a comment
Contributor
There was a problem hiding this comment.
Thanks for identifying the Shift guard in the zoom fallback. The premise still exists on current main: apps/desktop/electron/main.ts:4809 returns before handling any Shift-modified shortcut.
Problems
- The PR edits
apps/desktop/electron/main.cjs, but that file was renamed toapps/desktop/electron/main.tsby39d09453f; current main has no trackedmain.cjs. The patch therefore needs a manual port tomain.ts:4806. - The added JIS/numpad key paths have no focused test coverage.
apps/desktop/electron/zoom.test.tscurrently covers helpers and wiring, notbefore-input-eventkey/modifier recognition.
Suggested changes
- Port the widened zoom-in predicate to
apps/desktop/electron/main.ts, retainingsetAndPersistZoomLevelat lines 4817-4823. - Add coverage for shifted
;/:,=,+,Add, and rejected shifted reset/zoom-out combinations.
Automated hermes-sweeper review.
| const key = input.key | ||
| if (key === '0') { | ||
| const key = String(input.key || '') | ||
| const isZoomReset = key === '0' && !input.shift |
Contributor
There was a problem hiding this comment.
Current main no longer tracks main.cjs: commit 39d09453f renamed it to apps/desktop/electron/main.ts. Please port this predicate to the current installZoomShortcuts handler there, preserving its setAndPersistZoomLevel calls.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds JIS/Japanese keyboard-friendly zoom-in handling to the desktop zoom shortcut fallback.
The existing desktop zoom shortcut handler (from #37894) rejects all shifted inputs. On JIS keyboards, typing
+commonly requires Shift, and Electron can surface that physical key path as;or:depending on the layout/input state. This means Windows users on Japanese keyboards can still miss the zoom-in shortcut even thoughCtrl+-andCtrl+0work.This PR keeps the existing zoom behavior and only broadens zoom-in recognition:
Ctrl+=,Ctrl++, and numpadAddas zoom-in;/:as zoom-in for JIS/Japanese keyboards-0Related
Follow-up to #37894 and related to #37917 / #37619. I also checked for existing Japanese/JIS-specific issues or PRs and did not find a duplicate.
Validation
node --check apps/desktop/electron/main.cjspython -m hermes_cli.main desktop --build-onlyapps/desktop/release/win-unpacked/Hermes.exeexists and launches on Windows