Keybinding Maps
Fresh provides several built-in keybinding maps to match different editing styles:- Default
- Emacs
- VSCode
- macOS
- macOS GUI
Standard keybindings inspired by modern editors like VS Code:
Ctrl+P- Quick open (files, commands, buffers)Ctrl+S- Save fileCtrl+Z/Ctrl+Y- Undo / RedoCtrl+F- Find in file- Arrow keys for navigation
Shift+Arrowfor selection
Switching Keymaps
Change the active keymap in yourconfig.json:
config.json
"default"- Standard editor keybindings"emacs"- Emacs-style keybindings"vscode"- VS Code keybindings"macos"- macOS terminal-friendly keybindings"macos-gui"- macOS GUI keybindings
On macOS, Fresh defaults to the
"macos" keymap which handles terminal-specific keyboard limitations.- Via menu: View → Keybinding Style → [Select keymap]
- Via command palette:
Ctrl+Pthen type>switch keybinding map
Custom Keybindings
Add custom keybindings to override the active keymap:config.json
Keybinding Structure
Key Names
Letter keys:"a", "b", "c", … "z", "A", "B", …
Special keys:
"Enter","Tab","Backspace","Delete","Escape""Space","Home","End","PageUp","PageDown""Left","Right","Up","Down""F1"…"F12"
"ctrl", "shift", "alt"
Context Conditions
Example: Custom Keybindings
Chord Keybindings
Define multi-key sequences (like EmacsC-x C-s):
Custom Keymaps
Create your own named keymaps:config.json
Common Actions
Here are some frequently used actions for custom keybindings:File Operations
Navigation
Editing
Search
LSP
UI
Viewing Current Keybindings
To see all active keybindings:- Command palette:
Ctrl+P→>Show Keybindings - Menu: Help → Keyboard Shortcuts
- Direct file: View the keymap file at
keymaps/[name].json
macOS Terminal Configuration
macOS terminals have specific keyboard limitations. See the complete guide below:macOS Terminal Setup Guide
macOS Terminal Setup Guide
macOS Keymap
Fresh includes a dedicated macOS keymap that addresses terminal-specific challenges. To use it:Recommended Terminals
iTerm2 Setup
- Go to Settings → Profiles → Keys
- Check Report keys using CSI u
- Set Left Option key to Esc+
- Set Right Option key to Normal (for special characters)
Terminal.app Setup
Import Profile (easiest):- Locate
scripts/macOS/Fresh.terminalin the repository - In Terminal.app, go to Settings → Profiles
- Click the gear icon and select Import…
- Select the
Fresh.terminalfile
- Settings → Profiles → Keyboard → Check Use Option as Meta key
- Add key mappings for Shift+Arrow keys:
- Shift+Up:
\033[1;2A - Shift+Down:
\033[1;2B - Shift+Left:
\033[1;2D - Shift+Right:
\033[1;2C
- Shift+Up:
Mission Control Conflicts
macOS uses Ctrl+Arrow for desktop switching. To use Ctrl+Arrow in Fresh:- Open System Settings → Keyboard → Keyboard Shortcuts → Mission Control
- Disable or rebind:
- “Move left a space” (Ctrl+Left)
- “Move right a space” (Ctrl+Right)
- “Mission Control” (Ctrl+Up)
- “Application windows” (Ctrl+Down)
Keyboard Enhancement Flags
Configure advanced keyboard protocol features:config.json
Linux: XFCE Window Manager
XFCE captures Ctrl+Alt+Up/Down for workspace switching. To disable:- Open Settings → Window Manager → Keyboard
- Find
Upper workspaceandBottom workspace - Click Clear for both shortcuts
Debugging Keyboard Issues
If keybindings aren’t working:- Debug keyboard events: Help → Debug Keyboard Events
- See what your terminal sends for each keypress
- Adjust keybindings or terminal configuration accordingly
Next Steps
Settings Reference
Complete editor configuration options
Theme Configuration
Customize colors and themes