

In the each frame section of the response routine You can get the behaviour you want by overriding that: keysarray event.waitKeys (clearEventsFalse) But I think that keys pressed prior to calling the function would not have useful reaction times recorded (although keyboard handling has changed a lot in version 3.1).
PSYCHOPY KEY GET TRIAL
#remember the current time so that we can get RTs relative to the trial start

#Need to reset these events in case the participant already pressed and released one of the keys

In the begin routine section of the response routine Io = ioHubConnection.getActiveConnection()
PSYCHOPY KEY GET 64 BITS
Psychtoolbox versus event.getKeys On 64 bits Python3 installations it provides access to the Psychtoolbox kbQueue series of functions using the same compiled C code (available in python-psychtoolbox lib). # New connection fails when case there’s already an ioHubConnection, get active connection The Keyboard class was new in PsychoPy 3.1 and replaces the older event.getKeys () calls. The new calls have several advantages: the polling is performed and timestamped asynchronously with the main thread so that times relate to. #Create an ioHubConnection instance, which starts the ioHubProcess, and informs it of the requested devices and their configurations. Much of this code is available elsewhere…įrom import EventConstants,KeyboardConstantsįrom import launchHubServer,ioHubConnection If someone wants to look at the code I’ll upload it upon a reply.įor anyone interested, we got this working in the end. I’ll leave it there for now, perhaps there is simply some info on this that I’m failing to locate and someone can point me in the right direction? Any leads are highly appreciated. ( I was initially trying to import io hub myself and use the launchHubServer functions etc, before I realised that when you compile something from builder now it already has all of this done for you… so why not go with that) Upon doing this though, I’m getting the following error:ĪttributeError: ‘Keyboard’ object has no attribute ‘getReleases’Īside from this change, the code is just what has been compiled from something that was created in builder. That is, I should just be able to use keyboard.getReleases instead of keyboard.getKeys here …or at least that’s the impression I get from the documentation. I’m not much of a coder, but from what I understand, since iohub has been integrated with Psychopy by default, this should be quite simple. I’m currently designing a task where I need psychopy to register when a key is released, rather than when it is pressed.
