JavaScript
var shifted_special_chars = (["+", "_", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "~", "?", "<", ">", "{", "}", "|", "\"", " ", ":"], {"+": "EQL", "_": "MINS", "!": "1", "@": "2", "#": "3", "$": "4", "%": "5", "^": "6", "&": "7", "*": "8", "(": "9", ")": "0", "~": "GRV", "?": "SLSH", "<": "COMM", ">": "DOT", "{": "LBRC", "}": "RBRC", "|": "BSLS", "\"": "QUOT", " ": "SPC", ":": "SCLN"});
//console.log("shifted_special_chars:", shifted_special_chars);
var unshifted_special_chars = (["=", "-", "`", "/", ",", ";", ".", "[", "]", "\\", "\""], {"=": "EQL", "-": "MINS", "`": "GRV", "/": "SLSH", ",": "COMM", ";": "SCLN", ".": "DOT", "[": "LBRC", "]": "RBRC", "\\": "BSLS", "\"": "QUOT"});
//console.log("unshifted_special_chars:", unshifted_special_chars);
// Symbol Object
var keys = {
"27 Keyboard 0 and )":"0",
"1E Keyboard 1 and !":"1",
"1F Keyboard 2 and @":"2",
"20 Keyboard 3 and #":"3",
"21 Keyboard 4 and $":"4",
"22 Keyboard 5 and %":"5",
"23 Keyboard 6 and ^":"6",
"24 Keyboard 7 and &":"7",
"25 Keyboard 8 and *":"8",
"26 Keyboard 9 and (":"9",
"00 Reserved (no event indicated)":"NO",
"01 Keyboard ErrorRollOver":"ROLL_OVER",
"02 Keyboard POSTFail":"POST_FAIL",
"03 Keyboard ErrorUndefined":"UNDEFINED",
"04 Keyboard a and A":"A",
"05 Keyboard b and B":"B",
"06 Keyboard c and C":"C",
"07 Keyboard d and D":"D",
"08 Keyboard e and E":"E",
"09 Keyboard f and F":"F",
"0A Keyboard g and G":"G",
"0B Keyboard h and H":"H",
"0C Keyboard i and I":"I",
"0D Keyboard j and J":"J",
"0E Keyboard k and K":"K",
"0F Keyboard l and L":"L",
"10 Keyboard m and M":"M",
"11 Keyboard n and N":"N",
"12 Keyboard o and O":"O",
"13 Keyboard p and P":"P",
"14 Keyboard q and Q":"Q",
"15 Keyboard r and R":"R",
"16 Keyboard s and S":"S",
"17 Keyboard t and T":"T",
"18 Keyboard u and U":"U",
"19 Keyboard v and V":"V",
"1A Keyboard w and W":"W",
"1B Keyboard x and X":"X",
"1C...