Check for key strokes while running a separate loop

1 回表示 (過去 30 日間)
Michal Elad
Michal Elad 2021 年 8 月 22 日
回答済み: Voss 2021 年 8 月 24 日
Hi :)
I'm trying to check for keyboard strokes timing while presenting photos on the screen. I don't want the timing of the presentation to be influenced by the keystroke, just to record it in the back.
Any suggestions on how to do it?
Thank you,
Michal
  1 件のコメント
Adam Danz
Adam Danz 2021 年 8 月 23 日
You can assign a buttonDownFcn or a windowButtonDownFcn to the axes, figure, or object that responds to keyboard interactions. The callback function can write the keystroke data to a text file or store the data internally as a variable. See the documentation for axes/figure/[your object] to learn about these callback functions.

サインインしてコメントする。

回答 (1 件)

Voss
Voss 2021 年 8 月 24 日
You can assign a WindowKeyPressFcn to the figure. You may want a WindowKeyReleaseFcn as well.

カテゴリ

Help Center および File ExchangeDesktop についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by