RISC OS Open
Safeguarding the past, present and future of RISC OS for everyone
ROOL
Home | News | Downloads | Bugs | Bounties | Forum | Documents | Photos | Contact us
Account

Keyboard Scan Codes

Programmer's Reference Manuals
» Keyboard Scan Codes

Keyboard Scan Codes

These are often referred to as “INKEY codes” because they are used by the INKEY keyword in BASIC, and the corresponding OS_Byte keyboard scan calls.

Sorted by Number Sorted by Layout
# Key   # Key
0 Shift   32 PrintScreen
1 Ctrl   113 F1
2 Alt   114 F2
3 Left Shift   115 F3
4 Left Ctrl   20 F4
5 Left Alt   116 F5
6 Right Shift   117 F6
7 Right Ctrl   22 F7
8 Right Alt   118 F8
9 Left mouse   119 F9
10 Center mouse   30 F10
11 Right mouse   28 F11
16 Q   29 F12
17 3   65 A
18 4   100 B
19 5   82 C
20 F4   50 D
21 8   34 E
22 F7   67 F
23 -   83 G
25 Left   84 H
26 6 (keypad)   37 I
27 7 (keypad)   69 J
28 F11   70 K
29 F12   86 L
30 F10   101 M
31 ScrollLock   85 N
32 PrintScreen   54 O
33 W   55 P
34 E   16 Q
35 T   51 R
36 7   81 S
37 I   35 T
38 9   53 U
39 0   99 V
41 Down   33 W
42 8 (keypad)   66 X
43 9 (keypad)   68 Y
44 Break   97 Z
45 ~ (` ¬ on RiscPC and later)   39 0
46 £ (¥ on Japanese keyboards. Not present on standard UK/US post-Arc keyboards)   48 1
47 Backspace   49 2
48 1   17 3
49 2   18 4
50 D   19 5
51 R   52 6
52 6   36 7
53 U   21 8
54 O   38 9
55 P   102 ,
56 [   23 -
57 Up   103 .
58 + (keypad)   104 /
59 - (keypad)   56 [
60 Enter (keypad)   120 \ (# ~ on RiscPC and later (4th row, between ’ @ and Return))
61 Insert   88 ]
62 Home   87 ;
63 Pg Up   112 ESC
64 Caps   96 TAB
65 A   64 Caps
66 X   31 ScrollLock
67 F   77 NumLock
68 Y   44 Break
69 J   45 ~ (` ¬ on RiscPC and later)
70 K   46 £ (¥ on Japanese keyboards. Not present on standard UK/US post-Arc keyboards)
73 Return   47 Backspace
74 / (keypad)   61 Insert
76 . (keypad)   62 Home
77 NumLock   63 Pg Up
78 Pg Down   78 Pg Down
79 " (@ on RiscPC and later)   79 " (@ on RiscPC and later)
81 S   0 Shift
82 C   1 Ctrl
83 G   2 Alt
84 H   3 Left Shift
85 N   4 Left Ctrl
86 L   5 Left Alt
87 ;   125 Left Logo
88 ]   6 Right Shift
89 Delete   7 Right Ctrl
90 # (keypad)   8 Right Alt
91 * (keypad)   126 Right Logo
93 +   127 Menu
94 [extra key] (\ | on RiscPC and later)   98 Space
96 TAB   89 Delete
97 Z   73 Return
98 Space   105 End/Copy
99 V   57 Up
100 B   121 Right
101 M   25 Left
102 ,   41 Down
103 .   106 0 (keypad)
104 /   107 1 (keypad)
105 End/Copy   124 2 (keypad)
106 0 (keypad)   108 3 (keypad)
107 1 (keypad)   122 4 (keypad)
108 3 (keypad)   123 5 (keypad)
112 ESC   26 6 (keypad)
113 F1   27 7 (keypad)
114 F2   42 8 (keypad)
115 F3   43 9 (keypad)
116 F5   58 + (keypad)
117 F6   59 - (keypad)
118 F8   76 . (keypad)
119 F9   74 / (keypad)
120 \ (# ~ on RiscPC and later (4th row, between ’ @ and Return))   90 # (keypad)
121 Right   91 * (keypad)
122 4 (keypad)   60 Enter (keypad)
123 5 (keypad)   9 Left mouse
124 2 (keypad)   10 Center mouse
125 Left Logo   11 Right mouse
126 Right Logo   94 [extra key] (\ | on RiscPC and later)
127 Menu   93 +

See also

  • Character Codes
  • Low-Level Internal Key Numbers
  • OS_Byte 121
Revised on September 6, 2022 20:26:04 by Sprow (202)? (92.17.177.92)
Edit | Back in time (8 revisions) | See changes | History | Views: Print | Source | Linked from: Programmer's Reference Manuals, Character Codes, OS_Byte 121, OS_Byte 129 (scan range), OS_Byte 129 (scan single), OS_Byte 122, Low-Level Internal Key Numbers, Low-Level Internal Key Numbers (français)

Search the Wiki

Social

Follow us on and

ROOL Store

Buy RISC OS Open merchandise here, including SD cards for Raspberry Pi and more.

Donate! Why?

Help ROOL make things happen – please consider donating!

RISC OS IPR

RISC OS is an Open Source operating system owned by RISC OS Developments Ltd and licensed primarily under the Apache 2.0 license.

Navigation

  • Home Page
  • All Pages
  • Recently Revised
  • Authors
  • Feeds
Site design © RISC OS Open Limited 2018 except where indicated
The RISC OS Open Instiki theme is based on Insitki's default layout

Valid XHTML 1.0  |  Valid CSS

Instiki 0.19.1(MML+)
This site runs on Rails

Hosted by Arachsys