WinJS.Utilities.Key enumeration

Applies to Windows and Windows Phone

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.

MemberValueDescription
backspace8

The BACKSPACE key.

tab9

The TAB key.

enter13

The ENTER key.

shift16

The SHIFT key.

ctrl17

The CTRL key.

alt18

The ALT key.

pause19

The PAUSE key.

capsLock20

The CAPS LOCK key.

escape27

The ESCAPE key.

space32

The SPACE key.

pageUp33

The PAGE UP key.

pageDown34

The PAGE DOWN key.

end35

The END key.

home36

The HOME key.

leftArrow37

The LEFT ARROW key.

upArrow38

The UP ARROW key.

rightArrow39

The RIGHT ARROW key.

downArrow40

The DOWN ARROW key.

insert45

The INSERT key.

deleteKey46

The DELETE key.

num048

The 0 key.

num149

The 1 key.

num250

The 2 key.

num351

The 3 key.

num452

The 4 key.

num553

The 5 key.

num654

The 6 key.

num755

The 7 key.

num856

The 8 key.

num957

The 9 key.

a65

The a key.

b66

The b key.

c67

The c key.

d68

The d key.

e69

The e key.

f70

The f key.

g71

The g key.

h72

The h key.

i73

The i key.

j74

The j key.

k75

The k key.

l76

The l key.

m77

The m key.

n78

The n key.

o79

The o key.

p80

The p key.

q81

The q key.

r82

The r key.

s83

The s key.

t84

The t key.

u85

The u key.

v86

The v key.

w87

The w key.

x88

The x key.

y89

The y key.

z90

The z key.

leftWindows91

The left Windows key.

rightWindows92

The right Windows key.

menu93

The menu key.

numPad096

The 0 key on the numerical keypad.

numPad197

The 1 key on the numerical keypad.

numPad298

The 2 key on the numerical keypad.

numPad399

The 3 key on the numerical keypad.

numPad4100

The 4 key on the numerical keypad.

numPad5101

The 5 key on the numerical keypad.

numPad6102

The 6 key on the numerical keypad.

numPad7103

The 7 key on the numerical keypad.

numPad8104

The 8 key on the numerical keypad.

numPad9105

The 9 key on the numerical keypad.

multiply106

The multiplication key (*).

add107

The addition key (+).

subtract109

The subtraction key (-).

decimalPoint110

The decimal point key (.)

divide111

The division key (/).

F1112

The F1 key.

F2113

The F2 key.

F3114

The F3 key.

F4115

The F4 key.

F5116

The F5 key.

F6117

The F6 key.

F7118

The F7 key.

F8119

The F8 key.

F9120

The F9 key.

F10121

The F10 key.

F11122

The F11 key.

F12123

The F12 key.

numLock144

The NUMBER LOCK key.

scrollLock145

The SCROLL LOCK key.

browserBack166

The browser BACK key.

browserForward167

The browser FORWARD key.

semicolon186

The semicolon key (;).

equal187

The equals key (=).

comma188

The comma key (,).

dash189

The dash key (-).

period190

The period key (.).

forwardSlash191

The forward slash key (/).

graveAccent192

The grave accent key (`).

openBracket219

The open bracket key ([).

backSlash220

The backslash key (\).

closeBracket221

The close bracket key (]).

singleQuote222

The single quote key (').

Requirements

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8.1

Namespace

WinJS.Utilities

Library

Base.js

 

 

Show:
© 2015 Microsoft