1 /** 2 * Copyright 2010 Scriptoid s.r.l 3 **/ 4 5 /**Just keeps all the codes we need for the application in one place and with name tag 6 *@see Char codes <a href="http://www.cambiaresearch.com/c4/702b8cd1-e5b0-42e6-83ac-25f0306e3e25/Javascript-Char-Codes-Key-Codes.aspx">http://www.cambiaresearch.com/c4/702b8cd1-e5b0-42e6-83ac-25f0306e3e25/Javascript-Char-Codes-Key-Codes.aspx</a> 7 * 8 *@see Event properties <a href="http://www.quirksmode.org/js/events_properties.html">http://www.quirksmode.org/js/events_properties.html</a> 9 **/ 10 var KEY = { 11 BACKSPACE : 8, 12 TAB : 9, 13 ENTER: 13, 14 SHIFT : 16, 15 CTRL : 17, 16 ALT : 18, 17 PAUSE : 19, 18 CAPS_LOCK: 20, 19 ESCAPE : 27, 20 PAGE_UP: 33, 21 PAGE_DOWN: 34, 22 END: 35, 23 HOME: 36, 24 25 LEFT : 37, 26 UP : 38, 27 RIGHT : 39, 28 DOWN : 40, 29 30 /**It seems that "Windows" key under Win7/Firefox has the same code 91*/ 31 COMMAND : 91, //for mac users 32 33 COMMAND_FIREFOX : 224, //for mac users firefox 34 35 INSERT: 45, 36 DELETE : 46, 37 38 NUMPAD2 : 98, 39 NUMPAD4 : 100, 40 NUMPAD8 : 104, 41 NUMPAD6 : 102, 42 43 NUM_LOCK : 144, 44 45 F7 : 118, 46 47 Z : 90, 48 Y : 89, 49 G : 71, 50 U : 85, 51 S : 83 52 }