Keyboard #K

Command group to represent a keyboard for user inputs. Normally, the keyboard is connected to an EditBox.

Define layout of keyboard

(Keyboard Define Buttons)

#KDB

Obj-ID, Layout-No., "ButtonStringLine1"; ...; "ButtonStringLineN"

Definition of alternative key labels / styles

(Keyboard Define Styles)

#KDS

Obj-ID, Code, ButtonStyle, "Label"; Code1, ButtonStyle1, "Label1" ...; CodeN, ButtonStyleN, "LabelN";

Place and display keyboard

(Keyboard Place)

#KKP

Obj-ID, ButtonStyleNormal, ButtonStyleSpecial, x, y, Anchor, KeySpacing, TotalWidth, TotalHeight(0), Appear(0)


...

#KDB 1,1,"ASDF";"\NYXCV";"\O\O  ";

#KDS 1,24,3,"Alt";

#KKP 1,1,1,20,20,7,5,300

...


Define layout of keyboard

#KDB

Obj-ID, Layout-No., "ButtonStringLine1"; ...; "ButtonStringLineN"

A keyboard can have up to 4 different layouts (Layout-No.). Keys (codes) can be assigned to each layout. Multiple lines are separated by the end of the string ';' marked

Keys can be passed as a string (e.g. "ASDF") or as ASCII / Unicode (e.g. $41 $53 $44 $56). The following key codes are available for special keys:

Code

Code in string

Description

1

\1

Show keyboard No 1

2

\2

Show keyboard No 2

3

\3

Show keyboard No 3

4

\4

Show keyboard No 4

5

\5

SHIFT (Use keyboard No 2 for one key, then automatically keyboard no 1 again)

6

\6

CAPSLOCK (Switch between keyboard no 1 and no 2)

7

\7

DELETE

8

\8

BACKSPACE

9

\9

Reserved for future use

10

\A

Reserved for future use

11

\B

INSERT/ OVERWRITE

12

\C

CLEAR

13

\D

SEND

14

\E

Cursor left

15

\F

Cursor right

16

\G

Reserved for future use

17

\H

Reserved for future use

18

\I

POS1

19

\J

END

20

\K

Reserved for future use

21

\L

CANCEL

22

\M

Cursor On/Off

23

\N

Place holder (this code is not drawn, empty gap)

24 - 31

\O - \V

8 Function keys


Definition of alternative key labels / styles

#KDS

Obj-ID, Code, ButtonStyle, "Label"; Code1, ButtonStyle1, "Label1" ...; CodeN, ButtonStyleN, "LabelN";

A specific key code (Code) is assigned a special key label ("Label") and ButtonStyle. This setting overrides the style definition of the #KKP command. The ButtonStyles are not completely adopted: The size information from the ButtonStyle is ignored, the radius is adopted once. If the radius changes afterwards in the ButtonStyle, these values are not adopted in the keyboard, but a color change or TextStyle change does.


Place and display keyboard

#KKP

Obj-ID, ButtonStyleNormal, ButtonStyleSpecial, x, y, Anchor, KeySpacing, TotalWidth, TotalHeight(0), Appear(0)

The keyboard defined with the commands #KDB and #KDS is placed at x, y with the given Anchor. The width of a key is automatically calculated from the TotalWidth or the TotalHeight and the distances between the keys (KeySpacing). If the total height or total width = 0, this length is automatically calculated from the resulting key size. The size values are the desired maximum values. The buttons are split evenly. The ButtonStyleNormal defines the style for letters and numbers, ButtonStyleSpecial applies to special keys. The last parameter (Appear) indicates whether the keyboard is displayed immediately or appears according to a defined animation (#AOA / #AOR):

Appear

0

Keyboard is displayed immediately

>=1 (Time)

Keyboard appears according to animation in the defined time (in 1/100s)