•
Introduction
Each keyboard is made up of a number of key maps. These correspond to the different modes of the keyboard (such as lowercase, uppercase, numeric, shifted lowercase etc etc). Each key map is made up of a number of rows. Each row is made of a number of keys.
A key map may be portrait (upright) or landscape (sideways-on). It may be full-screen (no application display may be seen) or just occupy part of the screen.
The key map is made up of one or two rectangle areas of display pixels - the keys and the display. If full screen then a display area will be required to show the text as entered. If part screen then a display area may not be needed as the application will probably show the text.
The key area is split into a grid of rows and columns of keys. These are evenly spaced in the rectangular area.
The default colours may be defined for each key map.
Each key is specified using the Unicode character set (see www.unicode.org) and, whilst often will be just one column wide, may be wider. Also the key’s colours and a text legend may be specified.
Each key map is often similar in shape to each other but they may be quite different if desired. In fact they are quite independent of each other. There is a limit of 16 key maps in a single keyboard.
Keyboard Layout File
Each keyboard is defined in a simple text file. To change the keyboard just change the file.
You just need to use a text editor (such as Notepad on a PC) and not a word processor (like Word).
The file should be named with an extension of KBL (example YOURKEYS.KBL) and contain no spaces or special characters (\ / + * ? etc).
Each line of the file contains information of a particular type. Each line consists of a number of parameters each separated by a comma. The first indicates the type of information and the rest its particular values.
Definition Types
The different types of information are:
T Title - the name of the keyboard
M Map - for each key map (uppercase, lowercase, shift etc)
R Row - for each row of keys within the map
K Key - for each individual key within the row
L Lock - for special lock keys
S Shift - for special shift keys
! Comment - for any helpful text you want to include
Title
The Title line should appear at the beginning of the file.
Format: T,Title Text
The Title Text will appear on the Settings option screen to describe the keyboard. Keep this brief.
Example: T, My First Keyboard
Map
A Map line appears at the beginning of the definition of a layout of keys. It has many parameters that define the type of keyboard and its position on the screen.
Format: M, landscape,full,top,left,bottom,right,rows,cols,top,left,
bottom,right,keycap,ink,highlight,background
landscape 1=landscape 0=portrait
full 1=full screen, 0=part screen
top,left,bottom,right screen rectangle containing keys
(pixels are numbered from the top and from the starting at
zero up to 207 and 319.
rows number of rows of keys
cols number of columns of keys
top,left,bottom,right rectangle containing output display (all zeroes for
none)
keycap default key cap colour (RRGGBB hex)
ink default ink (display & legend) colour
highlight highlight (activated/key down) colour
background colour of rest of screen
Example:
M,0,1,40,0,319,207,7,5,0,0,39,207, FFFFFF ,000000,333333,DDDDFF
Means: Portrait, full screen,keys in rectangle pixel 40 to bottom of screen (319) and full width (0 to 207), 7 rows of 5 columns, display area above in rect 0 to 39, again full width (0 to 207), white keycaps with black writing, dark grey when activated and light blue background.
NOTE A maximum of 16 maps may be used in one file.
Row
A Row line appears at the beginning of each row of keys (including immediately after a Map line).
Format: R,keycap,ink
keycap key cap colour (RRGGBB hex)
ink ink colour (RRGGBB hex)
Example: R,FFBBBB,00000 !for a row with pink keycaps
The trailing parameters may be omitted - in which case the default values of the previous Map line will apply to the row.
Example: R !to use default colours
Key
A Key line appears for each key in the row of keys.
Format: K,value,width,keycap,ink ,legend
value Unicode character value (hex)
width width of key in columns (default is 1)
keycap key cap colour (RRGGBB hex)
ink ink colour (RRGGBB hex)
legend on key (default is the Unicode character)
For Unicode character values visit www.unicode.org. There are some special key (non-Unicode) values too (see below).
NOTE The device only supports some Unicode character sets. The particular sets depend upon the country localisation. If the device does not support a character it will be displayed as a three sided box.
Example: K,0008,2,BBBBFF,000000,BS
! backspace
The trailing parameters (in square brackets) may be omitted in which case they default as indicated.
Example: K,20AC
! Euro currency symbol
Lock
A Lock line defines a special key that permanently switches to a different keyboard map. The maps are numbered sequentially from one for the first in the file.
Format: L,map,width,keycap,ink,legend
map keyboard map to change to (decimal)
width width of key in columns (default is 1)
keycap key cap colour (RRGGBB hex)
ink ink colour (RRGGBB hex)
legend on keycap
Example: L,2,1,BBBBFF,000000,CAPS
! Permanently change to key map 2
Shift
A Shift line defines a special key that temporarily switches to a different keyboard map for one key press. The maps are numbered sequentially from one for the first in the file.
Format: S,map,width,keycap,ink,legend
map keyboard map to change to (decimal)
width width of key in columns (default is 1)
keycap key cap colour (RRGGBB hex)
ink ink colour (RRGGBB hex)
legend on keycap
Example: S,3,1,BBBBFF,000000,Shift
! Temporarily change to key map 3
Comment
Comments are indicated by an exclamation mark and can be added anywhere (including at the end of other parameter lines) to add any helpful text. They extend to the end of the line.
Format: ! Helpful Text
Special Keys
There special values that can be assigned to keys to perform certain functions. Most of which are only useful for part screen keyboards.
0008 BS - Backspace
000D CR - Carriage return
F6DC Next - Move cursor to next field
F6DD Prev - Move cursor to previous field
F802 Home - Move cursor to start of field/line
F803 End - Move cursor to end of field/line
F807 Left - Move cursor left one character
F808 Right - Move cursor right one character
F809 Up - Move cursor up one line
F80A Down - Move cursor down one line
F7FE Horizontal - Move keyboard horizontally
F7FF Vertical - Move keyboard vertically
NOTE The actual results from these keys is application dependent.
Colours
Colours are defined in hex in format RRGGBB where RR is the red component (00 to FF), GG the green and BB the blue component. Although this indicates more than 16 million possible colours the actual number of colours supported is device dependant.
Examples: FF0000 Red
00FF00 Green
0000FF Blue
00FFFF Yellow
000000 Black
FFFFFF White
777777 Grey
Example File
Here is a very simple example of a complete file:
T,A simple example keyboard
! Just a very simple numeric only keyboard with two alternative layout maps
! Map 1 two row horizontal layout:
M,0,0,100,0,149,207,2,6,0,0,0,0,FFFFFF,000000,333333,DDDDFF
! Portrait,part screen, two rows of 6 keys. No display rect
! First row
R
K,0031
K,0032
K,0033
K,0034
K,0035
! Special backspace key:
K,0008,1,FFFFFF,BBBBFF,BS
! Second row
R
K,0036
K,0037
K,0038
K,0039
K,0030
! Special lock key to change to map 2 vertical layout:
L,2,1,FFFFFF,BBBBFF,Vert
! Map 2 one vertical column:
M,0,0,0,75,319,100,12,1,0,0,0,0,FFFFFF,000000,333333,DDDDFF
! Portrait,part screen, twelve rows of 1 key. No display rect
R
! Special backspace key:
K,0008,1,FFFFFF,BBBBFF,BS
R
K,0031
R
K,0032
R
K,0033
R
K,0034
R
K,0035
R
K,0036
R
K,0037
R
K,0038
R
K,0039
R
K,0030
R
! Special lock key to change to map 1 horizontal layout:
L,1,1,FFFFFF,BBBBFF,Horz
Installation
To install your completed keyboard file just copy it onto your phone memory:
On your PC, open My Pxxx then drag and drop (or copy and paste) the file to Phone Memory (NOT Memory Stick).
To use the new keyboard select the PopOnTop application, choose the Settings menu option and open the Keyboard drop down list. The new keyboard will be listed after the built in keyboards.
Keyboard files are read when the keyboard is next used, or when PopOnTop is disabled and enabled again. Any error in the keyboard file will be described on the About screen, with the line number that caused the problem.
Correct any error and install the corrected keyboard file.
You will need to disable and enable PopOnTop before it will try reading the same keyboard file again.