title: How to read keyboard inputs in Octave while running loop?
body: <p>Problem:</p>
  
  <p>I'm running a script that includes an infinite loop and I would like to exit from this loop with user input. I don't want to use the standard "input" function because that pauses the execution of the loop while it waits for the user inputs. I want that the program keeps looping all the time (until some certain keyboard input is given). I don't want to exit from the loop with ctrl+c either because then the program shut down procedures that are located after the loop, are not executed.</p>
  
  <p>Question:</p>
  
  <p>In octave, when something is typed to the command window during execution of a script nothing is shown in the command window until the script has ended. From this it is clear that keyboard inputs that are given during the execution of a script are stored somewhere (is this right?). And now the big guestion is where? And how can I access this data?</p>
  
  <p>I'm running Octave 4.0.0 in Win7</p>
  
  <p>p.s. also other suggestions for stopping the loop are welcome</p>