
28. Changing keyboard shortcuts
Keyboard shortcuts are useful to invoke menu commands directly from the keyboard. You can
accomplish this using keyboard shortcuts files (one per paltform). These files define associations
between an invoked command and a keyboard sequence. They are located in the Amaya/config
directory: amaya.keyboard (Linux), amaya.kb (Windows) and amaya.kb-mac (Mac OS X).
• List of default keyboard shortcuts for Linux
• List of default keyboard shortcuts for Windows
• List of default keyboard shortcuts for Mac OS X
You can modify these files to define your own shortcuts. The syntax 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 ';' ;
The list of available commands is (an up to date list can be found in Amaya's sources : Amaya/amaya/
EDITOR.A) :
• 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:
TtcStartOfLine,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.
28. Changing keyboard shortcuts
93
Komentáře k této Příručce