# About Keyboard Shortcuts

It is useful to invoke menu commands directly from the keyboard. The Thot toolkit enables you accomplish this using an application keyboard shortcuts file. This file defines a list of associations between an invoked command and a keyboard sequence.

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 / Entity ;``
OctalValue = '\' NUMBER ;
Entity = DecEntity / HexaEntity ;
DecEntity = '&' '#' NUMBER ';' ;
HexaEntity = '&' '#' 'x' HEXADECIMAL ';' ;`

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

The list of available commands is:

- Moving commands:
  - Move character by character: `TtcNextChar`, `TtcPreviousChar`
  - Move word by word: `TtcNextWord`, `TtcPreviousWord`
  - Move to then beginning/end of the current line: `TtcStartOfLine`, `TtcEndOfLine`
  - Move line by line:`TtcNextLine`,`TtcPreviousLine`
  - Move element by element: `TtcNextElement`,`TtcPreviousElement`, `TtcChildElement`, `TtcParentElement`
  - Scroll from page to page: `TtcPageDown`, `TtcPageUp`,`TtcPageTop`,`TtcPageEnd`
  - Scroll one line up or one line down: `TtcLineUp`, `TtcLineDown`

- Selection extension commands:
  - Select character by character: `TtcNextSelChar`, `TtcPreviousSelChar`
  - Select word by word: `TtcNextSelWord`, `TtcPreviousSelWord`
  - Select to then beginning/end of the current line: cStartOfLine`TtcSelStartOfLine`, `TtcSelEndOfLine`
  - Select line by line:`TtcNextSelLine`,`TtcPreviousSelLine`

- Follow a link or activate an HTML form element (menu, button, etc.): `DoAction`.

- Skip to the next (or the first if there is selection) link or HTML form element in the document: `NextLinkOrFormElement`.

- 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`, `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: `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`.