Overriding default Matlab key board short cuts
7 views (last 30 days)
Show older comments
In developing a gui programmatically using figure (not uifigure), I am running into a problem with applying shortcuts. I am using the figure key press function to apply a Ctrl+W short cut. Unfortunately, the default matlab Ctrl+W shortcut executes instead which closes the figure. Both the figure and window key press functions have been used to no success. Is there a way to apply onlymy short cuts to a figure?
NOTE: the same figure developed through GUIDE does NOT exhibit this behavior. Perhaps GUIDE sets the shortcuts somehow?
Issue can be resolved when removing this shortcut in matlab (Preferences --> Keyboard --> ShortCuts). This is not ideal as reminding every user to apply these changes is burdensome.
0 Comments
Answers (1)
Cris LaPierre
on 29 May 2020
You can manage keyboard shortcuts in your preferences. From the Home tab, click Preferences in the Environment section. When the Prefences open, naviagate to MATLAB > Keyboard > Shortcuts.
On my computer, this shortcut appears to be inherited from the Windows default shortcuts, meaning you may need to make this change at your system level and not in your preferences.
5 Comments
Cris LaPierre
on 29 May 2020
Ctrl+w also closes a guide app for me. How do you create a GUIDE figure that does not close? That could help find a way to get this working for your programmaticaly built app.
See Also
Categories
Find more on Interactive Control and Callbacks in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!