Button Bar Reference
itx.ttkeyboard file must be in UTF-8 format.
All lines in the file must end in a line feed or a carriage return/line
feed pair. All settings are case-sensitive.
These settings identify specific keyboard layouts and set off comments.
|+||Name layout and begin section. Also ends previous
layout if one is present. A period in the name identifies the layout as subordinate
to another layout with the same name, but without the dot extension. It also prevents the layout name from being
displayed in TinyTERM. For example,
|#||Comment line. These can be inserted anywhere in the .ttkeyboard file.
These settings can be placed anywhere in the .ttkeyboard file, preceded with a dash. They will affect all lines below them, until a new instance of the setting is found.
|fontSize||Maximum font size in points of main key labels. The label size will be
reduced automatically to fit the key if needed.
|keyboardHeight||Height of button bar in pixels.
|keyHeight||Changes the default height of the keys, relative to a base value of 1.
|labelPosition||Sets vertical position and horizontal justification of the main key label.
See image at right for the available values. Note that 0, 3 and 6 left-justify the
text; 2, 5 and 8 right-justify it; and 1, 4 and 7 center the label. Defaults to 4.
|lineJustification||Sets the justification for rows of keys:
|margin||Minimum number of free pixels on each edge – top, bottom, left and
right – of the keyboard.
|shiftFontSize||Maximum font size in points of
|shiftLabelPosition||Starting position of the
|size||Changes the default width of keys, relative to a base value of 1.
|spacing||Minimum number of pixels between keys
When a key is defined within square brackets [ ], options may be added to the definition, set off by two semicolons. Many of the general settings can also be applied to individual keys, and so are repeated below with key-specific examples. Options are all case-sensitive.
When a semicolon is desired as a displayed character inside the brackets, such as
for a label or
shiftLabel, separate it from the double semicolons by a space:
|\||Escape character. Used for special characters
that have other uses without the \. Square brackets are not required for
|\n||Line break. Used for key labels and the
|blank||When set to 1, prevents the key from being drawn. Used for creating
space between visible keys in addition to that specified by the
|capsKey||When set to 1, causes the key to act as a Caps Lock key, regardless of other settings.
|fontSize||Sets the font size for the primary label of the key.
|keyChar||Assigns a specific value to a key. Available values are listed below.
|keyHeight||Changes the height of the individual key, relative to a base value of 1.
|keyString||Assigns a multi-character string to a key.
This allows you to create custom key mappings with multi-byte
sequences on a single keystroke.
|labelPosition||Sets vertical position and horizontal justification of the primary key label.
|shiftFontSize||Sets the font size for the
|shiftId||Changes the identity of a shift key. By default, the ID for a given
|shiftLabelPosition||Sets vertical position and horizontal justification of the
|shiftLabel||Displays the character as secondary on the keyboard key. Most often used
to show what character will be typed when a
|shiftLock||Selects a keyboard layout to display. The selected layout
will replace the current layout. Note that all
|size||Changes the width of the individual key, relative to a base value of 1.
The following characters are created with the escape character \.
|\b||backspace (hex 08)||\\||backslash (hex 5c)|
|\[||left square bracket (hex 5b)||\]||right square bracket (hex 5d)|
|\r||carriage return (hex 0d)||\x||UTF-8 hexadecimal number; e.g., \x000d for carriage return|
|\t||horizontal tab (hex 09)||\0||octal constant; e.g., \011 for horizontal tab|
Special characters may be used in combination with the
option to create complex sequences:
The following values may be assigned to keys, using the
option. Values not listed have been reserved, and are not available.
|Value||Keyboard Key||Value||Keyboard Key|
|0-255||Equivalent ASCII character1||61747||Ctrl-Page Down|
|63236-63255||Function keys F1-F20||61748||Ctrl-⌫|
|63235||Right →||61751||Ctrl-Keypad -|
|63234||Left ←||61752||Ctrl-Keypad +|
|61721-61730||Numeric Keypad 0-9||61754||Keypad *|
|61731||Keypad -||61755||Keypad +|
|61732||Keypad ,||61756||Keypad /|
|61733||Keypad .||61757||Num Lock|
|61734||Keypad Enter||61758||Scroll Lock|
|61743||Ctrl-←||61769-61788||Shift-F1 to Shift-F20|
|61744||Print Screen||61789-61708||Ctrl-F1 to Ctrl-F202|
|61745||Shift-Tab||61809-61828||Alt-F1 to Alt-F20|
|61746||Ctrl-Page Up||61829-61848||Ctrl-Shift-F1 to Ctrl-Shift-F20|
1ASCII values are interpreted through the currently selected code page.
2Ctrl-F5 (key value 353) is also used for the VT220/VT320 Help key. Ctrl-F6 (key value 354) is also used for the VT220/VT320 Do key.
Putting It All Together
As seen above, there are a variety of options for defining keyboard keys in TinyTERM. Combined, they can create just about any key design needed. Here are two examples from the included button bar layouts. They use these default values:
The first argument (here F10) is always the key label.
causes the key to send the F10 function key to the host. The specific value of the
key changes with the terminal emulation, so this key will work for any emulation.
This key shows a more complex labeling scheme. The string
includes the line break
\n, so the label displays across two lines.
Given the default
-labelPosition 4 argument, the two-line string ends
up centered on the key.
keyString value sends an ASCII sequence built with
non-printable characters. It breaks down as:
escape ! 8 CR
Finally, the individual
fontSize argument makes the text slightly
smaller than default. This allows the entire label to fit on the key.