Page 1 of 1
					
				Question on KeysDown ()
				Posted: Mon Feb 03, 2014 11:27 am
				by penopia
				The Livecode Dictionary says  "The keysDown function returns empty if no keys are being pressed." But keysDown() function always returns "255" even I don't press any key. Anyone can explain this to me ? Thanks
			 
			
					
				Re: Question on KeysDown ()
				Posted: Mon Feb 03, 2014 1:00 pm
				by Mark
				Hi,
Which version of LiveCode do you use? Check your keyboard. Do you have any devices connected to USB, bluetooth or serial port for instance, which might cause this?
If I execute the syntax
in the message box, I get 65293, which is as expected, because that's the number of the return key.
Kind regards,
Mark
 
			 
			
					
				Re: Question on KeysDown ()
				Posted: Mon Feb 03, 2014 4:36 pm
				by dunbarx
				Hi.
Try this in a button:
Code: Select all
on mouseUp
   put random(99)
   wait 25
   put keysDown()
end mouseUp
You should always get a number, and then empty.
Craig Newman
 
			 
			
					
				Re: Question on KeysDown ()
				Posted: Wed Feb 05, 2014 5:02 am
				by penopia
				Thanks.. Markm Craig
I can't duplicated the problem in this computer, itls going well.
I'm going to check again my home computer again.
I checked all the number returned form keysDown function.
Where the number "255" comes from ?? ....  
Thanks again.