Contents
Files with names of the form *.ktb are key tables, and with names of the form *.kti are key subtables. They are used to bind braille device and computer keyboard key combinations to BRLTTY commands.
A key table consists of a sequence of directives, one per line, which define how keys and key combinations are to be interpreted. UTF-8 character encoding must be used. Whitespace (blanks, tabs) at the beginning of a line, as well as before and/or after any operand, is ignored. Lines containing only whitespace are ignored. If the first non-whitespace character of a line is # then that line is a comment and is ignored.
The precedence for resolving each key press/release event is as follows:
bind keys commands
Use this directive to define which BRLTTY command is executed when a particular combination of keys is pressed. The binding is defined within the current context.
The key combination which is to be bound. It's a sequence of one or more key and/or key group names separated by plus (+) signs. The final (or only) key name may be optionally prefixed with an exclamation (!) point. For example:
key1 group1 key1+key2 key1+key2+group1 !group1 key1+!key2
A key group name refers to any key within the named group. A specific key within the group may be identified by appending a dot (.) and a number to the group's name. The first key within a group is key #1 (e.g. keyGroupName.1).
The keys may be pressed in any order, with the exception that if the final key name is prefixed with an exclamation point then it must be pressed last. The exclamation point prefix means that the primary command (see below) is executed as soon as that key is pressed. If not used, the primary command is executed as soon as any of the keys is released.
The primary and secondary BRLTTY commands that are to be bound to the key combination. The two commands (primary first and secondary last) are separated from one another by a colon (:). Both commands are optional. If just a primary command is being bound then the colon needn't be supplied. All of these are valid:
The primary command is executed as described above. The secondary command is executed if the key combination is held for a while (i.e. when a long key press is detected). If the autorepeat feature is enabled then the secondary command is autorepeated if it has been defined, else the primary command is autorepeated.
For a list of commands, see The Command Reference.
One or more modifiers may be optionally appended to a command name by using a plus (+) sign as the separator. For example:
bind key command bind key command+modifier1 bind key command+modifier1+modifier2
For commands which enable/disable a feature:
For commands which move the braille window:
For commands which move the braille window to a specific line on the screen:
For commands which require an offset:
For commands which input any keyboard key (print or braille):
For commands which input characters (print or braille):
For commands which input braille characters:
For commands which input keyboard scancodes:
Examples:
bind Key1 CSRTRK bind Key1+Key2 CSRTRK+off bind Key1+Key3 CSRTRK+on bind Key4 TOP bind Key5 TOP+route bind VerticalSensor GOTOLINE+toleft+scaled bind Key6 CONTEXT+context1
context name title
Use this directive to define alternate ways to interpret certain key events and/or combinations. Switching to another context is done via the BRLTTY command CONTEXT+name.
A context contains definitions created by any of:
A context is created the first time it's selected. It may be reselected any number of times thereafter. These special contexts are predefined:
The default context. If a definition can't be found within the current context then it's looked up within the default context. This only applies to definitions created by:
All subsequent definitions until either the next context directive or the end of the current include level are created within the selected context. The initial context of the top-level key table is default. The initial context of an included key subtable is the context which was selected when it was included. Context changes within included key subtables don't affect the context of the including key table or subtable.
If a context has a title then it is persistent. When a key event causes a persistent context to be activated, that context remains current until a subsequent key event causes a different persistent context to be activated.
If a context doesn't have a title then it is temporary. When a key event causes a temporary context to be activated, that context is only used to interpret the very next key event.
Examples:
context menu context braille Braille Input context DESCCHAR
hide state
Use this directive to specify whether or not definitions created by:
and text added by:
are to be included within the key table's help text.
One of these keywords:
The specified hide state applies to all subsequent definitions and notes until either the next hide directive or the end of the current include level. The initial hide state of the top-level key table is off. The initial hide state of an included key subtable is the hide state that was in effect when it was included. Hide State changes within included key subtables don't affect the hide state of the including key table or subtable.
Examples:
hide on
hotkey key press release
Use this directive to bind the press and release events of a specific key to two separate BRLTTY commands. The bindings are defined within the current context.
Modifiers may be appended to the command names. See Bind Command Modifiers for details.
Specify the NOOP command if no command is to be executed. Specifying the NOOP command for both events effectively disables the key.
Examples:
hotkey Key1 CSRVIS+off CSRVIS+on hotkey Key2 NOOP NOOP
ifKey key directive
Use this directive to only process one or more directives if the device has a particular key.
Examples:
ifKey Key1 ifkey Key2 bind Key1+Key2 HOME
ifNotKey key directive
Use this directive to only process one or more directives if the device doesn't have a particular key.
Examples:
ifNotKey Key2 bind Key1 HOME
ifPlatform platform directive
Use this directive to only process one or more directives if running on the named host platform.
Examples:
ifPlatform android include android.kti
ifNotPlatform platform directive
Use this directive to only process one or more directives if not running on the named host platform.
Examples:
ifNotPlatform grub include advanced.kti
ignore key
Use this directive to ignore a specific key while within the current context.
Examples:
ignore Key1
isolated
Use this directive to isolate the current context. If a key binding can't be found within an isolated context then it won't be looked up within the default context.
Examples:
isolated
macro keys command ...
Use this directive to bind a sequence of BRLTY commands to a key combination.
Examples:
macro Key1+Key2 TOP LNEND
map key function
Use this directive to map a key to a braille keyboard function. The mapping is defined within the current context.
The name of the braille keyboard function. It may be one of the following keywords:
If a key combination consists only of keys which have been mapped to braille keyboard functions, and if those functions, when combined, form a valid braille keyboard command, then that command is executed as soon as any of the keys is released. A valid braille keyboard command must include either any combination of dot keys or the space bar (but not both). If at least one dot key is included then the braille keyboard functions specified by The Superimpose Directive within the same context are also implicitly included.
Examples:
map Key1 DOT1
note text
Use this directive to add a person-readable explanation to the key table's help text. Notes are commonly used, for example, to describe the placement, sizes, and shapes of the keys on the device.
Each note specifies exactly one line of explanatory text. Leading space is ignored so indentation cannot be specified.
There's no limit to the number of notes that may be added. All of them are gathered together and presented in a single block at the start of the key table's help text.
Examples:
note This is the first outer list element. note This is the second outer list element. note * Continue the second outer list element. note + The first element of an inner list. note + The second element of an inner list. note * The third line of the second outer list element.
The above example would be rendered as:
This is the first outer list element.
This is the second outer list element. Continue the second outer list element.
The third line of the second outer list element.
run keys name [argument ...]
Use this directive to bind a host command to a key combination.
Examples:
run Key1+Key2 pkill --exact brltty
superimpose function
Use this directive to implicitly include a braille keyboard function whenever a braille keyboard command consisting of at least one dot is executed. Only implicit inclusions defined within the current context are performed. Any number of these directives may be specified.
Examples:
superimpose DOT7
title <text>
Use this directive to specify a person-readable, one-line summary of the key table's purpose.
The title of the key table may be specified only once.
Examples:
title Bindings for Keypad-based Navigation
include file # comment
Use this directive to include the content of another file. It is recursive, which means that an included file can itself include yet another file. Care must be taken to ensure that an "include loop" is not created.
assign variable value
Use this directive to create or update a variable associated with the current nesting level (see The BeginVariables Directive) of the current include level (see The Include Directive). The variable is visible to the current and to lower include levels, but not to higher include levels.
Examples:
assign nullValue assign shortValue word assign longValue a\svalue\swith\sspaces assign IndirectValue \{variableName}
assignDefault variable value
Use this directive to assign a default value to a variable associated with the current nesting level (see The BeginVariables Directive) of the current include level (see The Include Directive). It's functionally equivalent to:
ifNotVar variable assign variable value
See The Assign Directive and The IfNotVar Directive for more details.
Examples:
assignDefault format plain\stext
assignGlobal variable value
Use this directive to create or update a variable associated with the global level. The variable is visible to all include levels. See The Assign Directive for more details.
Examples:
assignGlobal packageName BRLTTY
ifVar variable directive
Use this directive to only process one or more directives if a variable exists.
Examples:
ifVar var1 ifVar var2 assign concatenation \{var1}\{var2}
ifNotVar variable directive
Use this directive to only process one or more directives if a variable doesn't exist.
Examples:
ifNotVar var1 assign var1 default\svalue
beginVariables
Use this directive to open a new variable nesting level. The Assign Directive) will define variables at this new nesting level, and will hide variables with the same names in any previous nesting level. These variables will remain defined until The EndVariables Directive that is at the same variable nesting level.
Examples:
assign x 1 # \{x} evaluates to 1 beginVariables # \{x} still evaluates to 1 assign x 2 # \{x} now evaluates to 2 endVariables # \{x} evaluates to 1 again
endVariables
Use this directive to close the current variable nesting level. See The BeginVariables Directive for details.
listVariables
Use this directive to list all of the currently defined variables. It can be helpful when debugging.
endIf
Use this directive to terminate the current conditional nesting level.
Examples:
ifVar x These lines will be processed if a variable named x exists. endIf
else
Use this directive to negate the test associated with the current conditional nesting level.
Examples:
assign x some\svalue ifVar x These lines will be processed. else These lines won't be processed. endIf
name | description |
---|---|
off | no keyboard table |
braille | bindings for braille keyboards |
desktop | bindings for full keyboards |
keypad | bindings for keypad-based navigation |
laptop | bindings for keyboards without a keypad |
sun_type6 | bindings for Sun Type 6 keyboards |
code | name | aliases | others | usage |
---|---|---|---|---|
auto | autodetect | |||
al | Alva | ABT(3nn), Delphi(4nn), Satellite(5nn), Braille System 40, Braille Controller 640/680, Easy Link 12 | ||
at | Albatross | 46/80 | ||
ba | BrlAPI | BrlAPI client | ||
bc | BrailComm | III | ||
bd | Braudi | Pro | ||
bl | BrailleLite | 18/40/M20/M40 | ||
bm | Baum | Refreshabraille, Orbit, NLS eReader Zoomax, NBP B2G | BrailleConnect 12/24/32/40/64/80, Brailliant 24/32/40/64/80, Conny 12, DM80 Plus, EcoVario 24/32/40/64/80, Inka, NLS eReader Zoomax, Orbit Reader 20/40, PocketVario 24, Pronto! V3 18/40, Pronto! V4 18/40, RBT 40/80, Refreshabraille 18, SuperVario 32/40/64/80, Vario 40/80, VarioConnect 12/24/32/40/64/80, VarioPro 40/64/80, VarioUltra 20/32/40 | |
bn | BrailleNote | 18/32, Apex | ||
cb | CombiBraille | 25/45/85 | ||
ce | Cebra | 20/40/60/80/100/120/140 | ||
cn | Canute | 360 (40x9) | ||
dp | DotPad | |||
ec | EcoBraille | 20/40/80 | ||
eu | EuroBraille | AzerBraille, Clio, Esys, Iris, NoteBraille, Scriba | ||
fa | FrankAudiodata | B2K84 | ||
fs | FreedomScientific | VFO, Vispero | Focus 1 44/70/84, Focus 2 40/80, Focus 3+ (Blue) 14/40/80, PAC Mate 20/40 | |
hd | Hedo | ProfiLine, MobilLine | ||
hm | HIMS | Braille Sense, BrailleSense 6, SyncBraille, Braille Edge, Smart Beetle, QBrailleXL, eMotion | ||
ht | HandyTech | HelpTech | Modular 20/40/80, Modular Evolution 64/88, Modular Connect 88, Active Braille, Active Braille S, Active Star 40, Actilino, Activator, Activator Pro 64/80, Basic Braille 16/20/32/40/48/64/80, Basic Braille Plus 20/32/40/48/64/80/84, Braille Wave, Braillino, Easy Braille, Braille Star 40/80, Connect Braille 40, Bookworm | |
hw | HumanWare | APH Chameleon, APH Mantis, NLS eReader | Brailliant BI 14/32/40, Brailliant BI 20X/40X, Brailliant B 80, BrailleNote Touch, BrailleOne, APH Chameleon 20, APH Mantis Q40, NLS eReader | |
ic | Inceptor | Innovision | BrailleMe (20) | |
ir | Iris | KB | ||
lb | Libbraille | Libbraille | ||
lt | LogText | 32 | ||
mb | MultiBraille | MB125CR, MB145CR, MB185CR | ||
md | MDV | MB208, MB248, MB408L, MB408L+, Lilli Blu | ||
mm | BrailleMemo | Pocket, Smart, Next Touch | ||
mn | MiniBraille | 20 | ||
mt | Metec | BD-40 | ||
np | NinePoint | 8 | ||
pg | Pegasus | 20/27/40/80 | ||
pm | Papenmeier | Compact 486, Compact/Tiny, IB 80 CR Soft, 2D Lite (plus), 2D Screen Soft, EL 80, EL 2D 40/66/80, EL 40/66/70/80 S, EL 40/60/80 C, EL 2D 80 S, EL 40 P, EL 80 II, Elba 20/32, Trio 40/Elba20/Elba32, Live 20/40 | ||
sk | Seika | 3/4/5 (40), 80, Mini (16) | ||
tn | TechniBraille | Manager 40 | ||
ts | TSI | Navigator 20/40/80, PowerBraille 40/65/80 | ||
vd | VideoBraille | 40 | ||
vo | Voyager | Braille Pen, Easy Link | 44/70, Part232 (serial adapter), BraillePen/EasyLink | |
vs | VisioBraille | 20/40 |