Free 14-Day Evaluations    
Product Downloads    

Sign in     


DESKTOP MOBILE DOWNLOAD PURCHASE SUPPORT INFO COMPANY
 Home  >>  Documentation  >>  TinyTERM ITX for iPhone  >>  Keyboard Layouts

Keyboard Layouts

TinyTERM ITX includes several keyboard layouts, in addition to being able to use the standard iPhone keyboard or an external keyboard. The available layouts in TinyTERM are variations on standard QWERTY, AZERTY and QWERTZ keyboards. These keyboards are available in both portrait and landscape variations, each of which has been customized to fit the iPhone screen while leaving sufficient room for the terminal screen.

Each layout also includes shifted, numeric, symbol and function key layouts. These are modified from the standard iPhone key layout, in order to make more readily available those characters commonly used at a UNIX or Linux shell prompt.

Creating a Keyboard Layout

It's also possible to create additional keyboard layouts and upload them to TinyTERM ITX for iPhone. Keyboard layouts are defined in a UTF-8 text file. For example, the English (STD 437) layout is defined like this:

spacing 5
-margin 1
-keyHeight 1.4
-fontSize 20

+QWERTY (portrait)
#US English keyboard using codepage STD 437 MS-DOS Latin US, portrait mode
[esc;;keyChar=27;;size=1.2][tab;;keyChar=9;;size=1.2]-/.*|<>
[q][w][e][r][t][y][u][i][o][p]
[a][s][d][f][g][h][j][k][l]
[shift;;size=1.3;;shiftLock=QWERTY (portrait).shift][z][x][c][v][b][n][m][⌫;;keyChar=8;;size=1.6]
[123;;size=1.3;;shiftLock=QWERTY (portrait).123][fn;;shiftLock=QWERTY (portrait).fn;;size=1.3][space;;keyChar=32;;size=5][ctrl;;ctrlKey=1;;size=1.2][return;;keyChar=13;;size=1.8]

Each line of the definition creates a single row of keys, with a maximum of five rows. This layout corresponds to this keyboard:

The first four arguments control the general appearance of custom keyboards, regardless of the layout selected.

  • -spacing is the number of pixels between keys.
  • -margin is the number of pixels to leave between the edges of the keyboard and the screen.
  • -fontSize is the maximum size of the key labels. The labels automatically resize smaller to fit the key.

The next important argument is the keyboard name, in this case +QWERTY (portrait). 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.

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 a maximum of five rows of keys at standard height. Increasing the keyHeight parameter sufficiently will decrease the number of rows available. There is no way to reduce the total space used by the keyboard.

The -spacing, -margin, -fontSize and -keyHeight options can also be used for individual keyboard sections. In this case, place them immediately after the initial layout heading. They will affect only that layout. For example:

+English (STD 437)
-spacing 1
-margin 4
-fontSize 35
-keyHeight 1.6
#US English keyboard using codepage STD 437 MS-DOS Latin US
[Esc;;keyChar=27][1;;shiftLabel=!][2;;shiftLabel=@][3;;shiftLabel=#][4;;shiftLabel=$] (etc.)

Defining Keys

There are three ways to define a key:

  • A single typed character
    The sequence -/.*|<> in the first line is comprised of these. Each is a single letter, and will display as a separate key.

  • Enclosed within square brackets [ ]
    The letter [q] is one of these. If it weren't within brackets, it would be capitalized automatically for display, but would still send a lower-case q when pressed.
    This is also how to label a key with more than one character. For example, the shift key is labeled like this.

  • Preceded by the escape character \
    The key definition \] is one of these. 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 keyboard layouts is available here.

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. (A number of text editors include a UTF-8 option.) The file must have the extension .ttkeyboard, but the name of the file can vary; e.g., keys.ttkeyboard. 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.

To download the keyboard file currently used by TinyTERM ITX, right-click here and save the file. You can see the keyboard layout options in use and compare them to the actual keyboards presented by TinyTERM. You can also edit them for personal use.

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

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