Applies To:
  • CitectSCADA 4.xx, 5.xx, 6.XX
  • CitectHMI 4.xx, 5.xx, 6.XX

Summary:
This article defines how to create your own keyboard keys by specifying hexadecimal codes, (e.g. Left mouse button and SHIFT)
 

Solution:
The table below contains information on how to create your own keys, You are also able to subtract the shift ctrl and alt to get just the keyboard command you want. For example if you have SHIFT+F1 and you want just the F1 all you have to do is subtract the 0x1000. This can apply to all the other letters too.

Hex codes of the standard IBM-compatible keys:

Key Code (CitectSCADA label)

Key Code (Hex Value)

Key Description

KEY_LBUTTON

0x0001

Left Mouse Button

KEY_RBUTTON

0x0002

Right Mouse Button

KEY_MBUTTON

0x0004

Middle Mouse Button

KEY_LBUTTON_UP

0x0201

Left Mouse Button Up

KEY_RBUTTON_UP

0x0202

Right Mouse Button Up

KEY_MBUTTON_UP

0x0204

Middle Mouse Button Up

KEY_LBUTTON_DBL

0x0401

Left Mouse Button Double Click

KEY_RBUTTON_DBL

0x0402

Right Mouse Button Double Click

KEY_MBUTTON_DBL

0x0403

Middle Mouse Button Double Click

KEY_LBUTTON_DN

0x0801

Left Mouse Button Down

KEY_RBUTTON_DN

0x0802

Right Mouse Button Down

KEY_MBUTTON_DN

0x0804

Middle Mouse Button Down

KEY_LF

0x000A

Line Feed

KEY_VT

0x000B

Vertical Tab

KEY_FF

0x000C

Form Feed

KEY_RETURN

0x000D

Return

KEY_ENTER

0x000D

Enter (same key as above)

KEY_ESCAPE

0x001B

Escape

KEY_ESC

0x001B

Escape (same key as above)

KEY_DELETE

0x012E

Delete

KEY_PGUP

0x0121

PageUp

KEY_PGDN

0x0122

PageDown

KEY_END

0x0123

End

KEY_HOME

0x0124

Home

KEY_LEFT

0x0125

Cursor Left

KEY_UP

0x0126

Cursor Up

KEY_RIGHT

0x0127

Cursor Right

KEY_DOWN

0x0128

Cursor Down

KEY_INSERT

0x012D

Insert

KEY_HELP

0x012F

Help

KEY_F1

0x0170

F1

KEY_F2

0x0171

F2

KEY_F3

0x0172

F3

KEY_F4

0x0173

F4

KEY_F5

0x0174

F5

KEY_F6

0x0175

F6

KEY_F7

0x0176

F7

KEY_F8

0x0177

F8

KEY_F9

0x0178

F9

KEY_F10

0x0179

F10

KEY_F11

0x017A

F11

KEY_F12

0x017B

F12

KEY_F13

0x017C

F13

KEY_F14

0x017D

F14

KEY_F15

0x017E

F15

KEY_F16

0x017F

F16

KEY_F1_SHIFT

0x1170

Shift F1

KEY_F2_SHIFT

0x1171

Shift F2

KEY_F3_SHIFT

0x1172

Shift F3

KEY_F4_SHIFT

0x1173

Shift F4

KEY_F5_SHIFT

0x1174

Shift F5

KEY_F6_SHIFT

0x1175

Shift F6

KEY_F7_SHIFT

0x1176

Shift F7

KEY_F8_SHIFT

0x1177

Shift F8

KEY_F9_SHIFT

0x1178

Shift F9

KEY_F10_SHIFT

0x1179

Shift 10

KEY_F11_SHIFT

0x117A

Shift F11

KEY_F12_SHIFT

0x117B

Shift F12

KEY_F13_SHIFT

0x117C

Shift F13

KEY_F14_SHIFT

0x117D

Shift F14

KEY_F15_SHIFT

0x117E

Shift F15

KEY_F16_SHIFT

0x117F

Shift F16

KEY_F1_CTRL

0x2170

Ctrl F1

KEY_F2_CTRL

0x2171

Ctrl F2

KEY_F3_CTRL

0x2172

Ctrl F3

KEY_F4_CTRL

0x2173

Ctrl F4

KEY_F5_CTRL

0x2174

Ctrl F5

KEY_F6_CTRL

0x2175

Ctrl F6

KEY_F7_CTRL

0x2176

Ctrl F7

KEY_F8_CTRL

0x2177

Ctrl F8

KEY_F9_CTRL

0x2178

Ctrl F9

KEY_F10_CTRL

0x2179

Ctrl F10

KEY_F11_CTRL

0x217A

Ctrl F11

KEY_F12_CTRL

0x217B

Ctrl F12

KEY_F13_CTRL

0x217C

Ctrl F13

