Key Codes

Macintosh uses key codes to identify the key being pressed on a keyboard. Below are these key codes, with horizontally the Most Significant Nybble, and vertically the Least Significant Nybble.

  0 1 2 3 4 5 6 7
0 a y u tab
tab
{nul} {nul} F5 {dle}
1 s t [ space . = F6 F15
2 d 1 i ` right
right
0 F7 help
3 f 2 p backspace
backspace
* 1 F3 begin
begin
4 h 3 return
return
enter
enter
{nul} 2 F8 previous
previous
5 g 4 l esc + 3 F9 delete
delete
6 z 6 j {nul} left
left
4 {dle} F4
7 x 5 ' command
command
clear
clear
5 F11 end
end
8 c = k shift
shift
down
down
6 {dle} F2
9 v 9 ; caps lock
caps lock
{nul} 7 F13 next
next
A § 7 \ option
option
{nul} {nul} {dle} F1
B b - , ctrl / 8 F14 left
left
C q 8 / [modifier 6] enter
enter
9 {dle} right
right
D w 0 n [modifier 7] up
up
{nul} F10 down
down
E e ] m [modifier 8] - {nul} {dle} up
up
F r o . {nul} {nul} {nul} F12 power
power
Standard keys Numeric key pad Extended keys

Modifier keys are shown bold.


2000-03-26