Repository navigation
Keyboard layouts: Norton Commander (default), Total Commander, Rust Commander - #39
Merged
Merged
Conversation
x509-cert 0.3 (Dependabot, merged) made the TBS certificate fields private; use the accessor methods instead so rc-core compiles again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017w9FQmmTGCmcWdHRoM2wue
…ommander Rust Commander now offers keyboard layouts. The default is the original Norton Commander layout (1Help 2Menu 3View 4Edit 5Copy 6RenMov 7Mkdir 8Delete 9PullDn 10Quit, Alt+F1/F2 drive, Alt+F3-F7, Ctrl+F3-F6 sorting, Ctrl+O, Ctrl+U, Alt+letter quick search). Total Commander's layout is available too (F2 reread, Shift+F6 rename, Ctrl+D hotlist, Ctrl+S filter, Alt+Down history, Ctrl+Left/Right, Ctrl+Alt+letter quick search), and the previous layout stays selectable as "Rust Commander". - lib/keymaps.ts: the layouts as pure data plus key-event helpers - actions/commands.ts: command registry (run, labels, availability) - function key bar above the status bar with Shift/Ctrl/Alt layers - menus, toolbar, context menu and the F1 list follow the active layout - setting "keymap" (default "norton") and "showKeyBar" in settings.json; View menu, Preferences and the F1 dialog switch the layout - F10 / Alt+F4 quit the desktop app (with confirmation) - unit and smoke tests, docs Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017w9FQmmTGCmcWdHRoM2wue
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
Feature request: Rust Commander offers keyboard layouts, with the original Norton Commander layout as the default and Total Commander as an alternative. The previous layout stays selectable as Rust Commander.
Layouts
Keys the originals leave free keep Rust Commander's extra functions (terminal, sync, Remote Explorer, fingerprints …); the help marks them with *. Functions the originals have and Rust Commander doesn't (DOS command line, info/quick-view panels, panels on/off, folder tabs) stay unassigned.
UI
1Help 2Menu 3View …), switches to the Shift/Ctrl/Alt layer while a modifier is held, clickable; hidden on phones, toggle in View and Preferences.Implementation
ui/src/lib/keymaps.ts– layouts as pure data + key-event helpers (unit-testable)ui/src/actions/commands.ts– command registry (run, label, key bar label, availability)ui/src/actions/shortcuts.ts– global handler now resolves keys through the active layoutkeymap(default"norton") andshowKeyBar(defaulttrue) insettings.json; existing files without the fields get the defaultscore:window:allow-closecapability so F10 / Alt+F4 can quit the desktop app (with confirmation, warns about unsaved editor changes)Note: separate build fix
maindoesn't compile since the merged Dependabot bump ofx509-certto 0.3 (TBS certificate fields became private). The first commit switchesrc-core/src/protocols/tls.rsto the accessor methods; it's needed for this PR's CI.Behaviour change
The default layout changes for existing users: e.g. F2 opens the user menu instead of renaming (rename: Shift+F6), F9 opens the menu bar instead of refreshing (Ctrl+R still works). Choosing the "Rust Commander" layout restores the old keys exactly (pinned by a unit test).
Test plan
npm run build(tsc + vite)npm run test:unit: 19 tests, 7 new for the layouts (every combination canonical, NC/TC key bars and layers, old layout unchanged, quick search incl. macOS Option)node tests/smoke.mjs: all steps pass; rename step updated to Shift+F6; new steps: NC key bar + Alt layer, F2 user menu, F9 menu + focus return, Alt+F2, Alt+letter search; TC via the View menu, Ctrl+D hotlist, Alt+↓ history, F1 list + switching backcargo fmt --all --check,cargo clippy -p rc-core -p rc-api --all-targets -D warnings,cargo test -p rc-api(new test: settings withoutkeymapdefault to Norton Commander)Generated by Claude Code