Title: feat: add configurable keybinds for slash commands by al4xdev · Pull Request #217 · lessweb/deepcode-cli · GitHub
Open Graph Title: feat: add configurable keybinds for slash commands by al4xdev · Pull Request #217 · lessweb/deepcode-cli
X Title: feat: add configurable keybinds for slash commands by al4xdev · Pull Request #217 · lessweb/deepcode-cli
Description: Summary Add a keybinds settings field that maps keyboard shortcuts directly to slash command actions, so users can trigger commands like /exit, /new, /skills without typing /. Also adds a /keybind slash command for runtime management (add/remove/list) with --global flag support. Motivation Currently, all slash commands require typing /command + Enter. For frequent operations (exiting, starting a new session, opening the skills list), a keyboard shortcut is faster and more ergonomic. This feature lets users configure their own shortcuts and manage them at runtime. Design Configuration New top-level field settings.keybinds: { "keybinds": { "ctrl+e": "exit", "ctrl+n": "new", "ctrl+s": "skills", "ctrl+m": "model" } } Shortcut format: ctrl+key, ctrl+shift+key, or meta+key Action value: any slash command name or skill name Project settings override user settings per shortcut key KeybindsView shows [local]/[global] badges per shortcut Custom keybinds only fire when no dropdown/menu is open (avoids conflicts) Runtime management The /keybind slash command supports three subcommands: /keybind add ctrl+e exit /keybind --global add ctrl+m mcp /keybind remove ctrl+e /keybind --global remove ctrl+e /keybind list --global flag forces write to user-level settings; without it, writes to project settings if they exist. Changes are persisted to settings.json immediately and take effect without restarting. Files Changed File Description packages/core/src/settings.ts +29 -- KeybindMap type, normalize/merge, resolved settings packages/core/src/index.ts +1 -- export KeybindMap packages/core/src/tests/settings-and-notify.test.ts +54 -- keybind merge/normalize tests packages/cli/src/ui/core/keybinds.ts New -- parser module (42 lines) packages/cli/src/ui/core/slash-commands.ts +8 -- "keybind" kind + built-in command packages/cli/src/ui/views/PromptInput.tsx +157 -- keybind matchers memo, input integration, /keybind handler with --global packages/cli/src/ui/views/App.tsx +16 -- route /keybind, pass props to PromptInput packages/cli/src/ui/views/KeybindsView.tsx New -- read-only view with local/global badges (72 lines) packages/cli/src/ui/index.ts +1 -- barrel export packages/cli/src/tests/keybinds.test.ts New -- unit tests (121 lines) packages/cli/src/tests/slash-commands.test.ts +1 -- add "keybind" to built-in names docs/configuration.md +21 -- Chinese docs docs/configuration_en.md +21 -- English docs Verification npm run check -- typecheck 0 errors, lint 0 errors, format clean npm test -- all tests pass npm run build -- successful
Open Graph Description: Summary Add a keybinds settings field that maps keyboard shortcuts directly to slash command actions, so users can trigger commands like /exit, /new, /skills without typing /. Also adds a /keybind ...
X Description: Summary Add a keybinds settings field that maps keyboard shortcuts directly to slash command actions, so users can trigger commands like /exit, /new, /skills without typing /. Also adds a /keybind ...
Opengraph URL: https://github.com/lessweb/deepcode-cli/pull/217
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:3d41c0b4-9728-c694-d57f-eb7804643db6 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B326:389F6D:190AE:20AB2:6A4D7836 |
| html-safe-nonce | baf834d037bbd9bb0f265d3ca319c970da2e6bbfb5c670c475c71c9f89d5490a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMzI2OjM4OUY2RDoxOTBBRToyMEFCMjo2QTRENzgzNiIsInZpc2l0b3JfaWQiOiIyNTU4MzYxODU1MDY5MDkxODk0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | b217c21d41a0e1d82954eb3a0735bbf4a5f01cbc0fb912fd4bcd5a5ef647f7e4 |
| hovercard-subject-tag | pull_request:3967465428 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/lessweb/deepcode-cli/pull/217/files |
| twitter:image | https://avatars.githubusercontent.com/u/76815370?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/76815370?s=400&v=4 |
| og:image:alt | Summary Add a keybinds settings field that maps keyboard shortcuts directly to slash command actions, so users can trigger commands like /exit, /new, /skills without typing /. Also adds a /keybind ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7f8e15305e2ab58890ca84b830615e375f5df303cf471cafcba0c08272981be3 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/lessweb/deepcode-cli git https://github.com/lessweb/deepcode-cli.git |
| octolytics-dimension-user_id | 118287711 |
| octolytics-dimension-user_login | lessweb |
| octolytics-dimension-repository_id | 1223512305 |
| octolytics-dimension-repository_nwo | lessweb/deepcode-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1223512305 |
| octolytics-dimension-repository_network_root_nwo | lessweb/deepcode-cli |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8608b0750fc35e283e5ec5b094bff942d7a0e197 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width