Javascript is often used on the browser client side to perform simple tasks that would otherwise require a full postback to the server. Many of those simple tasks involve processing text or characters entered into a form element on a web page, and it is often necessary to know the javascript keycode associated with a character. Here is a reference.

Key

Code

Key

Code

Key

Code

backspace

8

e

69

numpad 8

104

tab

9

f

70

numpad 9

105

enter

13

g

71

multiply

106

shift

16

h

72

add

107

ctrl

17

i

73

subtract

109

alt

18

j

74

decimal point

110

pause/break

19

k

75

divide

111

caps lock

20

l

76

f1

112

escape

27

m

77

f2

113

page up

33

n

78

f3

114

page down

34

o

79

f4

115

end

35

p

80

f5

116

home

36

q

81

f6

117

left arrow

37

r

82

f7

118

up arrow

38

s

83

f8

119

right arrow

39

t

84

f9

120

down arrow

40

u

85

f10

121

insert

45

v

86

f11

122

delete

46

w

87

f12

123

0

48

x

88

num lock

144

1

49

y

89

scroll lock

145

2

50

z

90

semi-colon

186

3

51

left window key

91

equal sign

187

4

52

right window key

92

comma

188

5

53

select key

93

dash

189

6

54

numpad 0

96

period

190

7

55

numpad 1

97

forward slash

191

8

56

numpad 2

98

grave accent

192

9

57

numpad 3

99

open bracket

219

a

65

numpad 4

100

back slash

220

b

66

numpad 5

101

close braket

221

c

67

numpad 6

102

single quote

222

d

68

numpad 7

103