Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ SFTP · SCP · FTP/FTPS · WebDAV · S3 · Azure · Google Cloud Storage — on
<td width="50%" valign="top">

### 🗂️ Classic commander, modern feel
Two panels, session tabs, bookmarks, drag & drop and full keyboard control
(F2–F8, Ins, Ctrl+…). Light and dark theme, English and German.
Two panels, session tabs, bookmarks, drag & drop and full keyboard control with the
**original Norton Commander layout** and function key bar — or Total Commander's.
Light and dark theme, English and German.

</td>
<td width="50%" valign="top">
Expand Down Expand Up @@ -133,8 +134,9 @@ Download the latest version from the

See [Installation](docs/src/getting-started/installation.md) for first-start notes, or
[build it](#-building) yourself. Start **Rust Commander**, press **Ctrl+N** to open the Site
Manager and connect. The keys work as in every classic commander: **F5** copy,
**F6** move, **F7** new folder, **F8** delete, **F4** edit, **F1** all shortcuts.
Manager and connect. The keys follow the original Norton Commander: **F5** copy,
**F6** move, **F7** new folder, **F8** delete, **F4** edit, **F2** user menu, **F9** menu,
**F1** all shortcuts. *View* → **Keyboard layout** switches to Total Commander.

### On a server (web mode)

Expand Down
28 changes: 28 additions & 0 deletions crates/rc-api/src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ pub struct Settings {
pub restore_sessions: bool,
/// Continue interrupted transfers after a restart (otherwise they come back paused).
pub resume_jobs: bool,
/// Keyboard layout: "norton" (Norton Commander), "total" (Total Commander) or "rust"
/// (the layout of Rust Commander 0.1). Unknown values are treated as "norton".
pub keymap: String,
/// Show the function key bar (F1–F10) above the status bar.
pub show_key_bar: bool,
pub transfer: TransferOptions,
pub discovery: DiscoverySettings,
pub server: ServerSettings,
Expand All @@ -127,6 +132,8 @@ impl Default for Settings {
use_trash: true,
restore_sessions: true,
resume_jobs: true,
keymap: "norton".into(),
show_key_bar: true,
transfer: TransferOptions::default(),
discovery: DiscoverySettings::default(),
server: ServerSettings::default(),
Expand All @@ -135,3 +142,24 @@ impl Default for Settings {
}
}
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn keyboard_layout_defaults_to_norton_commander() {
// settings.json written before keyboard layouts existed
let s: Settings = serde_json::from_str(r#"{ "theme": "dark", "showHidden": true }"#).unwrap();
assert_eq!(s.keymap, "norton");
assert!(s.show_key_bar);
assert_eq!(s.theme, "dark");

let s: Settings = serde_json::from_str(r#"{ "keymap": "total", "showKeyBar": false }"#).unwrap();
assert_eq!(s.keymap, "total");
assert!(!s.show_key_bar);
let v = serde_json::to_value(&s).unwrap();
assert_eq!(v["keymap"], "total");
assert_eq!(v["showKeyBar"], false);
}
}
6 changes: 3 additions & 3 deletions crates/rc-core/src/protocols/tls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,9 @@ fn describe(cert: &CertificateDer<'_>) -> CertDescription {
use x509_cert::der::Decode;
match x509_cert::Certificate::from_der(cert.as_ref()) {
Ok(c) => CertDescription {
subject: c.tbs_certificate.subject.to_string(),
issuer: c.tbs_certificate.issuer.to_string(),
not_after: c.tbs_certificate.validity.not_after.to_string(),
subject: c.tbs_certificate().subject().to_string(),
issuer: c.tbs_certificate().issuer().to_string(),
not_after: c.tbs_certificate().validity().not_after.to_string(),
},
Err(e) => CertDescription {
subject: format!("(unparsable certificate: {e})"),
Expand Down
5 changes: 4 additions & 1 deletion docs/src/getting-started/quick-tour.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,7 @@ sessions, a local shell for the local file system.
- **Ctrl+Shift+E** opens the [Remote Explorer](../guide/remote-explorer.md) for all your SSH targets.
- **Ctrl+B** shows the sidebar with **Nearby** instances on your network.
- **Ctrl+Shift+S** opens [Synchronization](../guide/synchronization.md).
- **F1** lists every keyboard shortcut.
- **F1** lists every keyboard shortcut. The keys follow Norton Commander; *View* →
**Keyboard layout** switches to Total Commander or the earlier Rust Commander layout.
The function key bar at the bottom shows what F1–F10 do (hold Shift, Ctrl or Alt for
the other layers).
11 changes: 8 additions & 3 deletions docs/src/guide/file-operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,24 @@
All operations work the same on every protocol, as far as the protocol allows (object
stores, for example, have no permissions or symlinks).

The keys below are those of the default keyboard layout, Norton Commander. The
[keyboard shortcuts](../reference/keyboard-shortcuts.md) list the Total Commander and
Rust Commander layouts; *View* → **Keyboard layout** switches between them.

| Key | Operation |
|---|---|
| Enter | Open folder / file |
| F2 | Rename in place |
| Shift+F6 | Rename in place |
| F3 / F4 | View / [edit](editor.md) |
| Shift+F4 | New file |
| F5 / F6 | [Copy / move](transfers.md) to the other panel |
| Shift+F5 / Shift+F6 | Copy / move without the dialog |
| F7 | New folder |
| F8, Delete | Delete (recursive deletes run as a background job); local files go to the trash |
| Shift+F8, Shift+Delete | Delete permanently (local files skip the trash) |
| Ctrl+Z | Undo the last rename or move |
| Alt+Enter | Properties |
| Ctrl+Shift+C | Copy the full path(s) to the clipboard |
| F2 | User menu with your [custom commands](#custom-commands) |

*Files* → **Create link…** creates a symbolic link.

Expand Down Expand Up @@ -82,7 +86,8 @@ can reveal a file in its panel, view or edit it, or copy its path.
## Custom commands

*Tools* → **Custom commands…** defines your own commands, which then appear under
*Commands* → **Custom commands**. A command can run on the server of the session or
*Commands* → **Custom commands** and, in the Norton Commander layout, in the user menu
(**F2**). A command can run on the server of the session or
locally, once per file or once for the whole selection, show its output and refresh the
panel afterwards.

Expand Down
3 changes: 2 additions & 1 deletion docs/src/guide/interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ app you can also drop files from your operating system's file manager.

## Bookmarks

**Ctrl+D** bookmarks the current folder. Bookmarks can apply to the local file system, to a
**Ctrl+D** bookmarks the current folder (in the Total Commander layout it opens the
bookmark list, the "directory hotlist"). Bookmarks can apply to the local file system, to a
single site or to every session (for example `/var/log/nginx`).

## Themes and languages
Expand Down
2 changes: 1 addition & 1 deletion docs/src/guide/transfers.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,6 @@ instead of the upload time, so synchronizations by time work with buckets too.
## Web mode: browser uploads and downloads

In the [web mode](web-mode.md) there are extra commands for the computer running the
browser: **Upload from this computer…** (Ctrl+U), **Upload folder…** and **Download to
browser: **Upload from this computer…** (Ctrl+U in the Rust Commander keyboard layout), **Upload folder…** and **Download to
this computer**.
Folders are downloaded as a ZIP stream.
2 changes: 1 addition & 1 deletion docs/src/guide/web-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ browser runs on:

| Command | |
|---|---|
| **Upload from this computer…** (Ctrl+U) | Upload files into the active panel's folder |
| **Upload from this computer…** (Ctrl+U in the Rust Commander layout) | Upload files into the active panel's folder |
| **Upload folder…** | Upload a whole folder |
| **Download to this computer** | Download the selection; folders are streamed as a ZIP |

Expand Down
2 changes: 1 addition & 1 deletion docs/src/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ can be opened straight from the app.
| Area | Highlights |
|---|---|
| Protocols | SFTP, SCP, FTP, FTPS (explicit and implicit), WebDAV(S), Amazon S3 and S3-compatible storage (MinIO, Wasabi, R2, Ceph …), Azure Blob Storage, Google Cloud Storage, and other Rust Commander instances |
| Interface | Commander layout with two panels, session tabs, bookmarks, synchronized browsing, directory comparison, full keyboard control (F2–F8, Ins, Ctrl+…), light and dark theme, English and German |
| Interface | Commander layout with two panels, session tabs, bookmarks, synchronized browsing, directory comparison, full keyboard control with the Norton Commander (default) or Total Commander keyboard layout and a function key bar, light and dark theme, English and German |
| Transfers | Background queue with pause/resume/cancel/retry, resumable transfers, overwrite rules, **fingerprint comparison before copying**, preserved timestamps and permissions, file masks, speed limit, parallel transfers, server-to-server copies |
| Synchronization | One-way or two-way comparison by size, time or checksum, mirror mode, a **checklist** before anything runs, and "keep remote folder up to date" |
| Editor | Built-in editor for local and remote files with language detection, **linting**, **formatting**, change markers and a diff view |
Expand Down
2 changes: 1 addition & 1 deletion docs/src/reference/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ system's temporary folder.

| Tab | Settings |
|---|---|
| General | Language, theme, hidden files, size format, what double-click / Enter does on a file (edit, open with the default application, copy to the other panel), confirmations before deleting and overwriting, moving deleted local files to the trash, whether the copy/move dialog is shown |
| General | Language, theme, [keyboard layout](keyboard-shortcuts.md) (Norton Commander, Total Commander, Rust Commander) and function key bar, hidden files, size format, what double-click / Enter does on a file (edit, open with the default application, copy to the other panel), confirmations before deleting and overwriting, moving deleted local files to the trash, whether the copy/move dialog is shown |
| Transfer | Default transfer settings, number of parallel jobs, reconnecting the sessions and continuing the jobs of the last run |
| Editor | Show problems, format when saving, line width for formatting, tab width, word wrap |
| Terminal | Font family, font size, scrollback lines |
Expand Down
143 changes: 120 additions & 23 deletions docs/src/reference/keyboard-shortcuts.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,108 @@
# Keyboard shortcuts

The shortcuts follow the classic commander programs. **F1** shows this list inside the app.
On macOS, **Ctrl** is **⌘**, **Shift** is **⇧** and **Alt** is **⌥**.
Rust Commander offers three keyboard layouts. Choose one under *View* → **Keyboard layout**,
in **Preferences** (Ctrl+,) → *General*, or directly in the shortcut list that **F1** opens.

## Files
| Layout | |
|---|---|
| **Norton Commander** (default) | The original layout of the DOS classic: `1Help 2Menu 3View 4Edit 5Copy 6RenMov 7Mkdir 8Delete 9PullDn 10Quit` |
| **Total Commander** | The layout of the Windows classic: F2 rereads the panel, Shift+F6 renames, Ctrl+D is the directory hotlist |
| **Rust Commander** | The layout of earlier versions of Rust Commander: F2 renames, F9 refreshes |

The **function key bar** above the status bar shows what F1–F10 do in the chosen layout.
Hold **Shift**, **Ctrl** or **Alt** and it shows that layer, as in Norton Commander; a click
on a key runs its command. *View* → **Function key bar** (or *Preferences* → *General*)
hides it. It is not shown on phones.

Keys the original programs leave free carry Rust Commander's additional functions (terminal,
synchronization, Remote Explorer …); they are marked with \* in the tables below and in the
app. Functions the originals have but Rust Commander does not (the DOS command line, the
info and quick-view panels, panels on/off, folder tabs) are left unassigned.

On macOS, **Ctrl** is **⌘**, **Shift** is **⇧** and **Alt** is **⌥**. On Windows and
Linux the operating system may keep some keys for itself (Alt+F4 closes the window in many
desktops).

## Norton Commander (default)

| Key | Action |
|---|---|
| F1 | Keyboard shortcuts (help) |
| F2 | User menu: your [custom commands](../guide/file-operations.md#custom-commands) |
| F3 | View |
| F4 | Edit |
| F5 | Copy |
| F6 | Move (RenMov) |
| F7 | New folder |
| F8 / Delete\* | Delete (local files: to the trash) |
| F9 | Open the menu bar (PullDn) |
| F10 | Quit (desktop app) |
| Shift+F4 | New file |
| Shift+F6 | Rename in place |
| Shift+F8 / Shift+Delete\* | Delete permanently |
| Alt+F1 / Alt+F2 | Choose the location (drive, session) of the left / right panel |
| Alt+F3 | View with the external application |
| Alt+F4 | Edit with the external application (desktop app) |
| Alt+F5 | Pack: create an archive |
| Alt+F6 | Unpack: extract the archive here |
| Alt+F7 | Find files |
| Ctrl+F3 / F4 / F5 / F6 | Sort by name / type / date / size (again: reverse) |
| Ctrl+O | Show or hide the terminal (the "user screen") |
| Ctrl+U | Swap panels |
| Ctrl+R | Reread the panel |
| Ctrl+\\ | Root folder |
| Ctrl+PgUp / Ctrl+PgDn | Parent folder / open the folder under the cursor |
| Alt+letter | Quick search: jump to the next file starting with the typed letters |

Additions (\*): Alt+Enter properties, Alt+← / Alt+→ back / forward, Ctrl+N new session,
Ctrl+F find files, Ctrl+D bookmark this folder, Ctrl+Z undo, Ctrl+H hidden files, Ctrl+T
terminal, Ctrl+L edit the path, Ctrl+Shift+S synchronize, Ctrl+B sidebar, Ctrl+Shift+E
Remote Explorer, Ctrl+J dock, Ctrl+Shift+C copy path, Ctrl+, preferences, Ctrl+P open file,
Ctrl+K compare fingerprints.

## Total Commander

| Key | Action |
|---|---|
| F1 | Keyboard shortcuts (help) |
| F2 / Ctrl+R | Reread the panel |
| F3 | View |
| F4 | Edit |
| F5 | Copy |
| F6 | Move |
| F7 | New folder |
| F8 / Delete | Delete (local files: to the trash) |
| Shift+F8 / Shift+Delete | Delete permanently |
| F9 / F10 | Open the menu bar |
| Alt+F4 | Quit (desktop app) |
| Shift+F2 | Compare directories |
| Shift+F4 | New file |
| Shift+F6 | Rename in place |
| Alt+F1 / Alt+F2 | Choose the location (drive, session) of the left / right panel |
| Alt+F3 | View with the external application |
| Alt+F5 | Pack: create an archive |
| Alt+F9 / Alt+F6 | Unpack: extract the archive here |
| Alt+F7 | Find files |
| Alt+Enter | Properties |
| Alt+← / Alt+→ | Back / forward |
| Alt+↓ | Folder history |
| Ctrl+F3 / F4 / F5 / F6 | Sort by name / type / date / size (again: reverse) |
| Ctrl+Num + / Ctrl+Num − | Select all / select none |
| Ctrl+PgUp / Ctrl+PgDn | Parent folder / open the folder under the cursor |
| Ctrl+\\ | Root folder |
| Ctrl+← / Ctrl+→ | Show the folder under the cursor in the left / right panel |
| Ctrl+D | Directory hotlist (bookmarks) |
| Ctrl+F / Ctrl+N | Connect (Site Manager) |
| Ctrl+Shift+F | Disconnect the session of the active panel |
| Ctrl+S | Quick filter |
| Ctrl+U | Swap panels |
| Ctrl+Alt+letter | Quick search |

Additions (\*): Ctrl+Z undo, Ctrl+H hidden files, Ctrl+T terminal, Ctrl+L edit the path,
Ctrl+Shift+S synchronize, Ctrl+B sidebar, Ctrl+Shift+E Remote Explorer, Ctrl+J dock,
Ctrl+Shift+C copy path, Ctrl+, preferences, Ctrl+P open file, Ctrl+K compare fingerprints.

## Rust Commander

| Key | Action |
|---|---|
Expand All @@ -25,30 +124,11 @@ On macOS, **Ctrl** is **⌘**, **Shift** is **⇧** and **Alt** is **⌥**.
| Ctrl+K | Compare fingerprints with the other panel |
| Ctrl+P | Open file… |
| Ctrl+U | Upload from this computer (web mode) |

## Navigation and selection

| Key | Action |
|---|---|
| Tab | Switch panel |
| Backspace | Parent folder |
| Alt+← / Alt+→ | Back / forward |
| Ctrl+\\ | Root folder |
| Ctrl+PgUp / Ctrl+PgDn | Parent folder / open the folder under the cursor |
| Ctrl+L | Edit the path |
| Ctrl+R / F9 | Refresh |
| Insert | Toggle selection and move down |
| Space | Toggle selection |
| Ctrl+A | Select all |
| Ctrl+Shift+A | Select none |
| + / − | Select / unselect by mask |
| * | Invert selection |
| A–Z | Jump to a file (type-ahead) |
| Esc | Clear the selection, cancel a drag |

## Windows and tools

| Key | Action |
|---|---|
| Ctrl+N | New session (Site Manager) |
| Ctrl+T | Open terminal |
| Ctrl+F | Find files |
Expand All @@ -61,6 +141,23 @@ On macOS, **Ctrl** is **⌘**, **Shift** is **⇧** and **Alt** is **⌥**.
| Ctrl+, | Preferences |
| F1 | Keyboard shortcuts |

## File panels (all layouts)

| Key | Action |
|---|---|
| Tab | Switch panel |
| Enter | Open |
| Backspace | Parent folder |
| Insert | Toggle selection and move down |
| Space | Toggle selection |
| Ctrl+A | Select all |
| Ctrl+Shift+A | Select none |
| + / − | Select / unselect by mask |
| * | Invert selection |
| A–Z | Jump to a file (type-ahead) |
| Shift+F10, Menu key | Context menu |
| Esc | Clear the selection, cancel a drag |

## Editor

| Key | Action |
Expand Down
1 change: 1 addition & 0 deletions src-tauri/capabilities/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"permissions": [
"core:default",
"core:window:allow-set-title",
"core:window:allow-close",
"core:webview:allow-internal-toggle-devtools",
"dialog:default",
"dialog:allow-open",
Expand Down
2 changes: 2 additions & 0 deletions ui/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { Splitter } from './components/Splitter';
import { Dock } from './components/dock/Dock';
import { Sidebar } from './components/Sidebar';
import { StatusBar } from './components/StatusBar';
import { KeyBar } from './components/KeyBar';
import { DialogHost } from './components/DialogHost';
import { PromptHost } from './components/PromptHost';
import { ConflictHost } from './components/ConflictHost';
Expand Down Expand Up @@ -168,6 +169,7 @@ function Workbench() {
<Dock />
</div>
</div>
<KeyBar />
<StatusBar />
<EditorHost />
<DialogHost />
Expand Down
Loading
Loading