Overriding default Matlab key board short cuts

7 Ansichten (letzte 30 Tage)
Joe  Hendrickson
Joe Hendrickson am 29 Mai 2020
Kommentiert: Cris LaPierre am 29 Mai 2020
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.

Antworten (1)

Cris LaPierre
Cris LaPierre am 29 Mai 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 Kommentare
Joe  Hendrickson
Joe Hendrickson am 29 Mai 2020
So GUIDE does not apply Windows default short cuts? This is ultimately a much larger question as gui developed programmatically or through GUIDE should be identical. But in terms of what default short cuts are applied, they are not
Cris LaPierre
Cris LaPierre am 29 Mai 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.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Interactive Control and Callbacks finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by