Skip to content

POSTING 3 ~/guide/keymap/

Keymaps

Overview

Posting's global keyboard shortcuts can be changed in the keymap section of your configuration file. Run posting locate config to find it.

Press F1 inside Posting to see the shortcuts currently in effect, including any you've changed. The footer at the bottom of the screen also shows the most useful keys for whatever is focused.

Changing a shortcut

Each global action has an ID (listed below). To change the key for an action, map its ID to a key in the keymap section:

keymap:
  send-request: f2

Restart Posting, and F2 now sends the request. The footer, the help screen and the command palette all show the new key.

To bind several keys to the same action, separate them with commas (jump only uses the first):

keymap:
  send-request: f2,f8

A keymap entry replaces the default keys for that action. To keep a default key as well as adding a new one, list both:

keymap:
  send-request: f2,ctrl+j

Focused widgets take precedence over global shortcuts. For example, Ctrl+R toggles a row or multipart part while editing it, even if you've also bound it to a global action.

Key format

A key is written as a key name, optionally preceded by modifiers joined with +:

  • Modifiers are ctrl, alt and shift (and meta and super, where your terminal sends them), for example ctrl+r, alt+enter or ctrl+shift+v.
  • Letters, digits and symbols are written as themselves: a, 5, /, @.
  • Named keys are enter, tab, space, backspace, delete, insert, escape, up, down, left, right, home, end, pgup, pgdown, and the function keys f1 to f12.

Keys are case-insensitive, so write Ctrl+Shift+X as ctrl+shift+x rather than Posting 2's ctrl+X. A comma can't be bound, since commas separate keys.

Terminal support

Not every terminal can send every key combination, and some are intercepted by your terminal, multiplexer or operating system before they reach Posting. Combinations with shift on non-printing keys, and keys such as ctrl+enter, generally need a terminal that supports the Kitty keyboard protocol. If a shortcut doesn't seem to work, try a simpler combination.

Action IDs

These are the actions you can rebind, with their default keys:

ID Default Action
send-request Ctrl+J, Alt+Enter Send the request, or send the message into an open gRPC stream
stream Alt+J Open a gRPC stream, or end the one that is open
jump Ctrl+O Enter jump mode
commands Ctrl+P Open the command palette
save-request Ctrl+S Save the request to the collection
new-request Ctrl+N Open a new request tab
close-tab Alt+W Close the request tab
keep-tab (none) Keep the preview tab open
next-tab Alt+Right Go to the next request tab
previous-tab Alt+Left Go to the previous request tab
search-tabs Alt+Down Search the open request tabs
search-requests Ctrl+G Search the requests in the collection
focus-url Ctrl+L Focus the URL bar
focus-method Ctrl+T Open the method menu
toggle-collection Ctrl+H Show or hide the sidebar
expand-section Alt+Z Expand the focused panel to fill the screen, or restore it
variables Ctrl+Shift+V Open the variables screen
help F1 Show the keyboard shortcuts

expand-section can't be fully rebound yet: Alt+Z keeps working inside the Request and Response panels, and a new key always expands the Request panel.

A few keys are fixed: Esc cancels a request that's in flight, or stops a gRPC call and keeps the messages that arrived (or closes whatever dialog is open), Ctrl+C quits, Ctrl+Z suspends Posting (in a text field it undoes instead), and Ctrl+Shift+S saves a text screenshot of the screen to the current directory.

Many terminals send Ctrl+H as Backspace. If Ctrl+H doesn't toggle the sidebar for you, rebind toggle-collection or use View: hide collection in the command palette.

Default shortcuts

Beyond the global actions above, the parts of Posting have keys of their own. These can't be rebound yet.

Everywhere

Key Action
Tab / Shift+Tab Move focus to the next / previous field
Ctrl+Z Suspend Posting (resume it with fg in your shell). In a text field, it undoes instead

Method selector

Key Action
Enter / Space Open the method menu
G P U A D H O Choose GET, POST, PUT, PATCH, DELETE, HEAD or OPTIONS (these also work in the open menu)
Q Make the request a GraphQL request (this also works in the open menu)
R Make the request a gRPC request (this also works in the open menu)

URL bar

Key Action
Enter Send the request, or import the URL bar's contents if it's a curl command
Down Move down to the request tabs
Ctrl+Y Copy the URL
Ctrl+Shift+Z Redo (in place of Ctrl+Y, which copies the URL here). Needs a terminal with the kitty keyboard protocol
Type $ Suggest variables

Tabs

These work on the request tabs, the response tabs and the sidebar tabs.

