Overriding default Matlab key board short cuts

8 visualizaciones (últimos 30 días)
Joe  Hendrickson
Joe Hendrickson el 29 de Mayo de 2020
Comentada: Cris LaPierre el 29 de Mayo de 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.

Respuestas (1)

Cris LaPierre
Cris LaPierre el 29 de Mayo de 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 comentarios
Joe  Hendrickson
Joe Hendrickson el 29 de Mayo de 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 el 29 de Mayo de 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.

Iniciar sesión para comentar.

Categorías

Más información sobre Interactive Control and Callbacks en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by