title: MATLAB: How to run function until the key is released?
body: <p>I have a GUI and I want to repeat some process from the time the given key is pressed until the key is released.</p>
  
  <p>I know how to do some process once when the key is pressed. But is there any way how to for example display random number every second until the key is released?</p>
  
  <p>Thank you for your answers.
  Jaja</p>