Code covered by the BSD License  

Highlights from
GETKEYNOW

Be the first to rate this file! 35 Downloads (last 30 days) File Size: 2.08 KB File ID: #7840

GETKEYNOW

by Jos (10584)

 

13 Jun 2005 (Updated 14 Jun 2005)

Get the currently pressed key.

| Watch this File

File Information
Description

CH = GETKEYNOW returns the currently pressed key in the main MATLAB window. If no key is pressed at that moment CH is empty.

See M-file for examples and a warning (!)
See also my GETKEY on the File Exhange

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
getkey

MATLAB release MATLAB 6.5 (R13)
Other requirements Java Windows
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
20 Jun 2005 Andreas Hartmann

Sounds good but does not work for me. In Matlab 7.04 apparently the rootframe is renamed to "com.mathworks.mde.desk.MLMainFrame". I changed that but the get always returns an empty userdata array.

29 Jun 2010 Mario Ismael

when I want:
>> getkeynow('init')
??? Error using ==> getkeynow
at 77
Cannot find root Java frame.

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
getkey Jos (10584) 22 Oct 2008 07:50:24
kbhit Jos (10584) 22 Oct 2008 07:50:24
input Jos (10584) 22 Oct 2008 07:50:24
utilities Jos (10584) 22 Oct 2008 07:50:24
keypress Jos (10584) 22 Oct 2008 07:50:24
getkey Gintautas 06 Dec 2008 15:07:44
getkey naigin kariat 03 Dec 2009 10:20:24

Contact us at files@mathworks.com