Amaya

## Selecting

Many commands in Amaya act on the current selection. You can make a selection using the keyboard or the mouse, as described below.

No matter how you make the current selection, Amaya displays the type of the first selected element at the bottom of the window, preceded by the types of the enclosing elements in the structure. This may be helpful when the document structure is complex.

For example, selecting a word in this sentence displays the following message in the status bar:

`html > body > div > p`

meaning that the selection is within a `p` element, which is within a `div` element in the `body` of the `html` document. This sequence of element names is called a path.

Selecting this character string (for example click on the word "character") displays

`html > body > div > p > strong`

### Selecting with the mouse

- To set the insertion point, click with the left mouse button.
- To select some text, drag across a region: hold down the left mouse button, move the mouse, and release the button when the desired text is selected.
- To select an entire word, double-click on any character of the word.
- To select a whole element such as this list item, click its bullet or number.
- To extend the selection, click with the left mouse button while holding down the `Shift` key.
- To select a structure element, click within the element you want and then select the desired structure level via the keyboard as described below

### Selecting in the status bar

- To set the insertion point, click with the left mouse button.
- Click in the status bar (at the bottom of the window) on an element name to select an ancestor (and everything in it).
  In the previous example, when cliking on `div` in the status bar, the enclosing division is selected

  `html > body > div > p > strong
  `

- When the selection is changed this way, the path is not updated and you may adjust the final selection on any ancestor or descendant element.

### Selecting with the keyboard

Selecting a structure element

- Press the `F2` key to select the parent element in the document structure. Press that key several times to select ancestors (and everything in them) up the structure towards the root.
- Press `Shift-F2` to select the first child of the current element.
- Press `F4` to select the next element at the same level (sibling), or at the level of the parent element if there is no next sibling at the current level.
- Press `Shift-F4` to select the previous element at the same level (sibling), or at the level of the parent element if there is no previous sibling at the current level.

Moving the insertion point

- To move the insertion point locally, use the four arrow keys. If there is no insertion point, one is set at the top left corner of the window.
- To move the insertion point to the beginning or the end of the line, use keys `Home` and `End` respectively.
- To move the insertion point to the beginning of the previous or next word, use keys `Ctrl-←` and `Ctrl-→`.

Extending/shrinking the selection

- To extend or shrink the current selection, use the `Shift` key together with the arrow keys (`Shift-←`, `Shift-→`, `Shift-↑`, `Shift-↓`).
- To extend the current selection to the beginning of the previous word or to the end of the next word, use `Shift-Ctrl-←` and `Shift-Ctrl-→`.

Moving across the document

- To scroll the document one line up or down, use `Ctrl-↑` and `Ctrl-↓`.
- To skip to the befinning or the end of the document, use `Ctrl-Home` and `Ctrl-End`.

### Selecting images

To select an entire image:

1. Click and drag anywhere within the image, and then release the mouse button. Be sure not to drag outside the image before releasing the mouse.
2. Use the copy, cut, and paste commands to move or duplicate the image element along with all its attributes.

To place the cursor to the left or to the right of an image:

- Click the left part of an image to move the cursor to the left edge of that image. This enables you to type text before the image.
- Click the right part of an image to move the cursor to the right side of that image. This enables you to type text after the image.

Note: When using the arrow keys, the cursor moves to one side of the image, and then to the other side.

### Selecting in the structure view

The Structure view is especially convenient for quickly selecting large elements or groups of elements within a document.

To select an element in the Structure view:

- There are three ways to select a large element like a complex table or a long list with a single click: Click the blue label that represents the element, click the name of any of its attributes, or click the blue vertical line associated with that element.

To select a character or a text string:

- Click a character in the Structure view to select only that character. To select a text string, click and drag across the text.

To select an attribute value:

- In the Structure view, attribute values that can be edited from the keyboard are displayed in purple. Click and drag across the attribute value to select it. You cannot extend this text selection outside the attribute value, but you can edit the value.