Keyboard shortcuts
Every keyboard binding in Pasty, where it lives, and the shortcuts that were considered and not built, with the conflict that decided each one. Chords are written for macOS: ⌘ is Ctrl elsewhere, ⌥ is Alt, ⇧ is Shift.
The command palette
⌘K (Ctrl+K off macOS) opens the command palette: Copy Markdown, Share, New document, Rename, Delete document, Insert link, appearance, Vim mode, Settings, your documents by title, and the account actions. It is also the cheat sheet. A row with a chord of its own shows it as a keycap, and the chord works from anywhere on the page, palette open or not.
Global
These work from anywhere on the page, in the editor, in the title field, or with the palette open, and every one of them shows as a keycap in ⌘K.
Chord | Does | Notes |
|---|---|---|
| Open or close the command palette | The one chord the header advertises |
| Copy Markdown | Reclaimed from the devtools element picker, which keeps |
| Share / Unshare document | Shares and copies the link, or stops sharing, as the row says; signed out, shows the signup invitation |
| New document | Not |
| Rename document | Signed in only, like the row; puts the caret in the title with it selected |
| Settings | A toggle: press again to close |
| Recent documents | Most recent first, skipping the document on screen; signed in only |
| Insert link | Shown in the palette, but owned by the editor keymap because it needs the caret |
A digit with no document behind it (⌘3 with two other documents, any digit signed out) is left to the browser, so it still switches tabs. Under the Settings dialog only ⌘, acts. A claimed chord is also stopped from reaching the editor, because off macOS Ctrl+Shift+R would otherwise be Vim's redo and Ctrl+Shift+C its Escape.
⌘⌥N rather than ⌘N because Chrome and Firefox reserve ⌘N for a new window and never let a page cancel it. The link editor is ⌘⇧K rather than the ⌘K other editors use because the palette took the plain chord.
In the editor
Advertised in the toolbar's tooltips.
Chord | Does |
|---|---|
| Undo / redo |
| Bold / italic |
| Inline code |
| Code block |
| Quote |
| Bulleted / numbered / task list |
| Heading 1–3 |
| Normal text |
| Indent or outdent a list item; move between table cells |
| Edit a link (a plain click follows it in a new tab) |
Click a link to open it in a new tab, the way a link works everywhere else. ⌘-click (Ctrl-click off macOS) opens the link editor instead, with the caret in the link, so the words and the address can be fixed. A link that goes nowhere (an anchor, a placeholder, a javascript: address) opens the editor on a plain click too, because a link that cannot be followed is one that needs fixing.
Installed and live, but not advertised anywhere:
Chord | Does | Why it is quiet |
|---|---|---|
| Strikethrough | Valid GFM, kept in the schema, no toolbar button |
| Heading 4–6 | The schema holds them for pasted documents; no button |
| Redo (alias) | Tiptap's default; takes Chrome's History chord while the editor has focus |
| Hard line break | Tiptap's default |
| Delete to line start or end, list- and table-aware | Tiptap's list and table keymaps refine the native chords |
⌘U (underline) is deliberately off: underline has no Markdown.
Surfaces
Where | Keys |
|---|---|
Palette | Type to filter, |
Menus and the Share popover |
|
Link editor |
|
Title field |
|
Settings dialog |
|
Vim command line |
|
Vim mode
Opt-in, off by default, from ⌘K or Settings. A full modal layer: motions, counts, operators (d c y > <), text objects, registers, marks, search (/ ? n N * #), character find, macros, the scroll family (<C-e> <C-y> <C-d> <C-u> <C-f> <C-b>), and :w, :s, :%s, :noh. The ownership rule: ⌘ and ⌥ chords always pass through to the application (which is why every global chord above still works in NORMAL mode), Ctrl chords belong to Vim in NORMAL and VISUAL and to the platform in INSERT, and Esc, Ctrl-[ and Ctrl-C leave INSERT. The full account is on the Vim mode page.
Not yet: candidates
Candidate | Chord | Conflicts | Verdict |
|---|---|---|---|
Save now |
| Browser Save Page As, cancellable everywhere; nothing in the editor; Vim has | Worth doing. It is the reflex everyone has, and today it opens a save dialog |
Insert table |
| Safari's Show/Hide Toolbar (cancellable); free in Chrome and Firefox | Good fit: the toolbar button has no chord, and it joins the |
Toggle a task item done |
| Tiptap's hard break, which | Cheap, and the Notion/Things idiom |
Open the link under the caret |
| None | Today only a click does this |
Strikethrough |
| Already works | A discoverability gap, not a binding: a toolbar button or tooltip |
Headings 4–6 |
| Already work | Only worth advertising if H4–H6 get UI |
Keyboard help |
| Safari's Show Status Bar (cancellable) | Low value: |
Move block up or down |
| Native caret and selection movement in a contenteditable | Park: it would override editing behaviour without a strong reason |
Indent / outdent |
| Browser back and forward | Don't: |
Previous / next document |
| Reserved by Chrome for tab switching; the page never sees them | Can't. |
Rename alias for Windows habits |
| None | A hidden second chord; skip unless asked |
Vim toggle, appearance, log out, CLI access, sign in or up | — | — | None on purpose: infrequent, and a filled column is decoration |
Delete document | — | — | It exists now, in the palette. Still no chord, on purpose |
Chords still free, and chords to leave alone
Free in Chrome, Firefox and Safari on macOS: ⌘⇧E, ⌘⇧U, ⌘⇧X, ⌘⌥T, ⌘⌥ with most other letters (C and N are taken), ⌥↩, ⌘/, and ⌘S (a cancellable save dialog).
Cancellable but a real browser feature, so only with a reason: ⌘⇧D (bookmark all tabs, Safari's Reading List), ⌘⇧M (Chrome's profile menu), ⌘⇧O (Firefox's bookmarks), ⌘⇧A (Chrome's tab search), ⌘⇧H (home), ⌘⇧J (downloads), ⌘⇧G (find previous), ⌘D (bookmark), ⌘L (address bar), ⌘F (find), ⌘R (reload), ⌘Y (history), ⌘P (print), ⌘O (open file).
Off limits: ⌘N ⌘T ⌘W ⌘Q ⌘⇧N ⌘⇧T ⌘⇧W ⌘⇧P ⌘⇧[ ⌘⇧] ⌘⌥← ⌘⌥→ Ctrl-Tab (reserved by Chrome or Firefox), ⌘H and ⌘M (macOS hides and minimises), ⌘A ⌘C ⌘V ⌘X ⌘⇧V ⌘⌫ and the arrow keys with any modifier (native editing), and Ctrl with a letter (macOS's emacs bindings in a text field, and Vim's in NORMAL and VISUAL).