# The keyboard

Press `Super + /` at any time to see every shortcut this machine has. That
list is generated from the live keymap, so it is never out of date, and it
includes anything you have rebound.

This chapter is the shape behind that list, which is the part worth learning
once.

## Three modifiers, three jobs

| Modifier | Acts on |
|---|---|
| `Super` | The window you are looking at |
| `Alt` | Workspaces |
| `Super + Ctrl` | The layout itself: splitting, floating, swapping |
| `Super + Alt` | The application you already have open |

Almost every shortcut follows from this. `Super + H` moves focus left.
`Alt + H` moves to the workspace on the left. `Super + Ctrl + H` swaps the
window leftward in the layout.

## Directions

`H`, `J`, `K`, `L` mean left, down, up, right, as they do in vim. The arrow
keys work everywhere the letters do, so you never have to learn them if you
would rather not.

Add `Shift` to move the window rather than the focus. `Super + Shift + L`
takes the current window and moves it to the right.

## Opening versus going to

`Super + T` opens a terminal. It opens another one every time, which on a
tiling desktop is the normal way to work rather than an accident.

`Super + Alt + T` goes to a terminal you already have, wherever it is, and
opens one only if there is none. The same pair works for the editor, browser,
files, calculator and mail.

So the plain key means "give me one" and adding `Alt` means "take me to the
one I have".

## The handful worth memorising first

| Keys | What it does |
|---|---|
| `Super + Space` | Find and open anything |
| `Super + T` | Terminal (another one) |
| `Super + Alt + T` | The terminal you already have |
| `Super + Q` | Close the window |
| `Super + backtick` | Every window, every workspace |
| `Super + I` | Settings |
| `Super + /` | Every other shortcut |

## Changing them

Settings has a [Keyboard page](panama://settings/shortcuts), under Input, listing every bind, each of which
can be reassigned. A rebind moves the shortcut and cannot change what it does, so
there is no way to make a key do something unexpected by editing it.

Shortcuts you invent live in the same list, in a **Custom** group above the
rest. One of those names an application, a shell action or a window move rather
than storing a command — for the same reason: what you are choosing is which
key, not what it runs. A chord something already holds is refused rather than
stolen, so a new shortcut can never quietly cost you an old one.
