Thread: keyName2()?
View Single Post
  #2  
Old 02-03-2014, 12:18 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
Quote:
Originally Posted by 100Zero100 View Post
Seems broken.

keyName2(getKeycode("a")) should retrieve "a" and instead retrieves "A"

y it do dis?

Is there another method to retrieve a key name from its key code, without making my own array and doing it that way?
Wait, capital letters, and lowercase letters have seperate keycodes aside from the fact you have to press shift, to achieve the capital letter??

I did the following,

PHP Code:
getKeycode("a"); // result = 65
getKeycode("A"// result = 65
keyName2("45"); //result = "insert" 
As you can see it's not doing capital and lowercase it's doing which phisical button... what is it exactly you are trying to do maybe we can help guide you in another direction to accomplish this? Because it's already displaying which of the ~ 101-105 keys on the keyboard you pressed. To check if it's capital you need to know if the shift key was pressed or the cap lock was activated at the time of recording the key being pressed.
Reply With Quote