How to use "getkey" correct ?
35 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Ole
le 12 Déc 2025 à 12:42
Commenté : Walter Roberson
le 12 Déc 2025 à 20:55
I am currently using "getkey" but it appears to include some falts. The worst one is that it stops matlab and goes to the matlab main window, however the maylab script still runs, but it is hard to use without seeing the figure of my apllication.
What alternative functions can be used instead of "getkey" ?
best regards
Ole
0 commentaires
Réponse acceptée
Star Strider
le 12 Déc 2025 à 12:57
I am not certain what you are doing. Two options could be waitfor or waitforbuttonpress. There are additional possibilities in the See Also section of both pages.
9 commentaires
Star Strider
le 12 Déc 2025 à 16:29
Walter Roberson
le 12 Déc 2025 à 20:55
Perhaps use a figure() or uifigure() WindowKeyPressFcn callback. https://www.mathworks.com/help/matlab/ref/matlab.ui.figure.html#buiwuyk-1-KeyPressFcn
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Desktop dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
