|
|
| File Information |
| Description |
GETKEYWAIT - get a key within a time limit
CH = GETKEYWAIT(P) waits for a keypress for a maximum of P seconds. P should be a positive number. CH is a double representing the key pressed key as an ascii number, including backspace (8), space (32), enter (13), etc. If a non-ascii key (Ctrl, Alt, etc.) is pressed, CH will be NaN.
If no key is pressed within P seconds, -1 is returned, and if something went wrong during excution 0 is returned.
See also input,
getkey (FileExchange) |
| Acknowledgements |
The author wishes to acknowledge the following in the creation of this submission:
getkey
|
| MATLAB release |
MATLAB 6.5 (R13)
|
| Other requirements |
works on most ML releases |
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Comments and Ratings (7) |
| 16 Aug 2005 |
urs (us) schwarz
|
|
|
| 26 Feb 2006 |
Inese Steinbahs
|
|
|
| 17 May 2007 |
Joseph Hollmann
|
|
|
| 27 May 2008 |
Iohan Sandoval
|
|
|
| 26 Jun 2008 |
kk kk
|
|
|
| 15 Sep 2009 |
Ehsan Negahbani
|
|
|
| 29 Oct 2009 |
Jesse Hopkins
|
|
|
| Updates |
| 17 Aug 2005 |
Timer object was not deleted which could cause problems after (many) repetitive calls. Thanks to us. |
| 17 Aug 2005 |
Timer object was not deleted which could cause problems after (many) repetitive calls. Thanks to us. |
| 17 Aug 2005 |
The timer object existed beyond the scope of the function, which could be problematic when the function is called often, e.g., in a long loop. |
| 23 Apr 2009 |
updated checks and output |
|
MATLAB Central Terms of Use
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central.
Read the complete Terms prior to use.
Contact us at files@mathworks.com