Keyboard Layouts

TinyTERM for Android includes several custom keyboard layouts, which can replace or supplement the device's default on-screen keyboard or an external keyboard. The layouts available also vary based on the size of the Android device. Each layout includes numeric, function and other keys.




Creating a Keyboard Layout

It's also possible to create additional keyboard layouts and upload them to TinyTERM. Keyboard layouts are defined in a UTF-8 text file. For example, the main QWERTY key layout for UNIX emulation in portrait mode is defined with this code:

-spacing 3
-margin 0
-keyHeight 1.4
-fontSize 20

+QWERTY.P
#US English keyboard using codepage STD 437 MS-DOS Latin US, portrait mode
-orientation 1
-layout 0
-fontSize 23
-keyboardHeight 172
[Q;;keyString=q][W;;keyString=w][E;;keyString=e][R;;keyString=r][T;;keyString=t][Y;;keyString=y][U;;keyString=u][I;;keyString=i][O;;keyString=o][P;;keyString=p]
[A;;keyString=a][S;;keyString=s][D;;keyString=d][F;;keyString=f][G;;keyString=g][H;;keyString=h][J;;keyString=j][K;;keyString=k][L;;keyString=l]
[shift;;size=1.3;;shiftTo=QWERTY.P.shift;;fontSize=14][Z;;keyString=z][X;;keyString=x][C;;keyString=c][V;;keyString=v][B;;keyString=b][N;;keyString=n][M;;keyString=m][⌫;;keyChar=8;;size=1.8]
[123;;size=1.3;;shiftLock=QWERTY.P.123;;fontSize=14][fn;;shiftLock=QWERTY.P.fn;;size=1.3;;fontSize=14][space;;keyChar=32;;size=5;;fontSize=14][ctrl;;shiftTo=QWERTY.P.ctrl;;size=1.2;;fontSize=14][return;;keyChar=13;;size=1.8;;fontSize=14]

Each line of the definition creates a single row of keys. The above code corresponds to this keyboard layout:

The first four arguments control the general appearance of all keyboard layouts in the .ttkeyboard file that come after those settings. Any layout before those settings will not be affected by them.

The next important argument is the keyboard name, in this case +QWERTY.P. The + sign identifies the start of a new keyboard layout. The .P tag identifies this layout as being for portrait orientation. Neither the + nor the .P displays as part of the layout name.

Everything after the layout name is considered part of the individual layout, until another + sign is reached.

Lines starting with the # symbol are comments. Nothing here will be displayed as part of the layout.

The remaining lines are the actual key definitions. If the keys have no size arguments, they will be resized to fit the available space.




Defining Keys

There are three ways to define a key:

  • A single character
    A single character outside brackets will display as a separate key. For example, the string qwertyuiop would display as one key per letter. Lower-case letters used like this are displayed in upper case for the key labels, making the keys look more like those on a physical keyboard. They still send as lower-case when typed.

  • Enclosed within square brackets [ ]
    The value [esc;;keyChar=27] is one key. The key label is esc, and the value assigned is keyChar=27. That corresponds to ASCII value 27, the Escape key.
    This is also how to label a key with more than one character. For example, a Break key could simply be defined with [Break]. A key defined with only a label will send that label as a text string when pressed.

  • Preceded by the escape character \
    The key definition [\\;;size=1.1] includes \\ as one of these. Because certain characters are used in key definitions, they must be escaped with \ to be used as themselves.

Each terminal type has its own keyboard definitions, and thus its own keyboard file. TinyTERM uses three keyboard files in total, which must have the following names. Clicking a file name below will take you to the reference guide for that file, which also offers the opportunity to download the default file used by TinyTERM:




Using a Custom Keyboard Layout

Once a keyboard layout has been created, it needs to be saved in a text file in UTF-8 format. This makes virtually any character available to the TinyTERM keyboard. A number of text editors include a UTF-8 option. The name of the file must be preserved.

To include a custom keyboard in a configuration, export your current configuration. It'll be emailed as a file with the .ttconfig extension. That file is actually a zip file with the extension changed so TinyTERM can recognize it.

Rename the .ttconfig to a .zip file. Unzip it. Replace the existing .ttkeyboard file with your custom one. Zip everything back together, then rename the file to have the extension .ttconfig. You can email it back to the device and import it into TinyTERM from there.




Keyboard Swipe

TinyTERM Enterprise for Android allows you to swipe between top-level layouts. In the example above, QWERTY.P is a top-level layout, as are the QWERTZ.P and AZERTY.P layouts included with TinyTERM. Any custom layouts are also included in the swipe capability, once imported into TinyTERM.

Note that this only applies within an emulation type. For example, you can swipe between UNIX layouts, or between TN3270 layouts. But you can't swipe from a UNIX layout to a TN3270 or vice versa.


Android User Guide Table of Contents