Ctrl) and macOS (Cmd) modifier keys.
Default Shortcuts
The default keyboard shortcuts are defined insrc/main/modules/shortcuts.ts:4-96.
Tabs
| Shortcut | Action | Category |
|---|---|---|
Cmd/Ctrl + T | New Tab | Tabs |
Cmd/Ctrl + W | Close Tab | Tab |
Cmd/Ctrl + R | Reload | Tab |
Cmd/Ctrl + Shift + R | Force Reload | Tab |
Cmd/Ctrl + Shift + C | Copy URL | Tab |
F12 | Toggle DevTools | Tab |
Cmd/Ctrl + F | Find in Page | Tab |
Navigation
| Shortcut | Action | Category |
|---|---|---|
Cmd/Ctrl + Left | Go Back | Navigation |
Cmd/Ctrl + Right | Go Forward | Navigation |
Cmd/Ctrl + L | Toggle Command Palette | Navigation |
Browser
| Shortcut | Action | Category |
|---|---|---|
Cmd/Ctrl + , | Open Settings | Browser |
Cmd/Ctrl + N | New Window | Browser |
Cmd/Ctrl + Shift + W | Close Window | Browser |
Cmd/Ctrl + S | Toggle Sidebar | Browser |
Spaces
| Shortcut | Action |
|---|---|
Ctrl + 1 | Switch to Space 1 |
Ctrl + 2 | Switch to Space 2 |
Ctrl + 3 | Switch to Space 3 |
| … | … |
Ctrl + 9 | Switch to Space 9 |
Space shortcuts are dynamically generated based on the number of Spaces you have. See Spaces for more details.
Shortcut System Architecture
The shortcut system consists of two main components:1. Shortcut Definitions
Shortcuts are defined as typed objects:src/main/modules/shortcuts.ts:4.
2. Shortcut Storage
Modified shortcuts are persisted to disk:src/main/saving/shortcuts.ts:12:
Customizing Shortcuts
Shortcuts can be customized programmatically through the shortcuts saving system.Update a Shortcut
src/main/saving/shortcuts.ts:49-68.
Reset a Shortcut
Restore a shortcut to its default value:Reset All Shortcuts
Restore all shortcuts to defaults:src/main/saving/shortcuts.ts:89-98.
Getting Shortcuts
Retrieve shortcut information for display or execution:Get All Shortcuts
Get Single Shortcut
src/main/modules/shortcuts.ts:117-129.
Shortcut Format
Shortcuts use Electron’s accelerator syntax:Modifiers
CommandOrControl-Cmdon macOS,Ctrlon Windows/LinuxCommandorCmd- macOS onlyControlorCtrl- All platformsAltorOption- Alt keyShift- Shift keySuper- Windows key on Windows/Linux, Command key on macOS
Key Codes
- Letter keys:
A-Z - Number keys:
0-9 - Function keys:
F1-F24 - Arrow keys:
Left,Right,Up,Down - Special keys:
Space,Tab,Enter,Escape,Backspace, etc.
Examples
Shortcut Events
The shortcuts system emits events when shortcuts change:src/main/saving/shortcuts.ts:15-18.
Listen for changes:
Shortcut Categories
Shortcuts are organized into categories for better organization:Tabs
Tabs
Operations that create new tabs
- New Tab
Tab
Tab
Operations on the current tab
- Close Tab
- Reload
- Force Reload
- Copy URL
- Toggle DevTools
- Find in Page
Navigation
Navigation
Browser
Browser
Browser-wide operations
- Open Settings
- New Window
- Close Window
- Toggle Sidebar
Typed Shortcut IDs
The shortcut system uses TypeScript to ensure type safety:src/main/modules/shortcuts.ts:98-123.
Shortcut Loading
Shortcuts are loaded automatically on startup:src/main/saving/shortcuts.ts:24-46.
Shortcut Validation
Custom shortcuts are validated using thearktype schema:
Implementation Details
Internal Variables
The shortcuts system maintains an in-memory cache:src/main/saving/shortcuts.ts:21.
Merging Default and Modified
When retrieving shortcuts, the system merges defaults with modifications:src/main/modules/shortcuts.ts:105-112.
Best Practices
Avoid Conflicts
Don’t assign the same shortcut to multiple actions
Use Modifiers
Always include at least one modifier key (Cmd/Ctrl/Alt)
Be Consistent
Follow platform conventions (Cmd on macOS, Ctrl on Windows)
Test Thoroughly
Verify shortcuts work in all contexts (tabs, settings, etc.)
Related Features
- Tabs - Many shortcuts operate on tabs
- Spaces - Space switching shortcuts
- Extensions - Extensions may register their own shortcuts