Skip to content

Keyboard Shortcuts

Master zxwdb with keyboard shortcuts for faster workflow.

Shortcuts Overview

Display Shortcuts Overlay

Hold Cmd (macOS) or Ctrl (Windows/Linux) to show all available shortcuts on screen.

Global Shortcuts

ActionmacOSWindows/LinuxDescription
New TableCmd+NCtrl+NCreate new table
Browse DataCmd+BCtrl+BOpen data browser
Preview SQLCmd+PCtrl+PShow SQL preview
Close ModalESCESCClose any modal/dialog
DeselectESCESCDeselect selected table

Editing

ActionmacOSWindows/LinuxDescription
UndoCmd+ZCtrl+ZUndo last action
RedoCmd+Shift+ZCtrl+Shift+ZRedo undone action
Delete TableDeleteDeleteDelete selected table
SaveCmd+SCtrl+SSave (auto-save enabled)

Canvas

ActionmacOSWindows/LinuxDescription
Fit ViewFFFit all tables in view
Zoom InScroll UpScroll UpZoom in canvas
Zoom OutScroll DownScroll DownZoom out canvas
Pan CanvasClick+DragClick+DragMove canvas

Connection Modal

ActionShortcutDescription
ConnectEnterSubmit connection
TestCmd+EnterTest connection
CloseESCCancel connection
Next FieldTabMove to next field
Previous FieldShift+TabMove to previous field

Add/Edit Table Modal

ActionShortcutDescription
SaveEnterSave table
CancelESCCancel changes
Add ColumnCmd+EnterAdd new column
Focus NextTabNext input field
Focus PreviousShift+TabPrevious input field

Data Browser

ActionmacOSWindows/LinuxDescription
Add RowCmd+NCtrl+NCreate new row
Edit RowCmd+ECtrl+EEdit selected row
Delete RowDeleteDeleteDelete selected row
Save EditCmd+EnterCtrl+EnterSave changes
Cancel EditESCESCCancel editing
SearchCmd+FCtrl+FFocus search

SQL Editor

ActionmacOSWindows/LinuxDescription
Run QueryCmd+EnterCtrl+EnterExecute SQL query
Clear ConsoleCmd+KCtrl+KClear console output
New QueryCmd+NCtrl+NNew query tab
Format SQLCmd+Shift+FCtrl+Shift+FFormat query (future)

Context-Specific Shortcuts

When Table is Selected

ActionShortcutDescription
Edit StructureEOpen edit modal
Browse DataBOpen data browser
Delete TableDeleteDelete table (with confirm)
DuplicateCmd+DDuplicate table (future)

When in Canvas

ActionShortcutDescription
Select AllCmd+ASelect all tables (future)
CopyCmd+CCopy selected (future)
PasteCmd+VPaste table (future)
CutCmd+XCut selected (future)

When Editing Text

ActionShortcutDescription
Select AllCmd+ASelect all text
CopyCmd+CCopy text
PasteCmd+VPaste text
UndoCmd+ZUndo text change

Mouse Shortcuts

Click Actions

ActionMouseDescription
Select TableClickSelect single table
Edit TableDouble-ClickOpen edit modal
Pan CanvasClick+Drag (background)Move canvas
Create RelationshipDrag (from handle)Draw FK line

Wheel Actions

ActionMouseDescription
ZoomWheel Up/DownZoom in/out
Pan HorizontalShift+WheelPan left/right
Smooth ZoomPinch (trackpad)Smooth zoom

Multi-Select (Future)

ActionMouseDescription
Multi-SelectCmd+ClickAdd to selection
Range SelectShift+ClickSelect range
Box SelectClick+DragDraw selection box

Shortcut Customization

Future Feature

Custom shortcut mapping coming soon:

json
{
  "shortcuts": {
    "newTable": "Cmd+T",
    "browseData": "Cmd+D",
    "previewSQL": "Cmd+L"
  }
}

Platform Differences

macOS vs Windows/Linux

ActionmacOSWindows/Linux
Command KeyCmdCtrl
Option KeyOptionAlt
Delete ForwardFn+DeleteDelete
Delete BackwardDeleteBackspace

Browser Shortcuts

Some shortcuts may conflict with browser:

ShortcutConflictSolution
Cmd+NNew WindowWorks in app
Cmd+WClose TabNot used
Cmd+TNew TabNot used
Cmd+FFindNot used in canvas

Shortcut Reference Card

