//////////////////////////////////
//
//    keyCode
//        by Colspan (Miyoshi)
//         http://colspan.net/
//        License : MIT license
//
// キー入力管理 ///////////////
var keyCode = {
  specialKeys : {
    8:  'Backspace',
    9:  'Tab',
    10: 'Enter',
    13: 'Enter',
    16: 'Shift',
    17: 'Control',
    27: 'ESC',
    32: 'Space',
    33: 'PageUp',
    34: 'PageDown',
    35: 'End',
    36: 'Home',
    37: 'Left',
    38: 'Up',
    39: 'Right',
    40: 'Down',
    45: 'Insert',
    46: 'Delete',
    112: 'F1',
    113: 'F2',
    114: 'F3',
    115: 'F4',
    116: 'F5',
    117: 'F6',
    118: 'F7',
    119: 'F8',
    120: 'F9',
    121: 'F10',
    122: 'F11',
    123: 'F12',
    224: 'Meta'
  },
  isAlphabet : function(code){
		return ( code >= 0x41 && code <= 0x5a ) || ( code >= 0x61 && code <= 0x7a );
	},
/*	isSymbol : function(code){
		var inputChar = String.fromCharCode(code);
		var symbolTable = '"\\()'+"!#$%&'=~|^-{}[]*`@:+;<,>.?/_";
		return symbolTable.indexOf( inputChar ) != -1;
	},*/
	isSymbol : function(code){
    return code >= 186 && code <= 191 || code >= 219 && code <= 222;
	},
  isNumeric : function(code){
    return code >= 0x30 && code <= 0x39;
  },
  isInputtable : function(code){
    return this.isAlphabet(code) || this.isSymbol(code) || this.isNumeric(code);
  },
  isSpecialKey : function(code){
    return this.specialKeys[code] != undefined;
  }
}

