Mirror VS Code workbench shortcuts in terminal#112
Merged
Conversation
Code: derive the host-side allowlist Set from the new VSCODE_WORKBENCH_COMMANDS const in vscode-keybindings.ts (and the VSCodeWorkbenchCommand type from it too), so the command list is no longer enumerated separately in message-router.ts. Detection: drop isVSCodePlatform() and gate the keydown handler on the presence of getPlatform().runWorkbenchCommand, matching the existing openExternal?.() optional-method escape-hatch pattern. Docs: enumerate the mirrored chords only in vscode.md (which names the code source of truth); layout.md, shortcuts.md, and transport.md now link there instead of re-listing the keys. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Deploying mouseterm with
|
| Latest commit: |
e878eb8
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://0a141d93.mouseterm.pages.dev |
| Branch Preview URL: | https://vscode-shortcuts.mouseterm.pages.dev |
Collaborator
dormouse-bot
left a comment
There was a problem hiding this comment.
Reviewing as a draft — flagging anything that looks worth a quick fix. Mark ready for a full review.
One observation on the F1 branch — see inline.
Co-authored-by: dormouse-bot <ned.twigg+dormouse-bot@diffplug.com>
dormouse-bot
approved these changes
May 28, 2026
Collaborator
dormouse-bot
left a comment
There was a problem hiding this comment.
Looks good — F1 modifier guard fix is correct and the doc updates are thorough.
One small follow-up: the latest commit pins the bug behavior (Shift+F1 no longer mirrors), but the test file doesn't yet have a case for it — easy to drop the new !event.shiftKey guard in a future refactor without anything failing. Suggested addition inline.
|
|
||
| expect(vscodeWorkbenchCommandForKeydown(keydown({ key: 'r', code: 'KeyR', ctrlKey: true }), opts)).toBe(null); | ||
| expect(vscodeWorkbenchCommandForKeydown(keydown({ key: 'c', code: 'KeyC', ctrlKey: true }), opts)).toBe(null); | ||
| expect(vscodeWorkbenchCommandForKeydown(keydown({ key: 'p', code: 'KeyP', ctrlKey: true, altKey: true }), opts)).toBe(null); |
Collaborator
There was a problem hiding this comment.
Pin the fix from e878eb8 with a regression test so the !event.shiftKey guard on the F1 branch isn't silently dropped later.
Suggested change
| expect(vscodeWorkbenchCommandForKeydown(keydown({ key: 'p', code: 'KeyP', ctrlKey: true, altKey: true }), opts)).toBe(null); | |
| expect(vscodeWorkbenchCommandForKeydown(keydown({ key: 'p', code: 'KeyP', ctrlKey: true, altKey: true }), opts)).toBe(null); | |
| expect(vscodeWorkbenchCommandForKeydown(keydown({ key: 'F1', code: 'F1', shiftKey: true }), opts)).toBe(null); |
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
dormouse:runWorkbenchCommandbridge for Quick Open, Command Palette, and sidebar toggleVerification
pnpm.cmd --filter dormouse-lib test src/lib/vscode-keybindings.test.ts src/lib/platform/vscode-adapter.test.tspnpm.cmd --filter dormouse-lib buildpnpm.cmd --filter dormouse buildpnpm dogfood:vscode