Problem with waitforbuttonpress : Figure window not active

Hi,
When I use the waitforbuttonpress function even if the figure seems to be on the foreground and active if I press keys nothing happens, I have to press alt+tab twice to have it active again and be able to press keys. I use Matlab R2015a on windows8.
kp=waitforbuttonpress;
keypress=get(gcf,'currentcharacter');
Any idea ?

 採用された回答

Lline
Lline 2017 年 2 月 9 日

0 投票

Just found the solution. These lines were included in a loop. Just before these lines I was saving the figure so it was not a problem of the figure not being active but just that there was a lag due to the saving step.

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeInstall Products についてさらに検索

質問済み:

2017 年 2 月 8 日

回答済み:

2017 年 2 月 9 日

Community Treasure Hunt

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

Start Hunting!

Translated by