MGetKey
Version 1.0.0.0 (1.32 KB) by
Marcello Ferro
Return the keyboard/mouse button code over figure.
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 (2026). MGetKey (https://uk.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 LinuxCategories
Find more on Argument Definitions in Help Center and MATLAB Answers
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 |
