## 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, followed 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 means that the status bar reads

`text \ p \ div \ body \ html`

meaning that the thing selected is some text within a `p` element, which is within a `div` element in the `body` of the `html` document.

Selecting this structure element (for example click on the word structure, then press `F2` gives

`strong \ p \ div \ body \ html`

### 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 a word.
- To select a whole element such as a 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 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 ou next word, use keys `Control-Left` et `Control-Right`.

Extending/shrinking the selection

- To extend or shrink the current selection, use the Shift key together with the arrow keys (`Shift-Left`, `Shift-Right`, `Shift-Up`, `Shift-Down`).
- To extend the selection to the current word, use `Alt-Enter`. If the current selection is within a link, this command activates the link instead of selecting the word.
- To extend the current selection to the beginning of the previous word or to the end of the next word, use `Shift-Control-Left` and `Shift-Control-Right`.

Moving across the document

- To scroll the document one line up or down, use `Control-Up` and `Control-Down`.
- To skip to the befinning or the end of the document, use `Control-Home` and `Control-End`.

### Selecting Images

Use the following procedures to select an image, or to move the cursor to left or right of an image

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 right of the 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 from one side of the image, to the image itself (selecting it), 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:

- 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 text character or text string:

- Click a text 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 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 type of text selection outside the attribute value, but you can edit the value.