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:

-spacing 3
-margin 5
-labelPosition 4
-shiftLabelPosition 2
-keyboardHeight 50
-fontSize 30
-shiftFontSize 30

+Basic Function Keys
[F1;;keyChar=256][F2;;keyChar=257][F3;;keyChar=258][F4;;keyChar=259][BLANK;;size=.2;;blank=1][F5;;keyChar=260][F6;;keyChar=261][F7;;keyChar=262][F8;;keyChar=263][BLANK;;size=.2;;blank=1][F9;;keyChar=264][F10;;keyChar=265][F11;;keyChar=266][F12;;keyChar=267]

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.

  • -spacing is the number of pixels between keys
  • -margin is the minimum number of pixels for spacing from each edge of the keyboard
  • -labelPosition is the default position of the primary key label
  • -shiftLabelPosition is the default position of the secondary key label
  • -keyboardHeight is the height of the button bar in pixels
  • -fontSize is the maximum size of the primary key labels
  • -shiftFontSize is 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 itx.ttkeyboard file.

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 shiftTo or 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.




Defining Keys

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.

Back to TinyTERM for Mac documentation index