Free 14-Day Evaluations    
Product Downloads    

Sign in     

 Home  >>  Documentation  >>  TinyTERM Plus for Windows  >>  Onscreen Keyboard

The Onscreen Keyboard

TinyTERM for Windows includes an onscreen keyboard below the main window. This requires that a layout file with the extension .ttkeyboard be in the user's Documents\TinyTERM folder in Windows. The file must then be referenced by the frameKeyboardFile argument in the tpx file.

The onscreen keyboard can be selected, or turned on and off, via the frameKeyboard setting in the tpx file. Three layouts are included in the sample frame.ttkeyboard file:

  • UNIX: provides F1-F12, and the standard island and arrow keys
  • TN3270: provides F1-F12, as well as several 3270 special functions
  • TN5250: provides F1-F12, as well as several 5250 special functions

This file is also available in the C:\Program Files (x86)\Century\TinyTERM folder.

Creating an Onscreen Keyboard Layout

It's also possible to create additional button bar layouts by editing the frame.ttkeyboard file. 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.

frame.ttkeyboard is an ASCII text file that contains the existing onscreen keyboard layouts. For example, the UNIX layout is defined like this:

-spacing 3
-margin 5
-fontSize 30

-keyboardHeight 100

Each line of key definitions generates a single row of keys. The above has one line, which corresponds to this button bar:

The first three 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
  • -fontSize is the maximum size of the primary key labels

The next important argument is the keyboard name, in this case +UNIX. The + sign identifies the start of a new keyboard. It does not display as part of the layout name, nor is it needed by the frameKeyboard argument.

Following that is the -keyboardHeight argument. This sets the number of pixels for the keyboard's height. It can be set in the general settings above, if desired. If it were, this option would override it.

Everything after the name 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 frame.ttkeyboard file.

Lines can also be started with the # symbol, to create 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 ASCII 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 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 onscreen keyboard layouts is available here.

Using a Custom Keyboard Layout

Once a new layout has been added to frame.ttkeyboard, the file must be saved in ASCII format. The new layouts will be available the next time a given .tpx file is opened.

  Copyright © 2018 Century Software, Inc. All Rights Reserved  TERMS OF USE PRIVACY POLICY EULA