Skip to content

Commit

Permalink
BF: new Kayborad class was returning negative durations (but correct …
Browse files Browse the repository at this point in the history
…vals)

We were subtracting start-stop not stop-start!
  • Loading branch information
peircej committed May 14, 2019
1 parent faa05d6 commit e43e474
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion psychopy/hardware/keyboard.py
Expand Up @@ -385,7 +385,7 @@ def _processEvts(self):
else:
for key in self._keysStillDown:
if key.code == evt['keycode']:
key.duration = key.tDown - evt['time']
key.duration = evt['time'] - key.tDown
self._keysStillDown.remove(key)
break # this key is done
else:
Expand Down

0 comments on commit e43e474

Please sign in to comment.