Code covered by the BSD License  

Highlights from
MGetKey

Be the first to rate this file! 1 Download (last 30 days) File Size: 1.32 KB File ID: #25792

MGetKey

by Marcello Ferro

 

10 Nov 2009

Return the keyboard/mouse button code over figure.

| Watch this File

File Information
Description

ch = MGetKey(hFig) waits for keyboard/mouse button event over the specified figure handle (hFig) and returns the ascii code of the keyboard key or -1 if a mouse button was pressed (ch). An empty value is returned if an error occurs.

Unlike the (nice) getkey.m script, MGetKey does not need an auxiliary window.

MATLAB release MATLAB 7.2 (R2006a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
ui management Marcello Ferro 10 Nov 2009 09:29:49
wait key Marcello Ferro 10 Nov 2009 09:29:49
wait button Marcello Ferro 10 Nov 2009 09:29:49
mouse event Marcello Ferro 10 Nov 2009 09:29:49
keyboard event Marcello Ferro 10 Nov 2009 09:29:49
keyboard event Santiago Rodriguez 27 Oct 2010 19:57:24

Contact us at files@mathworks.com