Partilhar via


WinJS.Utilities.Key enumeration

Defines a set of keyboard values.

Syntax

var WinJS.Utilities.Key = {
  backspace : 8, 
  tab : 9, 
  enter : 13, 
  shift : 16, 
  ctrl : 17, 
  alt : 18, 
  pause : 19, 
  capsLock : 20, 
  escape : 27, 
  space : 32, 
  pageUp : 33, 
  pageDown : 34, 
  end : 35, 
  home : 36, 
  leftArrow : 37, 
  upArrow : 38, 
  rightArrow : 39, 
  downArrow : 40, 
  insert : 45, 
  deleteKey : 46, 
  num0 : 48, 
  num1 : 49, 
  num2 : 50, 
  num3 : 51, 
  num4 : 52, 
  num5 : 53, 
  num6 : 54, 
  num7 : 55, 
  num8 : 56, 
  num9 : 57, 
  a : 65, 
  b : 66, 
  c : 67, 
  d : 68, 
  e : 69, 
  f : 70, 
  g : 71, 
  h : 72, 
  i : 73, 
  j : 74, 
  k : 75, 
  l : 76, 
  m : 77, 
  n : 78, 
  o : 79, 
  p : 80, 
  q : 81, 
  r : 82, 
  s : 83, 
  t : 84, 
  u : 85, 
  v : 86, 
  w : 87, 
  x : 88, 
  y : 89, 
  z : 90, 
  leftWindows : 91, 
  rightWindows : 92, 
  menu : 93, 
  numPad0 : 96, 
  numPad1 : 97, 
  numPad2 : 98, 
  numPad3 : 99, 
  numPad4 : 100, 
  numPad5 : 101, 
  numPad6 : 102, 
  numPad7 : 103, 
  numPad8 : 104, 
  numPad9 : 105, 
  multiply : 106, 
  add : 107, 
  subtract : 109, 
  decimalPoint : 110, 
  divide : 111, 
  f1 : 112, 
  f2 : 113, 
  f3 : 114, 
  f4 : 115, 
  f5 : 116, 
  f6 : 117, 
  f7 : 118, 
  f8 : 119, 
  f9 : 120, 
  f10 : 121, 
  f11 : 122, 
  f12 : 123, 
  numLock : 144, 
  scrollLock : 145, 
  browserBack : 166, 
  browserForward : 167, 
  semicolon : 186, 
  equal : 187, 
  comma : 188, 
  dash : 189, 
  period : 190, 
  forwardSlash : 191, 
  graveAccent : 192, 
  openBracket : 219, 
  backSlash : 220, 
  closeBracket : 221, 
  singleQuote : 222
}

Members

The Key enumeration has these members.

Member Value Description
backspace 8

The BACKSPACE key.

tab 9

The TAB key.

enter 13

The ENTER key.

shift 16

The SHIFT key.

ctrl 17

The CTRL key.

alt 18

The ALT key.

pause 19

The PAUSE key.

capsLock 20

The CAPS LOCK key.

escape 27

The ESCAPE key.

space 32

The SPACE key.

pageUp 33

The PAGE UP key.

pageDown 34

The PAGE DOWN key.

end 35

The END key.

home 36

The HOME key.

leftArrow 37

The LEFT ARROW key.

upArrow 38

The UP ARROW key.

rightArrow 39

The RIGHT ARROW key.

downArrow 40

The DOWN ARROW key.

insert 45

The INSERT key.

deleteKey 46

The DELETE key.

num0 48

The 0 key.

num1 49

The 1 key.

num2 50

The 2 key.

num3 51

The 3 key.

num4 52

The 4 key.

num5 53

The 5 key.

num6 54

The 6 key.

num7 55

The 7 key.

num8 56

The 8 key.

num9 57

The 9 key.

a 65

The a key.

b 66

The b key.

c 67

The c key.

d 68

The d key.

e 69

The e key.

f 70

The f key.

g 71

The g key.

h 72

The h key.

i 73

The i key.

j 74

The j key.

k 75

The k key.

l 76

The l key.

m 77

The m key.

n 78

The n key.

o 79

The o key.

p 80

The p key.

q 81

The q key.

r 82

The r key.

s 83

The s key.

t 84

The t key.

u 85

The u key.

v 86

The v key.

w 87

The w key.

x 88

The x key.

y 89

The y key.

z 90

The z key.

leftWindows 91

The left Windows key.

rightWindows 92

The right Windows key.

menu 93

The menu key.

numPad0 96

The 0 key on the numerical keypad.

numPad1 97

The 1 key on the numerical keypad.

numPad2 98

The 2 key on the numerical keypad.

numPad3 99

The 3 key on the numerical keypad.

numPad4 100

The 4 key on the numerical keypad.

numPad5 101

The 5 key on the numerical keypad.

numPad6 102

The 6 key on the numerical keypad.

numPad7 103

The 7 key on the numerical keypad.

numPad8 104

The 8 key on the numerical keypad.

numPad9 105

The 9 key on the numerical keypad.

multiply 106

The multiplication key (*).

add 107

The addition key (+).

subtract 109

The subtraction key (-).

decimalPoint 110

The decimal point key (.)

divide 111

The division key (/).

F1 112

The F1 key.

F2 113

The F2 key.

F3 114

The F3 key.

F4 115

The F4 key.

F5 116

The F5 key.

F6 117

The F6 key.

F7 118

The F7 key.

F8 119

The F8 key.

F9 120

The F9 key.

F10 121

The F10 key.

F11 122

The F11 key.

F12 123

The F12 key.

numLock 144

The NUMBER LOCK key.

scrollLock 145

The SCROLL LOCK key.

browserBack 166

The browser BACK key.

browserForward 167

The browser FORWARD key.

semicolon 186

The semicolon key (;).

equal 187

The equals key (=).

comma 188

The comma key (,).

dash 189

The dash key (-).

period 190

The period key (.).

forwardSlash 191

The forward slash key (/).

graveAccent 192

The grave accent key (`).

openBracket 219

The open bracket key ([).

backSlash 220

The backslash key (\).

closeBracket 221

The close bracket key (]).

singleQuote 222

The single quote key (').

Requirements

Minimum WinJS version

WinJS 1.0

Namespace

WinJS.Utilities