KEY_F14_CTRL

0x217D

Ctrl F14

KEY_F15_CTRL

0x217E

Ctrl F15

KEY_F16_CTRL

0x217F

Ctrl F16

KEY_A_SHIFT

0x1041

Shift A

KEY_B_SHIFT

0x1042

Shift B

KEY_C_SHIFT

0x1043

Shift C

KEY_D_SHIFT

0x1044

Shift D

KEY_E_SHIFT

0x1045

Shift E

KEY_F_SHIFT

0x1046

Shift F

KEY_G_SHIFT

0x1047

Shift G

KEY_H_SHIFT

0x1048

Shift H

KEY_I_SHIFT

0x1049

Shift I

KEY_J_SHIFT

0x104A

Shift J

KEY_K_SHIFT

0x104B

Shift K

KEY_L_SHIFT

0x104C

Shift L

KEY_M_SHIFT

0x104D

Shift M

KEY_N_SHIFT

0x104E

Shift N

KEY_O_SHIFT

0x104F

Shift O

KEY_P_SHIFT

0x1050

Shift P

KEY_Q_SHIFT

0x1051

Shift Q

KEY_R_SHIFT

0x1052

Shift R

KEY_S_SHIFT

0x1053

Shift S

KEY_T_SHIFT

0x1054

Shift T

KEY_U_SHIFT

0x1055

Shift U

KEY_V_SHIFT

0x1056

Shift V

KEY_W_SHIFT

0x1057

Shift W

KEY_X_SHIFT

0x1058

Shift X

KEY_Y_SHIFT

0x1059

Shift Y

KEY_Z_SHIFT

0x105A

Shift Z

KEY_A_CTRL

0x2041

Ctrl A

KEY_B_CTRL

0x2042

Ctrl B

KEY_C_CTRL

0x2043

Ctrl C

KEY_D_CTRL

0x2044

Ctrl D

KEY_E_CTRL

0x2045

Ctrl E

KEY_F_CTRL

0x2046

Ctrl F

KEY_G_CTRL

0x2047

Ctrl G

KEY_H_CTRL

0x2048

Ctrl H

KEY_I_CTRL

0x2049

Ctrl I

KEY_J_CTRL

0x204A

Ctrl J

KEY_K_CTRL

0x204B

Ctrl K

KEY_L_CTRL

0x204C

Ctrl L

KEY_M_CTRL

0x204D

Ctrl M

KEY_N_CTRL

0x204E

Ctrl N

KEY_O_CTRL

0x204F

Ctrl O

KEY_P_CTRL

0x2050

Ctrl P

KEY_Q_CTRL

0x2051

Ctrl Q

KEY_R_CTRL

0x2052

Ctrl R

KEY_S_CTRL

0x2053

Ctrl S

KEY_T_CTRL

0x2054

Ctrl T

KEY_U_CTRL

0x2055

Ctrl U

KEY_V_CTRL

0x2056

Ctrl V

KEY_W_CTRL

0x2057

Ctrl W

KEY_X_CTRL

0x2058

Ctrl X

KEY_Y_CTRL

0x2059

Ctrl Y

KEY_Z_CTRL

0x205A

Ctrl Z

KEY_A_ALT

0x4041

Alt A

KEY_B_ALT

0x4042

Alt B

KEY_C_ALT

0x4043

Alt C

KEY_D_ALT

0x4044

Alt D

KEY_E_ALT

0x4045

Alt E

KEY_F_ALT

0x4046

Alt F

KEY_G_ALT

0x4047

Alt G

KEY_H_ALT

0x4048

Alt H

KEY_I_ALT

0x4049

Alt I

KEY_J_ALT

0x404A

Alt J

KEY_K_ALT

0x404B

Alt K

KEY_L_ALT

0x404C

Alt L

KEY_M_ALT

0x404D

Alt M

KEY_N_ALT

0x404E

Alt N

KEY_O_ALT

0x404F

Alt O

KEY_P_ALT

0x4050

Alt P

KEY_Q_ALT

0x4051

Alt Q

KEY_R_ALT

0x4052

Alt R

KEY_S_ALT

0x4053

Alt S

KEY_T_ALT

0x4054

Alt T

KEY_U_ALT

0x4055

Alt U

KEY_V_ALT

0x4056

Alt V

KEY_W_ALT

0x4057

Alt W

KEY_X_ALT

0x4058

Alt X

KEY_Y_ALT

0x4059

Alt Y

KEY_Z_ALT

0x405A

Alt Z

To add the Shift key, add 0x1000 to the value of the key. In the example above it would be 0x0001 + 0x1000 = 0x1001
To add the Ctrl key, add 0x2000 to the value of the key.
To add the Alt key, add 0x4000 to the value of the key.

 

Keywords:
custom keyboard keys, keyboard code  

Attachments