Button Bar Layouts
TinyTERM for Mac includes a function key button bar below the main window. It can be turned on and off from the Emulation tab of TinyTERM's Preferences, from the Edit menu, or by typing ⌘K. Four layouts are included:
- Basic Function Keys: displays F1-F12
- IBM3151: displays F1-F12, as well as "Send" and "Send Line" keys
- VT220: displays PF1-PF4, F6-F20, and "Help" and "Do" keys
- Wyse60: displays F1-F16
Creating a Button Bar Layout
It's possible to create additional button bar layouts by editing the
itx.ttkeyboard file, located in your
Library/Application Support/TinyTERM-ITX folder. Before making any
changes to this file, make a backup copy so the original settings can be restored if
needed. You can also download a copy here.
itx.ttkeyboard is a UTF-8 text file that contains all the existing button
bar layouts. For example, the Basic Function Keys layout is defined like this:
Each line of key definitions generates a single row of keys. The above has one line, which corresponds to this button bar:
The first seven arguments control the general appearance the button bar, regardless of the layout selected.
-spacingis the number of pixels between keys
-marginis the minimum number of pixels for spacing from each edge of the keyboard
-labelPositionis the default position of the primary key label
-shiftLabelPositionis the default position of the secondary key label
-keyboardHeightis the height of the button bar in pixels
-fontSizeis the maximum size of the primary key labels
-shiftFontSizeis the maximum size of the secondary key labels
The next important argument is the keyboard name, in this case
+Basic Function Keys.
The + sign identifies the start of a new keyboard. It does not display as part of
the layout name. Everything after that is considered part of the keyboard layout,
until another + sign is reached. There also needs to be one full blank line after each
layout, even if it's at the end of the
If there is an extension on the keyboard name, such as
QWERTY (portrait).shift, the layout will not be listed in TinyTERM.
Instead, the layout can only be referenced by the
shiftLock arguments in other keyboard layouts.
Lines starting with the # symbol are comments. They will not be displayed as part of the layout.
The remaining lines are the actual key definitions. A keyboard layout may include any number of rows of keys. These will be placed in the available space at the best fit possible.
There are three ways to define a key:
- A single typed character
Any single UTF-8 character placed by itself in a keyboard row will generate a key for that character
- Enclosed within square brackets [ ]
The function keys in the example above are all defined this way. Each section of the key definition is set off with two semicolons ;; with the primary key label as the first argument.
- Preceded by the escape character \
Because certain characters are used in key definitions, they must be escaped to be used as individual keys. The \ also indicates octal or hexadecimal values, or special characters in a key sequence.
A reference guide to all arguments available for button bar layouts is available here.
Using a Custom Keyboard Layout
Once a new layout has been added to
itx.ttkeyboard, the file must
be saved in UTF-8 format. (A number of text editors include a UTF-8 option.) The
next time you start TinyTERM, the new button bar layouts will be available.