## Keyboard shortcuts

It is useful to be able to invoke menu commands directly from the keyboard. The Thot toolkit provides a facility that lets user accomplish this by means of an application keyboard shortcuts file. This file defines a list of associations between a keyboard sequence and the corresponding invoked command.

The syntax used to define an association is:

     Directive = KeySeq ':' IdentCommand ;
     KeysSeq = KeySet [ ',' KeySet ] ;
     KeySet = [ Modifier ] [ 'Shift' ] Key ;
     Key = '<Key>' KeyValue / '<Key>' SpecialKey ;
     Modifier = 'Ctrl' / 'Alt' / 'Meta' ;
     KeyValue = 'a' / 'b' / ... ;
     SpecialKey = 'Escape' / 'Delete' / 'Space' / 'BackSpace' /
                  'Enter' / 'Up' / 'Down' / 'Left' / 'Right' /
                  'Home' / 'End' / 'F1' / ... / 'L1' / ... / 'R1' / ... ;
     IdentCommand = 'TtcInsertChar(' Char ')' / NAME '()' ;
     Char = KeyValue / OctalValue ;  OctalValue = '\' NUMBER ;

For an example, see the standard files `amaya.keyboard` (for Unix platforms) and `amaya.kb` (for Windows platforms), which are by default located in the directory `Amaya/config`.

The list of available commands is:

- Moving commands:
  - TtcNextChar, TtcPreviousChar: move character by character.
  - TtcNextLine, TtcPreviousLine, TtcStartOfLine, TtcEndOfLine: move line by line.
  - TtcNextElement, TtcPreviousElement, TtcChildElement, TtcParentElement: move element by element.
  - TtcPageDown, TtcPageUp, TtcPageTop, TtcPageEnd: scroll from page to page.
  - TtcLineUp, TtcLineDown scroll one line up or one line down.
- A command that allows one to follow a link or to activate a HTML form element (menu, button, etc.):

  DoAction.

- A command that allows to skip to the next (or the first if there is selection) link or HTML form element in the document:

  NextLinkOrFormElement.

- A command that allows to skip to the previous link or HTML form element in the document:

  PreviousLinkOrFormElement.

- In `File` menu:

  New, NewTemplate, NewCss, OpenDoc, OpenDocInNewWindow, Reload, GotoPreviousHTML, GotoNextHTML, GoToHome, SaveDocument, SaveDocumentAs, Synchronize, ParseAsHTML, DocumentInfo, SetupAndPrint, PrintAs CloseDocument, AmayaClose

- In Edit menu:

  TtcUndo, TtcRedo, TtcCutSelection, TtcCopySelection, TtcPaste, TtcDeleteSelection, SetBrowserEditor, TtcSearchText, SpellCheck, TransformType.

- In `Structure` menu:

  CreateBase, CreateMeta, CreateLinkInHead, CreateScript, CreateStyle, CreateComment.

- In Types menu:
  Main Menu:
    ChangeTitle, CreateAddress, CreateParagraph, CreateImage, CreateHorizontalRule, CreateBlockQuote, CreatePreformatted, CreateAddress, CreateDivision, CreateNOSCRIPT, CreateObject, CreateParameter, CreateIFrame, CreateBreak("\212")
  AREA submenu:
    CreateAreaRect, CreateAreaCircle, CreateAreaPoly
  Form submenu:
    CreateForm, CreateFileInput, CreateImageInput, CreatePasswordInput, CreateHiddenInput, CreateLabel, CreateFieldset, CreateOptGroup, CreateToggle, CreateRadio, CreateOption, CreateTextInput, CreateTextArea, CreateSubmit, CreateReset,
  Heading submenu:
    CreateHeading1, CreateHeading2, CreateHeading3, CreateHeading4, CreateHeading5, CreateHeading6
  List submenu:
    CreateList, CreateNumberedList, ThotCreateMenu, ThotCreateDirectory, CreateDefinitionList, CreateDefinitionTerm, CreateDefinitionDef
  Math submenu:
    CreateInlineMath, CreateMath, CreateMROOT, CreateMSQRT, CreateMFRAC, CreateMSUBSUP, CreateMSUB, CreateMSUP, CreateMUNDEROVER, CreateMUNDER, CreateMOVER, CreateMROW, CreateMMULTISCRIPTS, CreateMTABLE
  OBJECT submenu:
    CreateObject, CreateParameter
  Table submenu:
    CreateTable, CreateCaption, CreateTHead, CreateTBody, CreateTFoot, CreateRow, CreateDataCell, CreateHeadingCell, DeleteColumn
- In `Links` menu:

  LinkToPreviousTarget, CreateOrChangeLink, CreateTarget, DeleteAnchor.

- In `Views` menu:

  TtcSwitchButtonBar, TtcSwitchCommands, ShowMapAreas, ShowTargets, ZoomIn, ZoomOut, ShowStructure, ShowAlternate, ShowLinks, ShowToC., ShowSource

- In `Style` menu:
  Main Menu:

    TtcChangeCharacters, TtcChangeColors, TtcChangeFormat, ChangeBackgroundImage, CreateClass, ApplyClass.

  Style Sheets submenu:

    LinkCSS, OpenCSS, DisableCSS, EnableCSS, RemoveCSS.

  Information Types submenu:

    SetOnOffEmphasis, SetOnOffStrong, SetOnOffCite, SetOnOffDefinition, SetOnOffCode, SetOnOffVariable, SetOnOffSample, SetOnOffKeyboard, SetOnOffAbbr, SetOnOffAcronym, SetOnOffINS, SetOnOffDEL.

  Character Element submenu:

    SetOnOffItalic, SetOnOffBold, SetOnOffTeletype, SetOnOffBig, SetOnOffSmall, SetOnOffSub, SetOnOffSup, SetOnOffQuotation, SetOnOffBDO.

- In `Special` menu:

  SectionNumbering, MakeBook, MakeID, ShowLogFile, ConfigGeneral, ConfigPublish, ConfigCache, ConfigProxy, ConfigColor, ConfigGeometry, ConfigLanNeg, ConfigProfile, ConfigTemplates.

- In `Annotations` menu

  AnnotateSelection, AnnotateDocument, LoadAnnotations, PostAnnotation, DeleteAnnotation, FilterAnnot, ConfigAnnot.

- In `Help` menu:

  HelpAmaya, HelpAtW3C, HelpBrowsing, HelpSelecting, HelpSearching, HelpViews, HelpCreating, HelpLinks, HelpChanging, HelpTables, HelpMath, HelpSVG, HelpImageMaps, HelpStyleSheets, HelpAttributes, HelpPublishing, HelpPrinting, HelpNumbering, HelpMakeBook, HelpAnnotation, HelpConfigure, HelpShortCuts, HelpAccess.