TinyTERM ITX 3270 includes
several keyboard layouts, which can replace or
supplement the iPad's on-screen keyboard or an external keyboard. Each uses standard iPad behaviors.
For example, tapping the Shift key once allows you to type a single shifted character. Double-tapping
the Shift key locks it until it is tapped again.
Layouts are sensitive to the iPad's orientation, so that portrait-mode keyboards are
not available in landscape mode, and vice versa. The available layouts in TinyTERM are:
- Standard iPad
This is the on-screen keyboard standard to the iPad.
- 3270 Landscape
This displays a keyboard modeled on the physical IBM 3278 terminal,
with allowance for the smaller form factor. It's designed to be used with the iPad in
landscape orientation.
- 3270 Portrait
This displays a keyboard identical to 3270 Landscape, but designed
for portrait orientation.
- PC Landscape
This displays a keyboard modeled after the type used by desktop PCs, with the
Enter key to the bottom right. The New Line key sits at
the right end of the center key row.
- PC Portrait
This also displays a PC-style keyboard, optimized for portrait orientation.
- 3270 Function Keys
Available only in landscape orientation, this layout uses the top right quarter of
the termian window to display PF keys and other special 3270 keys.
- Standard iPad Horizontal
In portrait orientation, this puts a narrow band of PF and other special keys across
the top of the main keyboard layout.
- 3270 Fn and Numeric Keys
This displays function keys, arrow keys and other keys that external
keyboards don't supply to TinyTERM ITX 3270 for iPad. It is only available when a dock
or Bluetooth keyboard is attached.
Creating a Keyboard Layout
It's also possible to create additional keyboard layouts and
upload them to TinyTERM ITX 3270 for iPad.
Keyboard layouts are defined in a UTF-8 text file. For example, the
3270 Portrait layout is defined with this code:
-spacing 3
-margin 5
-labelPosition 4
+3270 Portrait
#3270-style keyboard for portrait orientation
-keyboardHeight 264
-orientation 1
-layout 0
-keyHeight 0.9
-fontSize 11
-shiftFontSize 9
[Clear;;keyChar=1148][BLANK;;size=.2;;blank=1][PF1;;keyChar=1120][PF2;;keyChar=1121][PF3;;keyChar=1122][PF4;;keyChar=1123][BLANK;;size=.2;;blank=1][PF5;;keyChar=1124][PF6;;keyChar=1125][PF7;;keyChar=1126][PF8;;keyChar=1127][BLANK;;size=.2;;blank=1][PF9;;keyChar=1128][PF10;;keyChar=1129][PF11;;keyChar=1130][PF12;;keyChar=1131][BLANK;;size=.2;;blank=1][Home;;keyChar=280][Ins;;keyChar=300][Del;;keyChar=301][EEof;;keyChar=1150]
-keyHeight 1.19
-fontSize 15
[blank;;blank=1;;size=0.1][`;;size=1.1;;shiftLabel=~][1;;size=1.45;;shiftLabel=|][2;;size=1.45;;shiftLabel=@][3;;size=1.45;;shiftLabel=#][4;;size=1.45;;shiftLabel=$][5;;size=1.45;;shiftLabel=%][6;;size=1.45;;shiftLabel=¬][7;;size=1.45;;shiftLabel=&][8;;size=1.45;;shiftLabel=*][9;;size=1.45;;shiftLabel=(][0;;size=1.45;;shiftLabel=)][-;;size=1.45;;shiftLabel=_][=;;size=1.45;;shiftLabel=+][?;;keyChar=8;;size=1.6]
[blank;;blank=1;;size=0.1][Tab;;keyChar=9;;size=1.6;;labelPosition=6;;fontSize=11][Q;;keyString=q;;size=1.45][W;;keyString=w;;size=1.45][E;;keyString=e;;size=1.45][R;;keyString=r;;size=1.45][T;;keyString=t;;size=1.45][Y;;keyString=y;;size=1.45][U;;keyString=u;;size=1.45][I;;keyString=i;;size=1.45][O;;keyString=o;;size=1.45][P;;keyString=p;;size=1.45][¢;;size=1.45;;shiftLabel=!][\\;;size=1.45;;shiftLabel=|][BkTab;;keyChar=1147;;size=1.1;;fontSize=11]
[blank;;blank=1;;size=0.1][Caps;;capsKey=1;;fontSize=11;;labelPosition=6;;size=1.9][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="][{;;size=1.2;;shiftLabel=}][?;;keyHeight=2;;keyChar=1153]
[blank;;blank=1;;size=0.1][Shift;;fontSize=11;;labelPosition=6;;shiftTo=3270 Portrait.shift;;size=1.6][<;;size=1.1;;shiftLabel=>][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][.;;size=1.45][/;;size=1.45;;shiftLabel=?][Shift;;fontSize=11;;labelPosition=6;;shiftTo=3270 Portrait.shift;;size=1.8][BLANK;;blank=1]
[blank;;blank=1;;size=0.1][Fn;;fontSize=11;;labelPosition=6;;shiftLock=3270 Portrait.function;;size=1.19][BLANK;;blank=1;;size=1.19][BLANK;;size=.2;;blank=1][ ;;keyChar=32;;size=8.5][BLANK;;size=.2;;blank=1][?;;keyChar=279;;size=1.18][?;;keyChar=277;;size=1.18][?;;keyChar=276;;size=1.18][?;;keyChar=278;;size=1.18][BLANK;;blank=1;;size=.4][Enter;;keyChar=13;;size=1.9;;labelPosition=6;;fontSize=11][BLANK;;size=.4;;blank=1][Hide;;hideKey=1;;size=1.18][BLANK;;size=.15;;blank=1]
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
+3270 Portrait
.
The +
sign identifies the start of a new keyboard layout. It does not display as part of
the layout name. Everything after that is considered part of the individual layout,
until another +
sign is reached.
If there is an extension on the keyboard name, such as
+3270 Portrait.shift
, the layout name will not be displayed in TinyTERM.
Instead, the layout can only be accessed through the shiftTo
or
shiftLock
arguments in other keyboard layouts.
Lines starting with the # symbol are comments. Nothing here will be displayed as
part of the layout.
The remaining lines either customize the display of this particular keyboard layout,
or are the actual key definitions. This particular layout includes settings for its height,
the associated iPad orientation, key sizes and font sizes.
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 [Clear;;keyChar=1148]
is one key. The key label is
Clear
, and the value assigned is keyChar=1148
. That
corresponds to the Clear key on a 3270 terminal keyboard.
This is also how to label a key with more than one character. For example, the
Clear key could simply be defined with
[Clear]
. 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.45;;shiftLabel=|]
includes \\
as 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 text 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. 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 extension .ttkeyboard, but the
name of the file can vary; e.g., original.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,
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 3270 for
iPad. Instructions for that can be found here.