feat: support user keybindings TOML#1802
Closed
Whamp wants to merge 3 commits into
Closed
Conversation
nwparker
self-requested a review
May 14, 2026 08:35
Contributor
|
Will try to take a look in the next 1-2 days This has def gotten brought up a few times and I think it makes sense and I'd love to solve it soon. Thanks for the PR 🫡 |
# Conflicts: # src/main/browser/browser-guest-ui.ts # src/main/browser/browser-manager.ts # src/main/index.ts # src/main/ipc/register-core-handlers.test.ts # src/main/ipc/register-core-handlers.ts # src/main/window/createMainWindow.ts # src/preload/api-types.ts # src/preload/index.ts # src/renderer/src/App.tsx # src/renderer/src/components/Terminal.tsx # src/renderer/src/components/settings/ShortcutsPane.tsx # src/renderer/src/components/terminal-pane/TerminalPane.tsx # src/renderer/src/components/terminal-pane/keyboard-handlers.ts # src/renderer/src/components/terminal-pane/xterm-bypass-policy.test.ts # src/renderer/src/components/terminal-pane/xterm-bypass-policy.ts # src/renderer/src/store/index.ts # src/renderer/src/store/slices/diffComments.test.ts # src/renderer/src/store/slices/store-session-cascades.test.ts # src/renderer/src/store/slices/store-test-helpers.ts # src/renderer/src/store/slices/tabs.test.ts # src/renderer/src/store/types.ts
This was referenced May 21, 2026
Contributor
|
Hey @Whamp I took at look at this, thanks alot for it! I did a bigger pass and also did the UX editor as well as JSON support Let me know if that resolves things! I hope so! |
Contributor
Author
|
Fantastic thanks for the review. |
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 user-configurable keybindings backed by a hand-edited TOML file. Yes it's kind of a massive PR . . .
~/.orca/keybindings.tomlon macOS/Linux and%USERPROFILE%\.orca\keybindings.tomlon Windows.Background and scope
This PR was not requested. Don't feel obligated to merge it if keyboard rebinding is out of scope for Orca right now, or if you would rather continue through another branch. I opened it as my best attempt to match the scope discussed in prior work and so that i could make orca functional on my linux system since the hardcoded keybindings were causing havoc.
Behavior notes
"none".Visual change
Settings > Shortcuts now includes the config path, Open/Reveal/Reload actions, diagnostics, source labels, and the effective keybinding list.
AI code review summary
Cross-platform compatibility: checked shortcut platform handling, labels, and paths. The implementation maps Node platforms to
macos,linux, andwindows, usespath.joinfor the user config path, keeps Windows display paths explicit, preserves platform-specific defaults in the catalog, and keeps Electron menu accelerators on platform-aware paths.Security: checked local file parsing and IPC exposure. The TOML file is read from the user's home directory only, parsed with
smol-toml, never evaluated, and invalid entries are ignored with diagnostics. The new IPC surface returns keybinding snapshots, reloads the local config, and opens/reveals the local config file; it does not expose secrets or run user-supplied commands.Testing
pnpm lint(passes with existing warnings in unrelated GitHub project components)pnpm run typecheck:nodepnpm run typecheck:webpnpm run build(build passed; local dev CLI symlink creation under/usr/local/binreported permission denied but exited successfully)pnpm vitest run --config config/vitest.config.ts src/shared/keybindings/*.test.ts src/shared/window-shortcut-policy.test.ts src/main/keybindings/*.test.ts src/main/ipc/keybindings.test.ts src/main/menu/register-app-menu.test.ts src/main/browser/browser-guest-ui.test.ts src/renderer/src/components/terminal/app-shell-shortcut-policy.test.ts src/renderer/src/components/terminal-pane/terminal-shortcut-policy.test.ts src/renderer/src/components/terminal-pane/terminal-paste-keybinding.test.ts src/renderer/src/components/terminal-pane/xterm-bypass-policy.test.ts src/renderer/src/store/slices/keybindings.test.tspnpm run test:e2e -- tests/e2e/keybindings-config.spec.tspnpm testwas attempted locally, but unrelated orchestration/runtime tests failed because the checked-outbetter-sqlite3native module was built for a different Node ABI (NODE_MODULE_VERSION 145vs local Node's137). The keybinding-specific suite above passed.X handle: @hampsonw