Back to all posts

Keyboard Shortcuts

André Schärpf

Hammer is built around the keyboard. Most actions have shortcuts, and they follow conventions that macOS developers already know. Here's the full reference.

Editor

ShortcutAction
⌘SSave
⌘WClose tab
⌃TabNext tab
⌃⇧TabPrevious tab
⌘F1Toggle edit / view mode
F1Keyword help
⇧F1Pretty print
⌘F2Check syntax
⌘F3Activate

Code Commenting

Hammer supports multiple keyboard layouts for toggling comments. Whichever keyboard you use, one of these will work:

ShortcutLayout
⌘/US
⌘⇧7German (and similar)
⌘ßGerman
⌘<Comment lines
⌘>Uncomment lines

⌘/ and ⌘⇧7 toggle: if the selected lines are commented, they get uncommented, and vice versa. ⌘< and ⌘> are explicit, one direction only.

Navigation

ShortcutAction
⌘KOpen SuperBar
⌘BToggle sidebar
⌘⇧BToggle inspector
⌘1–6Switch sidebar tab
⌘7Inspector: Syntax check
⌘8Inspector: Keyword help
⌘9Inspector: Transport check
F4Value help / search

Zoom

ShortcutAction
⌘+Zoom in
⌘-Zoom out
⌘0Reset zoom

Systems

ShortcutAction
⌘,Open settings
⌘⇧KManage systems
⌘⇧GOpen in SAP GUI
⌘NAdd new system (inside systems dialog)

Dialogs

Standard macOS conventions apply inside dialogs. Return confirms, Escape cancels. In the Report Issue dialog, ⌘Return submits.

A note on SuperBar

⌘K deserves its own mention. SuperBar is Hammer's command palette. It indexes every menu bar action along with its shortcut, so if you forget a binding, ⌘K and a few keystrokes will find it. It's the fastest way to discover what's available without memorizing tables.