Rank: 46747 based on 0 downloads (last 30 days) and 0 file submitted
photo

Aaron

E-mail

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Comments and Ratings by Aaron View all
Updated File Comments Rating
31 Jan 2010 getkey Get a (single) keypress (v2.0, june 2012) Author: Jos (10584)

I should also add that this function doesn't wait for input. So if no keys are pressed when it is called, it is bypassed, which is great for use in a while loop.

31 Jan 2010 getkey Get a (single) keypress (v2.0, june 2012) Author: Jos (10584)

Hey guys, I know Tristan and told him about this solution, and decided I'd post here in case any one else had this problem. I downloaded the Psychtoolbox (http://psychtoolbox.org/wikka.php?wakka=HomePage) which is free, and it has a command called KbCheck(). It can read keyboard input at any time even during a endless while loop. I drive a mobile robot using the WASD keys using it. Note: KbCheck outputs a weird key code, use KbName to convert to ASCII.

Contact us