Keyboard

Outputs the value defined by the key that is pressed when the block is activated. Otherwise, the output is zero.

    Keyboard

Library

SignalGenerators

Description

Outputs the value defined by the key that is pressed when the block is activated. Otherwise, the output is zero.
In case multiple keys are down the output is undefined and should not be relied upon. The supported key codes are the followings:

space -> 32 (0x20)
0 -> 48 (0x30)
1 -> 49 (0x31)
2 -> 50 (0x32)
3 -> 51 (0x33)
4 -> 52 (0x34)
5 -> 53 (0x35)
6 -> 54 (0x36)
7 -> 55 (0x37)
8 -> 56 (0x38)
9 -> 57 (0x39)
A -> 65 (0x41)
B -> 66 (0x42)
C -> 67 (0x43)
D -> 68 (0x44)
E -> 69 (0x45)
F -> 70 (0x46)
G -> 71 (0x47)
H -> 72 (0x48)
I -> 73 (0x49)
J -> 74 (0x4a)
K -> 75 (0x4b)
L -> 76 (0x4c)
M -> 77 (0x4d)
N -> 78 (0x4e)
O -> 79 (0x4f)
P -> 80 (0x50)
Q -> 81 (0x51)
R -> 82 (0x52)
S -> 83 (0x53)
T -> 84 (0x54)
U -> 85 (0x55)
V -> 86 (0x56)
W -> 87 (0x57)
X -> 88 (0x58)
Y -> 89 (0x59)
Z -> 90 (0x5a)
a -> 65 (0x41)
b -> 66 (0x42)
c -> 67 (0x43)
d -> 68 (0x44)
e -> 69 (0x45)
f -> 70 (0x46)
g -> 71 (0x47)
h -> 72 (0x48)
i -> 73 (0x49)
j -> 74 (0x4a)
k -> 75 (0x4b)
l -> 76 (0x4c)
m -> 77 (0x4d)
n -> 78 (0x4e)
o -> 79 (0x4f)
p -> 80 (0x50)
q -> 81 (0x51)
r -> 82 (0x52)
s -> 83 (0x53)
t -> 84 (0x54)
u -> 85 (0x55)
v -> 86 (0x56)
w -> 87 (0x57)
x -> 88 (0x58)
y -> 89 (0x59)
z -> 90 (0x5a)
BackSpace -> 8 (0x08)
Tab -> 9 (0x09)
Return -> 13 (0x0d)
Pause -> 19 (0x13)
Scroll_Lock -> 145 (0x91)
Escape -> 27 (0x1b)
Home -> 36 (0x24)
Left -> 37 (0x25)
Up -> 38 (0x26)
Right -> 39 (0x27)
Down -> 40 (0x28)
Page_Up -> 33 (0x21)
Page_Down -> 34 (0x22)
End -> 35 (0x23)
Select -> 41 (0x29)
Print -> 42 (0x2a) -> 44 (0x2c)
Execute -> 43 (0x2b)
Insert -> 45 (0x2d)
Help -> 47 (0x2f)
Num_Lock -> 144 (0x90)
KP_Multiply -> 106 (0x6a)
KP_Add -> 107 (0x6b)
KP_Separator -> 108 (0x6c)
KP_Subtract -> 109 (0x6d)
KP_Decimal -> 110 (0x6e)
KP_Divide -> 111 (0x6f)
KP_0 -> 96 (0x60)
KP_1 -> 97 (0x61)
KP_2 -> 98 (0x62)
KP_3 -> 99 (0x63)
KP_4 -> 100 (0x64)
KP_5 -> 101 (0x65)
KP_6 -> 102 (0x66)
KP_7 -> 103 (0x67)
KP_8 -> 104 (0x68)
KP_9 -> 105 (0x69)
F1 -> 112 (0x70)
F2 -> 113 (0x71)
F3 -> 114 (0x72)
F4 -> 115 (0x73)
F5 -> 116 (0x74)
F6 -> 117 (0x75)
F7 -> 118 (0x76)
F8 -> 119 (0x77)
F9 -> 120 (0x78)
F10 -> 121 (0x79)
F11 -> 122 (0x7a)
F12 -> 123 (0x7b)
F13 -> 124 (0x7c)
F14 -> 125 (0x7d)
F15 -> 126 (0x7e)
F16 -> 127 (0x7f)
F17 -> 128 (0x80)
F18 -> 129 (0x81)
F19 -> 130 (0x82)
F20 -> 131 (0x83)
F21 -> 132 (0x84)
F22 -> 133 (0x85)
F23 -> 134 (0x86)
F24 -> 135 (0x87)
Shift_L -> 16 (0x10), 160 (0xa0)
Shift_R -> 16 (0x10), 161 (0xa1)
Control_L -> 17 (0x11), 162 (0xa2)
Control_R -> 17 (0x11), 163 (0xa3)
Caps_Lock -> 20 (0x14)
Alt_L -> 18 (0x12), 164 (0xa4)
Alt_R -> 18 (0x12), 165 (0xa5)
Delete -> 46 (0x2e)

Parameters

Keyboard_0

NameLabelDescriptionData TypeValid Values

matkeys

Key value pairs

Defines a two-column matrix. The first column designates the key(s) and the second the corresponding output value(s).

Matrix of size Mx2

typ

Output datatype

The datatype of the output. Supported types are: double, int8, int16, int32, uint8, uint16, uint32.

String

'double'
'int32'
'int16'
'int8'
'uint32'
'uint16'
'uint8'

Ports

NameTypeDescriptionIO TypeNumber

Port 1

explicit

output

1

Port 2

activation

input

1