Path: blob/trunk/third_party/closure/goog/events/keynames.js
2868 views
// Copyright 2006 The Closure Library Authors. All Rights Reserved.1//2// Licensed under the Apache License, Version 2.0 (the "License");3// you may not use this file except in compliance with the License.4// You may obtain a copy of the License at5//6// http://www.apache.org/licenses/LICENSE-2.07//8// Unless required by applicable law or agreed to in writing, software9// distributed under the License is distributed on an "AS-IS" BASIS,10// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.11// See the License for the specific language governing permissions and12// limitations under the License.1314/**15* @fileoverview Constant declarations for common key codes.16*17* @author [email protected] (Emil A Eklund)18*/1920goog.provide('goog.events.KeyNames');212223/**24* Key names for common characters. These should be used with keyup/keydown25* events, since the .keyCode property on those is meant to indicate the26* *physical key* the user held down on the keyboard. Hence the mapping uses27* only the unshifted version of each key (e.g. no '#', since that's shift+3).28* Keypress events on the other hand generate (mostly) ASCII codes since they29* correspond to *characters* the user typed.30*31* For further reference: http://unixpapa.com/js/key.html32*33* This list is not localized and therefore some of the key codes are not34* correct for non-US keyboard layouts.35*36* @see goog.events.KeyCodes37* @enum {string}38*/39goog.events.KeyNames = {408: 'backspace',419: 'tab',4213: 'enter',4316: 'shift',4417: 'ctrl',4518: 'alt',4619: 'pause',4720: 'caps-lock',4827: 'esc',4932: 'space',5033: 'pg-up',5134: 'pg-down',5235: 'end',5336: 'home',5437: 'left',5538: 'up',5639: 'right',5740: 'down',5845: 'insert',5946: 'delete',6048: '0',6149: '1',6250: '2',6351: '3',6452: '4',6553: '5',6654: '6',6755: '7',6856: '8',6957: '9',7059: 'semicolon',7161: 'equals',7265: 'a',7366: 'b',7467: 'c',7568: 'd',7669: 'e',7770: 'f',7871: 'g',7972: 'h',8073: 'i',8174: 'j',8275: 'k',8376: 'l',8477: 'm',8578: 'n',8679: 'o',8780: 'p',8881: 'q',8982: 'r',9083: 's',9184: 't',9285: 'u',9386: 'v',9487: 'w',9588: 'x',9689: 'y',9790: 'z',9893: 'context',9996: 'num-0',10097: 'num-1',10198: 'num-2',10299: 'num-3',103100: 'num-4',104101: 'num-5',105102: 'num-6',106103: 'num-7',107104: 'num-8',108105: 'num-9',109106: 'num-multiply',110107: 'num-plus',111109: 'num-minus',112110: 'num-period',113111: 'num-division',114112: 'f1',115113: 'f2',116114: 'f3',117115: 'f4',118116: 'f5',119117: 'f6',120118: 'f7',121119: 'f8',122120: 'f9',123121: 'f10',124122: 'f11',125123: 'f12',126186: 'semicolon',127187: 'equals',128189: 'dash',129188: ',',130190: '.',131191: '/',132192: '`',133219: 'open-square-bracket',134220: '\\',135221: 'close-square-bracket',136222: 'single-quote',137224: 'win'138};139140141