MGetKey

Return the keyboard/mouse button code over figure.
481 Downloads
Updated 10 Nov 2009

View License

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.

Cite As

Marcello Ferro (2024). MGetKey (https://www.mathworks.com/matlabcentral/fileexchange/25792-mgetkey), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2006a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Argument Definitions in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0