## Browsing versus Editing

Amaya is mainly an editor with browsing capabilities. When used as a browser, it behaves like many other Web browsers, except for activating links. In normal operation Amaya allows you to browse and edit documents simultaneously, but you can change this standard behavior for each document window independently. The button shows up that the window is in editor mode: you can edit the current document and browse in this window. By clicking on that button, you switch the window to browser mode. The button is then displayed as and you can only browse and fill in forms. This option is also available from the Edit menu option Editor Mode, and as a keyboard shortcut (the default is Shift-Control-*).

HTML documents are read by default as ISO-latin-1 files. Without any information about the charset in the HTTP header or in a META element, a HTML document is considered as encoded in ISO-latin-1. XHTML documents are read by default as UTF 8 files. When there is no information about the charset in the HTTP header, in the XML declaration, or in a META element, a XHTML document is considered as encoded in UTF 8. As the default charset is different for HTML documents and XHTML documents, it often occurs that authors created ISO-latin-1 XHTML documents which don't provide information about the charset. As soon as a character analyzed by the XML parser doesn't match a valid UTF 8 character (it should occur if the document is encoded in ISO-latin-1 but parsed as an UTF 8 file), the document is considered as invalid: the parsing is stopped and an error message is displayed. In that specific case, the command "Reopen in ISO-latin-1" is activated. That command allows you to reopen the document with a charset set to ISO-latin-1. The reopen document is now considered as modified (a charset has been added) and can be saved.

Amaya interprets character entities. When the corresponding character is not available, it displays a '?' (or it displays the entity value when the entity is within an attribute value or when the entity is unknown). When the document is saved these character entities are restored, except if the document encoding is ISO-latin-1 and the entity corresponds to an ISO-latin-1 character. In that case, the ISO Latin-1 code of the character is used. If the document encoding is ASCII, Amaya translates ISO-latin-1 characters not available in ASCII into entities.

### Activating a link

Links are usually displayed in blue (or underlined on monochrome displays). As Amaya is an editor, you must double click on a link to activate it. A single click just moves the insertion point and displays the expanded URI of the link into the status bar of the main view.

This behavior can be changed as well as many other parameters using a preferences menu. By changing the "Double click activates link", you can browse documents with a simple-click. In that case, you cannot easily put the insert point within anchors: you have to use the drag and/or arrows to move the insert point within an anchor. It is also possible to use the keyboard to activate links, as well as form controls. The default keyboard command is Alt-Enter but the command DoAction can be mapped to a different shortcut. The command NextLinkOrFormElement, mapped by default to the shortcut Tab, allows you to find the next (or the first) link or HTML form element in the document. The command PreviousLinkOrFormElement, mapped by default to the shortcut Shift-Tab, allows you to find the previous (or the last) link or HTML form element in the document.

The document retrieved by this operation replaces the current document in the same window, in the same mode (editor or browser). If the current document has been modified and has not been saved yet, Amaya pops up a dialogue box that asks if you accept to lose modifications.

A simple clic or a double clic with the right button of the mouse (it works also with the middle button on Windows platforms) opens the target document into a new window.

### Access keys

An author could associate an attribute `accesskey` to a form field, an area, or a link. The following elements support the accesskey: AREA, BUTTON, INPUT, LABEL, LEGEND, and TEXTAREA.This can be crucial to people with motoric disabilities but there are other conditions where it could be necessary or useful.

When the author associated an attribute accesskey to a link in a document (example `accesskey="n" or accesskey="N"`), the command Alt-accesskey (in the example Alt-a) will activate that link. Pressing Alt- accesskey when assigned to a form element will give the focus to that element (the following element for LABEL and LEGEND).

Access keys overwrite Amaya shortcuts. For example Help pages declare access keys: "n" for going to the next page, "p" for going to the previous page and "t" for the table of contents. If the user has assigned a shortcut Alt-p to an Amaya command, this shortcut won't be accessible when these help pages are displayed. By default the modifier key used for access keys is Alt. The preferences menu `Special/Preferences/General` lets one changes this default configuration. The user can use the key Control instead of Alt or can decide to disable the access keys handler.

### Target anchors

Some pieces of text can be displayed with a target icon . These icons are not part of the document and can be displayed or hidden just by controlling the Show targets status of the current window, which is an option in the Views menu. The default keyboard command is Control-v Control-t in Unix, Alt-v Alt-l in Windows.

These icons are associated to target elements, i.e. elements with an `ID` attribute, or target anchors, i.e. anchors with a `name` attribute. They identify possible targets for links. These icons are intended to make the creation of links easier. As you can quickly recognize the possible target of a link, you can create links faster.

### Opening documents

You can open local or remote documents in several different ways:

File menu
  Two entries from the File menu, Open Document and Open in New Window, allow you to open a new document in the same window or in a new window respectively. The default keyboard commands are respectively Control-x Contol-f and Control-x Control-o in Unix, Control-o and Shift-Control-O in Windows. Both commands bring up a dialog box where you can enter either a local file name or an URI. You can also select a file from the Browse option that contains a file browser and helps you to locate local files.

  When the document is correctly specified, click on the Confirm button. This command could be also used to create a new local document.

Command line "Open"
  This area displays the file name or the URI of the current document. You can edit it to specify a different (local or remote) document to be displayed in the same window. Press the Enter key when the cursor is in this area to actually load the document. This command could be also used to create a new local document.
Following links
  Activating a link to get the corresponding document.

### Moving backward and forward

There are several ways to move backward or forward through the history list:

File menu
  There are entries in the file menu for Forward and Backward. The default keyboard shortcuts are Alt-b and Alt-f in Unix, and Alt-left-arrow and Alt-right-arrow in Windows
Button bar
  Two buttons: and allow you to go back to the previous page or forward to the next one.

### Reloading a page

Documents can be reloaded using the Reload option in the File menu, the shortcut Alt-r in Unix and Control-r in Windows, or the button on the button bar.

### Keyboard control

Amaya provides keyboard control for many functions. Default keyboard commands are provided at appropriate places in the documentation. The help section on Configuring Amaya describes how to change the defaults, and the current key bindings are provided next to the relevant menu option in all menus.

For Emacs users, a configuration file `Amaya/config/amaya.emacs` is available. The user can create a link from his own private space `$HOME/.amaya/amaya.keyboard` to this file if he wants to work with Emacs shortcuts.

Some keys are predefined, like:

- The key Enter within a `input` (type `text` or `password`) submits the corresponding form.
- The key Tab within a form element moves the cursor focus on the next form element, or skips to the first form element within the form.