Take a look at this:
PHP Code:
//#CLIENTSIDE
function onkeyPressed(keycode, key, scancode) {
player.chat = "keyname2" SPC keyName2(keycode) SPC "keycode:" SPC keycode SPC "key:" SPC key SPC "scancode:" SPC scancode;
}
Here are results:
PHP Code:
Pressing "a" ===================== "keyname2 A keycode: 65 key: a scancode: 0"
Pressing "a" plus "left shift" === "keyname2 A keycode: 321 key: A scancode: 0"
Pressing "left shift" ============ "keyname2 Left Shift keycode: 160 key: scancode: 56"
What it looks like it is doing is showing you which key is pressed, not the ascii or hex value of the character you are typing. It also looks like keycode will equal 256 + hex value of character if shift is pressed.