Quick Reference

┌─────────────────────────────────────────────────┐
│           zxwdb Keyboard Shortcuts              │
├─────────────────────────────────────────────────┤
│ TABLES                                          │
│   Cmd+N        New Table                        │
│   Delete       Delete Selected                  │
│   E            Edit Structure                   │
│   B            Browse Data                      │
│                                                 │
│ EDITING                                         │
│   Cmd+Z        Undo                             │
│   Cmd+Shift+Z  Redo                             │
│   Cmd+S        Save (auto)                      │
│                                                 │
│ CANVAS                                          │
│   F            Fit View                         │
│   Scroll       Zoom In/Out                      │
│   Click+Drag   Pan Canvas                       │
│                                                 │
│ MODALS                                          │
│   ESC          Close/Cancel                     │
│   Enter        Submit/Save                      │
│   Tab          Next Field                       │
│                                                 │
│ DATA                                            │
│   Cmd+B        Browse Data                      │
│   Cmd+Enter    Run Query                        │
│   Cmd+P        Preview SQL                      │
│                                                 │
│ HELP                                            │
│   Hold Cmd     Show Shortcuts                   │
│   ?            Help Modal (future)              │
└─────────────────────────────────────────────────┘

Tips for Efficiency

Learn These First

Master these 5 shortcuts for 80% efficiency:

  1. Cmd+N - New Table
  2. Cmd+B - Browse Data
  3. Cmd+Z - Undo
  4. F - Fit View
  5. ESC - Close/Cancel

Power User Workflow

1. Cmd+N           → Create table
2. Tab, Tab, Tab   → Fill fields quickly
3. Enter           → Save
4. Drag handles    → Create relationships
5. F               → Fit view
6. Cmd+B           → Add sample data
7. Cmd+P           → Preview SQL

Avoid Mouse

Try working without mouse:

Start:    Cmd+N (new table)
Add:      Tab through fields
Save:     Enter
Navigate: F (fit view)
Data:     Cmd+B (browse)
Edit:     Tab to Edit button, Enter
Undo:     Cmd+Z

Accessibility

Screen Readers

All actions accessible via keyboard:

  • ✅ Tab navigation
  • ✅ ARIA labels
  • ✅ Focus indicators
  • ✅ Keyboard-only workflow

Focus Management

  • Focus visible with blue outline
  • Logical tab order
  • Skip links for long lists
  • Modal focus trap

Conflict Resolution

Shadowed Shortcuts

Some shortcuts might be intercepted by browser:

Browser Takes Priority:

  • Cmd+Q - Quit application
  • Cmd+W - Close tab
  • Cmd+R - Reload page
  • Cmd+T - New tab

Solution: Use alternative shortcuts or browser in app mode:

bash
# Chrome app mode
google-chrome --app=http://localhost:20256

OS Shortcuts

System-level shortcuts override app:

macOS:

  • Cmd+Space - Spotlight
  • Cmd+Tab - Switch apps
  • Cmd+H - Hide window

Windows:

  • Win+D - Show desktop
  • Alt+Tab - Switch windows
  • Ctrl+Alt+Del - Task manager

Future Enhancements

Coming Soon

  • Custom key bindings: Remap any shortcut
  • Vim mode: hjkl navigation
  • Command palette: Cmd+K for all actions
  • Macro recording: Record action sequences
  • Shortcut hints: Show hints on hover

Requested Features

Vote for features you want:

  • [ ] Emacs keybindings
  • [ ] Customizable shortcuts
  • [ ] Shortcut search
  • [ ] Cheat sheet export
  • [ ] Multi-cursor editing

Practice Mode

Learn by Doing

Try the interactive shortcut tutorial:

  1. Help → Shortcut Tutorial (future)
  2. Practice each shortcut
  3. Track your progress
  4. Earn badges

Shortcut Philosophy

Why Keyboard Shortcuts?

  1. Speed: 10x faster than mouse
  2. Flow: Stay in the zone
  3. Precision: Exact actions
  4. Professional: Power user tools
  5. Accessibility: For all users

Design Principles

  • Mnemonic: N for New, B for Browse
  • Standard: Follow platform conventions
  • Discoverable: Hold Cmd to see all
  • Consistent: Same patterns throughout
  • Learnable: Start simple, add advanced

Cheat Sheet Download

Print Reference

Download printable cheat sheet:

Feedback

Suggest new shortcuts:

Released under the MIT License.