Skip to content

Customising shortcuts

After this page you will be able to change any built-in shortcut, add shortcuts for commands that have none, and switch off the ones you do not want.

A shortcut is one or more modifiers and one key, joined by dashes, in lower case:

option-shift-h

The modifiers are cmd, ctrl, option and shift. The order of the modifiers does not matter. Every shortcut needs at least one modifier.

The key is a letter, a digit or a name such as minus, space or left. The full list is on the Key names page.

Each shortcut runs one command, written exactly as you would type it after iguana in a terminal.

Shortcuts live in the [bindings] section of ~/.config/iguana/iguana.toml. If you do not have a config file yet, iguana config init writes one with every built-in shortcut in it.

Your [bindings] section is laid over the built-in shortcuts one entry at a time. You only need to write the ones you want to change.

Give a new key combination a command:

iguana.toml
[bindings]
option-q = "close"
option-n = "space next"
option-p = "space prev"

Every built-in shortcut stays as it was.

The file is reloaded when you save it. You can also run iguana reload.

Open the settings window from the menu bar item, or with iguana settings, and go to the Shortcuts pane.

  1. Find the command. Directions, the focused window and desktops each have a table. Any other command goes under Other commands, where you type it first.
  2. Click its shortcut, or the empty slot if it has none, and type the new keys.
  3. To switch a shortcut off, click it and press delete. To cancel, press esc.

Right-click a shortcut to add a second one for the same command or to remove it. Restore built-in shortcuts removes your shortcut entries from the file, which brings the built-in set back.

The window writes the same [bindings] entries described above. If the keys you type were already used by another command, they move to the new one and a notice says so. The settings window has the details.

By default option+shift+1 to 9 take the window to a desktop and take you with it. Add --stay to stay where you are:

iguana.toml
[bindings]
option-shift-1 = "move-to-space 1 --stay"
option-shift-2 = "move-to-space 2 --stay"
option-shift-3 = "move-to-space 3 --stay"
iguana.toml
[bindings]
option-left = "focus left"
option-down = "focus down"
option-up = "focus up"
option-right = "focus right"

The built-in option-h, option-j, option-k and option-l keep working beside these unless you switch them off.

The built-in resize shortcuts work on the nearest neighbour. To control width and height separately:

iguana.toml
[bindings]
option-ctrl-equal = "resize grow width"
option-ctrl-minus = "resize shrink width"
option-shift-equal = "resize grow height"
option-shift-minus = "resize shrink height"

Write the key as minus. Because dashes separate the parts of a shortcut, Iguana also reads a doubled dash at the end as the minus key: option-- is the same as option-minus.

  • A shortcut another app already owns may be refused. Iguana then reports the system refused it (another app may own this shortcut).
  • A shortcut with a key name Iguana does not know is reported as unknown key.
  • The same combination written twice, for example as option-shift-h and shift-option-h, is reported as defined twice, and one of the two is ignored.
  • A command that does not parse is reported with the reason, and that one shortcut is left as it was.

All of these are warnings. The rest of your shortcuts keep working. To see them:

Terminal window
iguana status

The output shows how many shortcuts are active, lists any that failed, and shows the last shortcut Iguana received together with its answer. That last line is the quickest way to tell whether a key press reached Iguana at all.