Flushing PyGaze keypress
<p><code>self.keyboard.get_key()</code> (from <a href="http://www.pygaze.org/" rel="nofollow">the PyGaze library</a>) holds a screen until a key is pressed.</p>

<p>How can I flush/clear the contents of the a key press prior to this call? </p>

<p>At the moment a previous key press is carried into the function where I call <code>self.keyboard.get_key()</code>.</p>

<p>In order to flush any keypresses in PyGaze the following should be added to the <code>get_key</code> function <code>self.keyboard.get_key(flush=True)</code>.</p>

python keypress