Home | History | Annotate | Download | only in include

Lines Matching refs:keycode

155         if ('keyCode' in evt && 'key' in evt) {
156 return evt.key + ':' + evt.keyCode;
158 else if ('keyCode' in evt) {
159 return evt.keyCode;
167 // if char/charCode is available, prefer those, otherwise fall back to key/keyCode/which
176 else if (evt.keyCode && evt.type === 'keypress') {
177 // IE10 stores the char code as keyCode, and has no other useful properties
178 codepoint = evt.keyCode;
190 if (evt.keyCode) {
191 return keysyms.lookup(keysymFromKeyCode(evt.keyCode, evt.shiftKey));
199 // Given a keycode, try to predict which keysym it might be.
200 // If the keycode is unknown, null is returned.
201 function keysymFromKeyCode(keycode, shiftPressed) {
202 if (typeof(keycode) !== 'number') {
206 if (keycode >= 0x30 && keycode <= 0x39) {
207 return keycode; // digit
209 if (keycode >= 0x41 && keycode <= 0x5a) {
211 return shiftPressed ? keycode : keycode + 32; // A-Z
213 if (keycode >= 0x60 && keycode <= 0x69) {
214 return 0xffb0 + (keycode - 0x60); // numpad 0-9
217 switch(keycode) {
231 return nonCharacterKey({keyCode: keycode});
238 if (!evt.keyCode) { return null; }
239 var keycode = evt.keyCode;
241 if (keycode >= 0x70 && keycode <= 0x87) {
242 return 0xffbe + keycode - 0x70; // F1-F24
244 switch (keycode) {
290 // - determines a keyId identifying the key that was pressed (corresponding to the key/keyCode properties on the DOM event)
319 var isShift = evt.keyCode === 0x10 || evt.key === 'Shift';