Key Action
Left / H, Right / L Previous / next tab
Down / J / Enter Move into the tab's content
Up / K Move back out (from the request tabs, to the URL bar)

Headers, query and form tables

Key Action
Type in the last row Add a new row
Up / Down Move between rows (Up from the first row goes back to the tabs, or to the body type in a form)
Ctrl+R Enable or disable the row
Ctrl+X Delete the row

The Path table's names come from the URL, so only its values can be edited.

Selectors and checkboxes

Key Action
Left / H, Right / L Change a choice such as the body type or auth type
Enter / Space Toggle a checkbox

Text areas and inputs

Key Action
Ctrl+Left / Alt+B, Ctrl+Right / Alt+F Move by word
Home / End, Ctrl+E Start / end of the line
Shift + movement keys Select text
Ctrl+A Select all
Ctrl+Z / Ctrl+Y Undo / redo (in the URL bar, redo is Ctrl+Shift+Z)
Ctrl+W / Alt+Backspace Delete the word before the cursor
Ctrl+U / Ctrl+K Delete to the start / end of the line
Ctrl+D / Del Delete the character after the cursor
F3 Open the text in your pager (request and response bodies)
F4 Open the text in your editor (request and response bodies)
Ctrl+R Look for the server's methods again (a gRPC request's Method field)

In a list of suggestions, Up and Down move, Enter accepts, and Esc dismisses it.

Response body

Key Action
K J H L, W / B Move the cursor, by word
0 ^ / $, G / Shift+G Start / end of the line, top / bottom
% Matching bracket
Page Up Ctrl+B / Page Down, Ctrl+U / Ctrl+D Up / down a page, half a page
Ctrl+F / / Find text in the body
N / Shift+N Next / previous match while search is open
Shift+K Shift+J Shift+H Shift+L Shift+W Shift+B Select while moving
V Visual mode (Esc to leave)
Shift+V / F6, F7 Select the line, select all
Y / C Copy the selection, or the whole body
F3 / F4 Open the body in your pager / editor

In the response body, Ctrl+A goes to the start of the line rather than selecting all, as it did in Posting 2.

Response headers, cookies and trailers

Key Action
Up / K, Down / J Move the cursor
Home / G, End / Shift+G First / last row
Y / C Copy the value
N Copy the name
B Copy both, as Name: value (a cookie as name=value)

In Headers and Trailers, Shift+Up / Shift+Down extends a selection and Ctrl+A selects all rows. With a selection, Y / C copies complete Name: value lines. Esc clears the selection and restores the single-row shortcuts.

Collection

Key Action
Enter Open a request, or expand/collapse a folder. With a selection, open every selected request
Up / K, Down / J Move the cursor
Shift+Up / Shift+K, Shift+Down / Shift+J Extend the selection up / down
Left / H, Right / L Collapse / expand, or move to the parent / child
Home / G, End / Shift+G First / last row
Shift+Home / Shift+End Extend the selection to the first / last row
Space Expand or collapse a folder
/ Search the collection
Esc Clear the selection, then the search
D Duplicate the request, or every selected request
Backspace / Del Delete the request, or every selected request

History

Key Action
Enter Open the entry
Up / K, Down / J Move the cursor
Shift+Up / Shift+K, Shift+Down / Shift+J Extend the selection up / down
Home / G, End / Shift+G First / last entry
Shift+Home / Shift+End Extend the selection to the first / last entry
Page Up / Ctrl+U, Page Down / Ctrl+D Page up / down
Esc Clear the selection
Backspace Delete the entry, or every selected entry

Command palette and menus

Key Action
Up / Down (or Ctrl+P / Ctrl+N) Move the cursor
Enter Run the command, or open a submenu
Esc Go back a level, or close the palette
Backspace on an empty search Go back a level

Coming from Posting 2

Posting 3 uses the same action IDs as Posting 2 where the action still exists, so most keymap entries keep working. A few things changed:

Posting 2 Posting 3
search-requests defaulted to Ctrl+Shift+P Now Ctrl+G
expand-section defaulted to Ctrl+M Now Alt+Z
help also accepted ctrl+? F1 only
quit could be rebound Ctrl+C is fixed
open-in-pager and open-in-editor could be rebound F3 and F4 are fixed
C / Y on a response table opened a menu to copy the name, value or both Y / C copy the value, N the name and B both, with no menu
Keys like ctrl+X meant Ctrl+Shift+X Write ctrl+shift+x

Keymap entries for IDs Posting 3 doesn't have are ignored.