image thumbnail

Apply Standard+ Keyboard Shortcuts Keys to a Figure Window

version (7.69 KB) by Julian
Make regular+ Keyboard Shortcuts work after a Figure window grabs focus from the desktop.


Updated 26 Sep 2014

View License

I habitually use Keyboard shortcuts to get around, Ctrl+0 to go to the Command Window, Shift+Ctrl+0 to the editor etc., but as soon as a plot is thrown up they don't respond. What's more is that I often generate lots of figures and it is hard to get around by Alt-Tab. So I added these functions:
Close all windows (Ctrl+Shift+W)
Close all windows Except this one (Ctrl+Shift+E)
and (un)Dock all (Ctrl+Shift+A).
Reflects changes to shortcuts introduced by MATLAB R2012b.
It is most useful if set-up by default (see Help) using
set(0, 'DefaultFigureKeyPressFcn', @figDefaultKeyPress)

Cite As

Julian (2022). Apply Standard+ Keyboard Shortcuts Keys to a Figure Window (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2011a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Inspired by: DRAGZOOM - Drag and zoom tool

Community Treasure Hunt

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

Start Hunting!