Check for key strokes while running a separate loop
    3 views (last 30 days)
  
       Show older comments
    
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 Comment
  Adam Danz
    
      
 on 23 Aug 2021
				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.  
Answers (1)
  Voss
      
      
 on 24 Aug 2021
        You can assign a WindowKeyPressFcn to the figure. You may want a WindowKeyReleaseFcn as well.
0 Comments
See Also
Categories
				Find more on Desktop in Help Center and File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

