Keyboard Layouts

TinyTERM for iOS includes several keyboard layouts, which can replace or supplement the device's on-screen keyboard or an external keyboard. These layouts include custom multinational keyboards. Each of the main layouts function keys and other terminal keys such as Insert and End.

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 "PC English with Fn Keys" layout for portrait mode is defined with this code:

-spacing 2
-margin 1
-labelPosition 4

+PC English with Fn Keys.P
#PC-style keyboard
-keyboardHeight 264
-orientation 1 -layout 0
-keyHeight 0.9
-fontSize 12
-shiftFontSize 11
-keyHeight 1.2
-fontSize 20
-shiftLabelPosition 0
[Caps;;capsKey=1;;fontSize=11;;labelPosition=6;;size=1.98][A;;keyString=a;;size=1.45][S;;keyString=s;;size=1.45][D;;keyString=d;;size=1.45][F;;keyString=f;;size=1.45][G;;keyString=g;;size=1.45][H;;keyString=h;;size=1.45][J;;keyString=j;;size=1.45][K;;keyString=k;;size=1.45][L;;keyString=l;;size=1.45][; ;;size=1.45;;shiftLabel=:][';;size=1.45;;shiftLabel="][Enter;;size=2.2;;keyChar=13;;labelPosition=6;;fontSize=11]
[Shift;;fontSize=11;;labelPosition=6;;shiftTo=PC English with Fn Keys.P.fnshift;;size=2.77][Z;;keyString=z;;size=1.45][X;;keyString=x;;size=1.45][C;;keyString=c;;size=1.45][V;;keyString=v;;size=1.45][B;;keyString=b;;size=1.45][N;;keyString=n;;size=1.45][M;;keyString=m;;size=1.45][,;;size=1.45;;shiftLabel=<][.;;size=1.45;;shiftLabel=>][/;;size=1.45;;shiftLabel=?][Shift;;fontSize=11;;labelPosition=6;;shiftTo=PC English with Fn Keys.P.fnshift;;size=2.9]
[10 Key;;fontSize=11;;labelPosition=6;;shiftLock=PC English with Fn Keys.P.fnkeypad;;size=1.19][Abc;;fontSize=11;;labelPosition=6;;shiftLock=PC English with Fn Keys.P.none;;size=1.19][Ctrl;;shiftTo=PC English with Fn Keys.P.fnctrl;;labelPosition=6;;size=1.19;;fontSize=11][BLANK;;size=0.35;;blank=1][ ;;keyChar=32;;size=9.25][BLANK;;size=0.35;;blank=1][?;;keyChar=63234;;size=1.18][?;;keyChar=63233;;size=1.18][?;;keyChar=63232;;size=1.18][?;;keyChar=63235;;size=1.18][BLANK;;blank=1;;size=.4][BLANK;;size=.4;;blank=1][Hide;;hideKey=1;;size=1.18]

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

The first three 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 +PC English with Fn Keys.P. The + sign identifies the start of a new keyboard layout. The .P tag means this layout will only display in the list of keyboards when the iPad is in portrait orientation. Neither the + nor the .P displays as part of the layout name.

If there is an extension on the keyboard name, such as +PC English with Fn Keys.P.shift, the layout name will not be displayed in TinyTERM at all. Instead, the layout can only be accessed through shift arguments in other keyboard layouts.

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.

  • 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, the 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;;shiftLabel=|] 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 six keyboard files in total, three for iPad and three for iPhone or iPod Touch. Clicking a file name below will take you to the reference guide for that file, which also offers the opportunity to download the default files 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 file must have the appropriate name to be recognized by the appropriate emulator.

Only one keyboard layout file can be active at a time. To use the layouts from more than one .ttkeyboard file, combine them into a single file.

Once the .ttkeyboard file is created, it needs to be uploaded to TinyTERM. Instructions for that can be found here.

iOS User Guide Table of Contents