How to use "getkey" correct ?

조회 수: 33 (최근 30일)
Ole
Ole 2025년 12월 12일 12:42
댓글: Walter Roberson 2025년 12월 12일 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

채택된 답변

Star Strider
Star Strider 2025년 12월 12일 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
Star Strider
Star Strider 2025년 12월 12일 16:29
The only other option I can think of that could work is inputdlg or its friends.
Walter Roberson
Walter Roberson 2025년 12월 12일 20:55
Perhaps use a figure() or uifigure() WindowKeyPressFcn callback. https://www.mathworks.com/help/matlab/ref/matlab.ui.figure.html#buiwuyk-1-KeyPressFcn

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Desktop에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by