Is it possible to assign keyboard shortcuts to trigger certain parts of my app in app designer, and if so, how?
124 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
rbme17
am 30 Mär. 2020
Kommentiert: Tom Parish
am 2 Nov. 2023
I was wondering if it's possible to assign user defined keyboard shortcuts to parts of the app in app designer.
For example,using a menu item with ctrl+L, or simply just L. Not sure if this is possible, but if anyone knows, please share
Thanks!
1 Kommentar
Akzeptierte Antwort
rbme17
am 7 Apr. 2020
Bearbeitet: rbme17
am 27 Okt. 2020
7 Kommentare
Tom Parish
am 2 Nov. 2023
I am trying to use this same method to update Values from exiting buttons.
Is the app.ChangeData a button or a callback function?
In my usecase i have a State button app.STOPbutton and a callback app.StopButtonValueChanged. I am trying to update a global variable with a keyboard press that is already actiavted when the State button app.STOPButton is pressed through the app.StopButton Changed callback.
Any guidance is appreciated.
function figure1KeyPress(app, event)
key = event.Key;
switch key
case 's'
app.STOPButtonValueChanged(app);
app.Message.Value = key; % return key value
case 'o'
app.SafetySwitchValueChanged(app);
app.Message.Value = key; % return key value
case 'r'
app.RESUMEButton(app);
app.Message.Value = key;
end
end
Weitere Antworten (1)
Abhisek Pradhan
am 2 Apr. 2020
There is similar question in following link on configuring a GUI button to keypress. Hope it helps.https://in.mathworks.com/matlabcentral/answers/12034-gui-button-with-keyboard-shortcut
Siehe auch
Kategorien
Mehr zu Migrate GUIDE Apps finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!