5250 Keyboard Reference
The tn5250.ttkeyboard
file must be in UTF-8 format.
All lines in the tn5250.ttkeyboard
file must end in a line feed or a carriage return/line
feed pair. All settings are case-sensitive.
The default tn5250.ttkeyboard
files are available for download:
Identifiers
These settings identify specific keyboard layouts and set off comments.
Setting | Description |
---|---|
+ | Name keyboard layout and begin section. Also ends previous keyboard
layout if one is present. A period in the name identifies the layout as subordinate
to another layout with the same name, but without the dot extension. It also prevents the layout name from being
displayed in TinyTERM. For example, +QWERTZ.shift is a
subordinate layout of +QWERTZ .+5250 Landscape |
# | Comment line. These can be inserted anywhere in the .ttkeyboard file.# Default layout in landscape mode |
General Settings
These settings can be placed anywhere in the tn5250.ttkeyboard
file, preceded with a
dash. They will affect all lines below them, until a new instance of the setting is found.
Setting | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bgColor | Background color for the keyboard layout. Uses hexadecimal RGB values preceded by the # sign; e.g.,
#000000 for black.-bgColor #7d8038 |
||||||||||||||||
fontSize | Maximum font size in points of main key labels. The label size will be
reduced automatically to fit the key if needed.-fontSize 30 |
||||||||||||||||
keyBgColor | Default background color for all keys in the layout.
Uses hexadecimal RGB values preceded by the # sign.-keyBgColor #141413 |
||||||||||||||||
keyboardHeight | Sets the height of the keyboard layout. Defaults to 180.-keyboardHeight 172 |
||||||||||||||||
keyboardWidth | Sets the width of the layout. Defaults to the full screen width.-keyboardWidth 130 |
||||||||||||||||
keyFgColor | Default color for the text on all keys in the layout.
Uses hexadecimal RGB values preceded by the # sign.-keyFgColor #6fede1 |
||||||||||||||||
keyHeight | Changes the default height of the keys, relative to a base value of 1.
keyHeight can be specified to the second decimal place, as
in the example below. It cannot be set to a specific number of pixels.
Default key height in pixels is calculated instead, based on the number of
key rows, the spacing and margin settings, iPhone
orientation, and individual keys not using the default keyHeight value.-keyHeight 1.44 |
||||||||||||||||
layout | Sets the position of the keyboard layout:
-layout 1
|
||||||||||||||||
lineJustification | Sets the justification for rows of keys:
-lineJustify 1
|
||||||||||||||||
margin | Minimum number of pixels on each edge – top, bottom, left and
right – of the keyboard.-margin 3 |
||||||||||||||||
orientation | Used only within layouts. Determines whether the
layout displays in portrait, landscape or both modes:
-orientation 1
|
||||||||||||||||
selKeyBgColor | Background color for keys when the key is pressed or locked.
Uses hexadecimal RGB values preceded by the # sign.-selKeyBgColor #121414 |
||||||||||||||||
selKeyFgColor | Text color for keys when the key is pressed or locked.
Uses hexadecimal RGB values preceded by the # sign.-selKeyFgColor #6fed78 |
||||||||||||||||
size | Changes the default width of keys, relative to a base value of 1.
size can be specified to the second decimal place. It cannot be
set to a specific number of pixels. Default key size in pixels
is calculated instead, based on the number of keys in the widest row, the
spacing and margin settings, iPhone orientation,
and any individual keys not using the default size value.-size 1.5 |
||||||||||||||||
spacing | Minimum number of pixels between keys-spacing 2 |
Key Options
When a key is defined within square brackets [ ], options may be added to the definition, set off by two semicolons. Many of the general settings can also be applied to individual keys, and so are repeated below with key-specific examples. Options are all case-sensitive.
When a semicolon is desired as a displayed character inside the brackets, such as for a label, separate it from the double semicolons by a space. Then use keyString to set the character, so the space isn't typed as part of the key:
[; ;;size=0.82;;keyString=\x003b]
Option | Description | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
\ | Escape character. Used for special characters
that have other uses without the \. Square brackets are not required for
this option.\\ |
|||||||||||||||||||
bgColor | Sets the background color for the key.
Uses hexadecimal RGB values preceded by the # sign.[Caps;;capsKey=1;;bgColor=#a1b2c3] |
|||||||||||||||||||
blank | When set to 1, prevents the key from being drawn. Used for creating
space between visible keys in addition to that specified by the spacing
attribute. Blank keys are treated as any others by general attributes.[BLANK;;blank=1] |
|||||||||||||||||||
capsKey | When set to 1, causes the key to act as a Caps Lock key,
regardless of other settings.[Caps;;capsKey=1] |
|||||||||||||||||||
hideKey | When set to 1, causes the key to hide the keyboard when tapped. Also
replaces any text with a keyboard graphic. The keyboard can be restored by
tapping the keyboard button in the title bar, or by double-tapping the
emulator screen.hideKey keys are not active for external keyboard layouts.[HIDE;;hideKey=1] |
|||||||||||||||||||
fgColor | Sets the text color for the key.
Uses hexadecimal RGB values preceded by the # sign.[Clear;;keyChar=1148;;fgColor=#3cb2a1] |
|||||||||||||||||||
fontSize | Sets the font size for the primary label of the key.[Clear;;keyChar=1148;;fontSize=15] |
|||||||||||||||||||
keyChar | Assigns a specific value to a key. Available values are
listed below.[Enter;;keyChar=13] |
|||||||||||||||||||
keyHeight | Changes the height of the individual key, relative to a base value of 1.
keyHeight can be specified to the second decimal place. Keys
taller than the default for the row expand into the next row down.
When making single a key taller than 1, free the space in the row below by
creating a key there with the blank option.[New Line;;keyHeight=2;;keyChar=1153] |
|||||||||||||||||||
keyString | Assigns a multi-character string to a key.
This allows you to create custom key mappings with multi-byte
sequences on a single keystroke.[Login;;keyString=username] |
|||||||||||||||||||
labelPosition | Sets vertical position and horizontal justification of the
primary key label.[,;;labelPosition=7] |
|||||||||||||||||||
printScreen | When set to 1, this key will print the current emulator screen. Defaults to 0.[prt;;printScreen=1] |
|||||||||||||||||||
selBgColor | Sets the background color for the key when pressed or locked.
Uses hexadecimal RGB values preceded by the # sign.[S;;selKeyBgColor=#e4e5ed] |
|||||||||||||||||||
selFgColor | Sets the text color for the font when the key is pressed or locked.
Uses hexadecimal RGB values preceded by the # sign.[D;;selKeyFgColor=#1ff514] |
|||||||||||||||||||
shiftId | Changes the identity of a shift key. By default, the ID for a given
shiftTo or shiftLock key is the layout it refers to. This option
overrides that behavior, giving the key a unique ID.[SLock;;shiftId=shiftLock;;shiftLock=5250 Landscape.shift] |
|||||||||||||||||||
shiftLock | Used without shiftTo , takes a keyboard layout name. The selected layout
will replace the current layout.[Fn;;shiftLock=QWERTZ.function] |
|||||||||||||||||||
Used with shiftTo , takes a numeric value that determines how the
key works. Also requires a shiftId label to identify the layout to return to.
[Shift;;shiftTo=QWERTZ.shift;;shiftLock=0] |
||||||||||||||||||||
shiftTo | Selects a keyboard layout to display whhen the shift key is pressed. The selected
layout will replace the current layout, based on the shiftLock setting.[Shift;;shiftTo=QWERTZ.shift] |
|||||||||||||||||||
size | Changes the width of the individual key, relative to a base value of 1.
size can be specified to the second decimal place.[Q;;size=1.45] |
Special Characters
The following characters are created with the escape character \.
Character | Value | Character | Value |
---|---|---|---|
\b | backspace (hex 08) | \\ | backslash (hex 5c) |
\[ | left square bracket (hex 5b) | \] | right square bracket (hex 5d) |
\r | carriage return (hex 0d) | \x | UTF-8 hexadecimal number; e.g., \x000d for carriage return |
\t | horizontal tab (hex 09) | \0 | octal constant; e.g., \011 for horizontal tab |
Note that all hexadecimal and octal values are for the ASCII character set for iOS compatibility. TinyTERM Enterprise for Android converts these to EBCDIC during communication with the mainframe system.
Special characters may be used in combination with the keyString
option to create complex sequences:
[PartNum;;keyString=015-249\tsku015249\x000d]
keyChar Values
The following values may be assigned to keys, using the keyChar
option. Values not listed have been reserved, and are not available.
Value | Keyboard Key | Value | Keyboard Key | |
---|---|---|---|---|
0-255 | Equivalent ASCII character1 | 62587 | Back Tab | |
8 | Backspace ⌫ | 62588 | Clear | |
9 | Tab | 62589 | Erase Input | |
13 | Enter | 62590 | Erase End of Field | |
61697 | Help | 62591 | Attn | |
61716 | Up ↑ | 62598 | Cursor Select | |
61717 | Down ↓ | 62599 | Field + | |
61718 | Right → | 62600 | Field - | |
61719 | Left ← | 62601 | Field Exit | |
61720 | Home | 62602 | Field Mark | |
61740 | Insert | 62603 | Dup | |
61741 | Delete | 62612 | Roll Up | |
62560-62583 | PF1 to PF24 | 62613 | Roll Down | |
62584-62586 | PA1 to PA3 | 62615 | Error Reset |
1As with the \x
and \0
special characters, ASCII values used with keyChar
are converted to
EBCDIC during communication with the mainframe.
Putting It All Together
As seen above, there are a variety of options for defining keyboard keys in TinyTERM. Combined, they can create just about any key design needed. Here are three examples from the sample keyboard layout. They all use these default values:
-keyHeight 1.4
-fontSize 20
[K;;keyString=k]
The first argument (here K) is always the key label. keyString
causes the key to send a lower-case k. Without it, the key would send the
label instead, upper-case K. Labeling like this gives an appearance
like that of a physical keyboard.
[Scan;;scanBarcode=1;;size=1.2;;fontSize=14]
This key does not send text. Instead, it uses scanBarcode
to activate the
rear-facing camera as a barcode scanner. (Note that this is only available on the Zebra ET1.) The
fontSize
argument makes the label text smaller than the default size of 20.
And size
makes the key wider than the K key described above.
[ABC;;size=1.3;;shiftLock=AZERTY.P;;fontSize=14]
Available from the function key layout, this key returns the user to the AZERTY.P
main layout. The shiftLock
option means that after typing on that layout, the
user will not automatically return to the function key layout.