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:
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.
+ sign identifies the start of a new keyboard layout.
.P tag means this layout will only display in the list of
keyboards when the iPad is in portrait orientation. Neither the
+ nor the
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,
+ 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.
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
qwertyuiopwould display as one key per letter.
- Enclosed within square brackets [ ]
[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
\\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.