Special Keyboard Keys
MMBasic generates a single unique character for the function keys and other special keys on the keyboard. These are shown in this table as hexadecimal and decimal numbers:
Keyboard Key
Key Code (Hex)
Key Code (Decimal)
DEL
7F
127
Up Arrow
80
128
Down Arrow
81
129
Left Arrow
82
130
Right Arrow
83
131
Insert
84
132
Home
86
134
End
87
135
Page Up
88
136
Page Down
89
137
Alt
8B
139
F1/Shift F1
91/B1
145/177
F2/Shift F2
92/B2
146/178
F3/Shift F3 **
93/B3
147/179
F4/Shift F4 **
94/B4
148/180
F5/Shift F5 **
95/B5
149/181
F6/Shift F6 **
96/B6
150/182
F7/Shift F7 **
97/B7
151/183
F8/Shift F8 **
98/B8
152/184
F9/Shift F9
99/B9
153/185
F10/Shift F10
9A/BA
154/186
F11/Shift F11
9B/BB
155/187
F12/Shift F12
9C/BC
156/188
PrtScr/SysRq
9D
157
PAUSE/BREAK
9E
158
SHIFT_TAB
9F
159
SHIFT_DEL
A0
160
SHIFT_DOWN_ARROW
A1
161
SHIFT_RIGHT_ARROW
A3
163
** indicates also work for VT100 emulators
PicoMite User Manual
Page 207
For attached PS2 and USB keyboards, if the shift key is simultaneously pressed with the function keys F1 to F12 then 20 (hex) is added to the code (this is the equivalent of setting bit 5). For example Shift-F10 will generate BA (hex). The shift modifier works with the function keys F1 to F12; it is ignored for the other keys except TAB, DEL, DOWN_ARROW and RIGHT_ARROW as identified above. MMBasic will translate most VT100 escape codes generated by terminal emulators such as TeraTerm and Putty to these codes (the shift modifier only works for F3-F8). This means that a terminal emulator operating over a USB or a serial port opened as console will generate the same key codes as a directly attached keyboard.
Page 208