Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-07-2014, 02:09 PM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
Take a look at this:

PHP Code:
//#CLIENTSIDE
function onkeyPressed(keycodekeyscancode) {
  
player.chat "keyname2" SPC keyName2(keycodeSPC "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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 07:56 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.