Keypress Event

Description

The user pressed the key identified in the id field of the event template.

Mandatory/Optional

Optional.

Event Mask Bit

$00000400$

Event Template

context:u(2),code:c(1),id:u(2),flags:u(1),x:u(2),y:u(2)

Field

Description

context

Window containing resource that had focus when the key was pressed.

code

t

id

Hexadecimal key value, as follows:

 

Hex Value

Key

 

$0008$

Backspace

 

$0009$

Tab

 

$000C$

Clear (BBj 19.10+)

 

$0010$

Shift (BBj 19.10+)

 

$0011$

Control (BBj 19.10+)

 

$0012$

Alt (BBj 19.10+)

 

$0013$

Pause (BBj 19.10+)

 

$000D$

Return

 

$0014$

Caps Lock (BBj 19.10+)

 

$007F$

Delete

 

$0090$

Num Lock (BBj 19.10+)

 

$0091$

Scroll Lock (BBj 19.10+)

 

$009A$

Print Screen (BBj 19.10+)

 

$009D$

Command (macOS) (BBj 19.10+)

 

$012D$

Up arrow

 

$012E$

Down arrow

 

$012F$

Right arrow

 

$0130$

Left arrow

 

$0131$

Page up

 

$0132$

Page down

 

$0133$

Home

 

$0134$

End

 

$0138$

Insert

 

$013B$

Back tab

 

$013E$

Keypad 0 (numeric keypad with Num Lock off)

 

$013F$

Keypad 1

 

$0140$

Keypad 2

 

$0141$

Keypad 3

 

$0142$

Keypad 4

 

$0143$

Keypad 5

 

$0144$

Keypad 6

 

$0145$

Keypad 7

 

$0146$

Keypad 8

 

$0147$

Keypad 9

 

$014B$

F1

 

$014C$

F2

 

$014D$

F3

 

$014E$

F4

 

$014F$

F5

 

$0150$

F6

 

$0151$

F7

 

$0152$

F8

 

$0153$

F9

 

$0154$

F10

 

$0155$

F11

 

$0156$

F12

 

$0157$

F13 (BBj 19.10+)

 

$0158$

F14 (BBj 19.10+)

 

$0159$

F15 (BBj 19.10+)

 

$015A$

F16 (BBj 19.10+)

 

$01FB$

F17 (BBj 19.10+)

 

$015C$

F18 (BBj 19.10+)

 

$015D$

F19 (BBj 19.10+)

 

$015E$

F20 (BBj 19.10+)

 

$015F$

F21 (BBj 19.10+)

 

$0160$

F22 (BBj 19.10+)

 

$0161$

F23 (BBj 19.10+)

 

$0162$

F24 (BBj 19.10+)

 

$0174$

Keypad * (* on numeric keypad)

 

$0175$

Keypad - (- on numeric keypad)

 

$0176$

Keypad + (+ on numeric keypad)

 

$0177$

Keypad / (/ on numeric keypad)

 

$020C$

Windows (BBj 19.10+)

 

$020D$

Context Menu (BBj 19.10+)

flags

Key pressed:

$01$ = Shift

$02$ = Ctrl

$04$ = Alt

$08$ = Mac Cmd

 

x

Key location:

0 = Unknown

1 = Standard

2 = Left

3 = Right

4 = Numpad

(BBj 19.10+)

y

0

 

See Also

BBjKeypressEvent



______________________________________________________________________________________

Copyright BASIS International Ltd. BBj®, Visual PRO/5®, PRO/5®, and BBx® are registered trademarks.