source: Dev/trunk/src/client/dojo/keys.js @ 493

Last change on this file since 493 was 483, checked in by hendrikvanantwerpen, 11 years ago

Added Dojo 1.9.3 release.

File size: 1.3 KB
Line 
1define(["./_base/kernel", "./sniff"], function(dojo, has){
2
3        // module:
4        //              dojo/keys
5
6        return dojo.keys = {
7                // summary:
8                //              Definitions for common key values.  Client code should test keyCode against these named constants,
9                //              as the actual codes can vary by browser.
10
11                BACKSPACE: 8,
12                TAB: 9,
13                CLEAR: 12,
14                ENTER: 13,
15                SHIFT: 16,
16                CTRL: 17,
17                ALT: 18,
18                META: has("webkit") ? 91 : 224,         // the apple key on macs
19                PAUSE: 19,
20                CAPS_LOCK: 20,
21                ESCAPE: 27,
22                SPACE: 32,
23                PAGE_UP: 33,
24                PAGE_DOWN: 34,
25                END: 35,
26                HOME: 36,
27                LEFT_ARROW: 37,
28                UP_ARROW: 38,
29                RIGHT_ARROW: 39,
30                DOWN_ARROW: 40,
31                INSERT: 45,
32                DELETE: 46,
33                HELP: 47,
34                LEFT_WINDOW: 91,
35                RIGHT_WINDOW: 92,
36                SELECT: 93,
37                NUMPAD_0: 96,
38                NUMPAD_1: 97,
39                NUMPAD_2: 98,
40                NUMPAD_3: 99,
41                NUMPAD_4: 100,
42                NUMPAD_5: 101,
43                NUMPAD_6: 102,
44                NUMPAD_7: 103,
45                NUMPAD_8: 104,
46                NUMPAD_9: 105,
47                NUMPAD_MULTIPLY: 106,
48                NUMPAD_PLUS: 107,
49                NUMPAD_ENTER: 108,
50                NUMPAD_MINUS: 109,
51                NUMPAD_PERIOD: 110,
52                NUMPAD_DIVIDE: 111,
53                F1: 112,
54                F2: 113,
55                F3: 114,
56                F4: 115,
57                F5: 116,
58                F6: 117,
59                F7: 118,
60                F8: 119,
61                F9: 120,
62                F10: 121,
63                F11: 122,
64                F12: 123,
65                F13: 124,
66                F14: 125,
67                F15: 126,
68                NUM_LOCK: 144,
69                SCROLL_LOCK: 145,
70                UP_DPAD: 175,
71                DOWN_DPAD: 176,
72                LEFT_DPAD: 177,
73                RIGHT_DPAD: 178,
74                // virtual key mapping
75                copyKey: has("mac") && !has("air") ? (has("safari") ? 91 : 224 ) : 17
76        };
77});
Note: See TracBrowser for help on using the repository browser.