# Use the editor from the keyboard

Every key the web editor answers to, in a table, so you can design without a pointer.

Everything in the web editor can be done without a pointer. **Tab** moves through the controls, and the arrow keys move inside a group of them. This page lists every key. Press **?** in the editor to see the same list.

> **Before you start:**
>
> - On a Mac, **Cmd** is the command key and **Option** the alt key. On Windows and Linux, use **Ctrl** and **Alt**. The editor's own list shows the symbols for your computer.
> - The tools, and some keys, work only in a master or a new design. The table says where a key is for a master or a size. See [Draw and shape in the editor](https://withmestra.com/docs/how-to/editor-tools/).

## Work from the keyboard

1. Press **Tab**. The first four stops jump to the artwork, the layers, the inspector and **Save**.
2. On the artwork, press a tool's key (for example **R** for **Rectangle**), then **Enter** to place one at the page's centre.
3. Move it with the arrow keys, resize it with **Alt** and the arrows, and set exact numbers in the **X**, **Y**, **Width**, **Height** and **Angle** fields.
4. Press **Cmd or Ctrl+S** to save.

A key that belongs to a field wins while the caret is in it. For example, the arrows move the caret in a text box.

## The keyboard map

<!-- Generated from the editor's key tables (web/src/editor/keymap.ts, which groups the KeyDecl tables in keys.ts, canvasKeys.ts, pen.ts, CopyEdit.ts, PointEditLayer.tsx, GradientLayer.tsx and Layers.tsx) at app origin/main. Regenerate it when those change; do not edit the rows by hand. -->

### Getting around

| Keys                                | What they do                                                                                                                  |
| ----------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| **Tab**                             | Moves to the next control. Shift+Tab goes back. The first four stops jump to the artwork, the layers, the inspector and Save. |
| **Tab**                             | On the artwork, selects the next element. Shift+Tab selects the one before.                                                   |
| **Esc**                             | Puts down the tool, closes what is open, steps out of a group, or clears the selection, one at a time.                        |
| **?**                               | Shows this list.                                                                                                              |
| **Cmd or Ctrl** + **S**             | Saves.                                                                                                                        |
| **Cmd or Ctrl** + **Z**             | Undoes.                                                                                                                       |
| **Cmd or Ctrl** + **Shift** + **Z** | Redoes.                                                                                                                       |
| **Ctrl** + **Y**                    | Redoes, too.                                                                                                                  |
| **Cmd or Ctrl** + **+**             | Zooms in. With - it zooms out, and with 0 it fits the page.                                                                   |
| **Space**                           | Held down on the artwork, lets you pan with the pointer.                                                                      |

### Tools

| Keys              | What they do                                                                                                        |
| ----------------- | ------------------------------------------------------------------------------------------------------------------- |
| **V**             | Select.                                                                                                             |
| **T**             | Text.                                                                                                               |
| **R**             | Rectangle.                                                                                                          |
| **O**             | Ellipse.                                                                                                            |
| **L**             | Line.                                                                                                               |
| **Y**             | Polygon.                                                                                                            |
| **S**             | Star.                                                                                                               |
| **P**             | Pen.                                                                                                                |
| **I**             | Picture.                                                                                                            |
| **F**             | Frame.                                                                                                              |
| **Shift** + **L** | Logo.                                                                                                               |
| **B**             | Button.                                                                                                             |
| **Arrows**        | In the tool list, move between tools. Enter or Space picks one.                                                     |
| **Enter**         | On the artwork with a tool picked, places a new element at the page's centre. Each Enter after that steps it along. |

### Drawing a path with the Pen

| Keys                  | What they do                                                                                                                         |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| **Enter**             | Puts a corner point at the page's centre, or where the cursor is. On the first point of a path of three or more, it closes the path. |
| **Arrows**            | Move the cursor for the next point. Shift moves it ten steps.                                                                        |
| **Backspace**         | Takes the last point back.                                                                                                           |
| **Shift** + **Enter** | Finishes an open path of two points or more.                                                                                         |
| **Esc**               | Finishes a path of two points or more. With fewer points it clears them; with none it puts the tool down.                            |

### Changing the selection

| Keys                                        | What they do                                                                                           |
| ------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
| **Arrows**                                  | Move it one step. Shift moves it ten steps.                                                            |
| **Option or Alt** + **Arrows**              | Resize it from the far edge: Right and Down grow it, Left and Up shrink it. Shift moves ten steps.     |
| **Enter**                                   | Edits the words of a text, the points of a path, or the picture inside a picture frame.                |
| **Delete**                                  | Removes it, in a master.                                                                               |
| **Size and turn**                           | Use the X, Y, Width, Height and Angle fields in the inspector. Up and Down in a field step the number. |
| **Cmd or Ctrl** + **G**                     | Groups the selection.                                                                                  |
| **Shift** + **Cmd or Ctrl** + **G**         | Ungroups it.                                                                                           |
| **Option or Alt** + **Cmd or Ctrl** + **M** | Clips the selection to a shape. With Shift it releases the clip.                                       |
| **Cmd or Ctrl** + **]**                     | Brings it forward. With Alt it goes to the front.                                                      |
| **Cmd or Ctrl** + **\[**                    | Sends it backward. With Alt it goes to the back.                                                       |
| **Shift** + **Cmd or Ctrl** + **H**         | Hides it, in a size. Pressed with nothing selected, it brings back what it hid.                        |

### Editing text

| Keys                        | What they do                                                                       |
| --------------------------- | ---------------------------------------------------------------------------------- |
| **Enter**                   | Starts a new paragraph.                                                            |
| **Shift** + **Enter**       | In a master, ends the line here without adding a character. In a size it is Enter. |
| **Esc**                     | Finishes editing and keeps the words.                                              |
| **Cmd or Ctrl** + **A**     | Selects all the words.                                                             |
| **Backspace** or **Delete** | Delete what is selected, or the letter before or after. With Alt, a word.          |

### Moving the picture in its frame

| Keys           | What they do                                |
| -------------- | ------------------------------------------- |
| **Enter**      | On a picture frame, starts it.              |
| **Arrows**     | Move the picture. Shift moves it ten steps. |
| **+** or **-** | Zoom the picture.                           |
| **Enter**      | Keeps it. Esc puts it back.                 |

### Editing a path's points

| Keys                         | What they do                                                    |
| ---------------------------- | --------------------------------------------------------------- |
| **Tab**                      | Goes to the next point. Shift+Tab goes back.                    |
| **Arrows**                   | Move the selected points. Shift moves them ten steps.           |
| **Cmd or Ctrl** + **A**      | Selects every point.                                            |
| **H**                        | Takes the point's handles in turn, so the arrows move a handle. |
| **+** or **=** or **Insert** | Adds a point after the selected one.                            |
| **S**                        | Smooths or sharpens the point.                                  |
| **O**                        | Opens or closes the path.                                       |
| **Delete** or **Backspace**  | Deletes the selected points.                                    |
| **Enter**                    | Finishes.                                                       |
| **Esc**                      | Puts back a drag, then finishes.                                |

### Moving a gradient handle

| Keys                        | What they do                                                    |
| --------------------------- | --------------------------------------------------------------- |
| **Arrows**                  | Move the handle with focus. Shift moves it further.             |
| **Delete** or **Backspace** | On a radial gradient's focus point, puts it back at the centre. |
| **Esc**                     | Puts the handle back, if the move has not been sent yet.        |

### Layers

| Keys                       | What they do                                                                                      |
| -------------------------- | ------------------------------------------------------------------------------------------------- |
| **Up** or **Down**         | Move between layers. Home and End go to the ends.                                                 |
| **Enter**                  | Selects the layer. Shift+Enter adds it to the selection.                                          |
| **Right** or **Left**      | Go to the layer's own button (show, hide or remove) and back. In right-to-left text the two swap. |
| **Option or Alt** + **Up** | Moves the layer up the stack. Alt+Down moves it down.                                             |

### Panels and lists

| Keys                  | What they do                                                                                                      |
| --------------------- | ----------------------------------------------------------------------------------------------------------------- |
| **Arrows**            | Move between swatches, between the buttons over the layers, and between choices in a group. Tab leaves the group. |
| **Esc**               | Closes a menu, a colour list or a chooser and puts focus back on the button that opened it.                       |
| **Left** or **Right** | On a slider or a dial, change it by one. Shift changes it by more.                                                |

## If something goes wrong

| You see                              | What to do                                                                                                                            |
| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------- |
| A key does nothing                   | Check where focus is. A text box or number field answers to its own keys first. Press **Esc** to leave it, or **Tab** to the artwork. |
| **Delete** doesn't remove an element | **Delete** removes in a master. In a size, hide it with **Shift+Cmd or Ctrl+H**.                                                      |

## What's next

- [Draw and shape in the editor](https://withmestra.com/docs/how-to/editor-tools/)
- [Pictures, type and fills in the editor](https://withmestra.com/docs/how-to/editor-pictures-type-fills/)
- [Edit a size or master in the browser](https://withmestra.com/docs/how-to/edit-in-the-browser/)
