Millisecond Forums

Detecting current (mouse) button state

https://forums.millisecond.com/Topic35609.aspx

By Sercan - 8/28/2023

I'm building a version of the Approach Avoidance Task for tablets that needs to throw an error message whenever the participant lifts their finger up from the screen. I could program this by specifying lbuttonup as a valid response for each trial and branching to an error screen whenever that is the response. However, that would require a rather tedious rework of my current script that I would rather avoid; after all, those same trials use the isvalidresponse attribute which I would then have to drop somehow.
Thus I would like to be able to check at the end of each trial whether the left mouse button is currently being pressed or not. Is it possible to get this information in inquisit 6?

By Dave - 8/28/2023

Sercan - 8/28/2023
I'm building a version of the Approach Avoidance Task for tablets that needs to throw an error message whenever the participant lifts their finger up from the screen. I could program this by specifying lbuttonup as a valid response for each trial and branching to an error screen whenever that is the response. However, that would require a rather tedious rework of my current script that I would rather avoid; after all, those same trials use the isvalidresponse attribute which I would then have to drop somehow.
Thus I would like to be able to check at the end of each trial whether the left mouse button is currently being pressed or not. Is it possible to get this information in inquisit 6?


You'd have to detect lbuttonup as a response, the state of mouse buttons is not exposed independently.
By Sercan - 8/28/2023

Dave - 8/28/2023
Sercan - 8/28/2023
I'm building a version of the Approach Avoidance Task for tablets that needs to throw an error message whenever the participant lifts their finger up from the screen. I could program this by specifying lbuttonup as a valid response for each trial and branching to an error screen whenever that is the response. However, that would require a rather tedious rework of my current script that I would rather avoid; after all, those same trials use the isvalidresponse attribute which I would then have to drop somehow.
Thus I would like to be able to check at the end of each trial whether the left mouse button is currently being pressed or not. Is it possible to get this information in inquisit 6?


You'd have to detect lbuttonup as a response, the state of mouse buttons is not exposed independently.

Will it be recorded as a lbuttonup response if the participant lifts up their finger from the tablet?
By Dave - 8/29/2023

Sercan - 8/29/2023
Dave - 8/28/2023
Sercan - 8/28/2023
I'm building a version of the Approach Avoidance Task for tablets that needs to throw an error message whenever the participant lifts their finger up from the screen. I could program this by specifying lbuttonup as a valid response for each trial and branching to an error screen whenever that is the response. However, that would require a rather tedious rework of my current script that I would rather avoid; after all, those same trials use the isvalidresponse attribute which I would then have to drop somehow.
Thus I would like to be able to check at the end of each trial whether the left mouse button is currently being pressed or not. Is it possible to get this information in inquisit 6?


You'd have to detect lbuttonup as a response, the state of mouse buttons is not exposed independently.

Will it be recorded as a lbuttonup response if the participant lifts up their finger from the tablet?

It should be, if you opt to record it.