Detecting current (mouse) button state


Author
Message
Sercan
Sercan
Partner Member (947 reputation)Partner Member (947 reputation)Partner Member (947 reputation)Partner Member (947 reputation)Partner Member (947 reputation)Partner Member (947 reputation)Partner Member (947 reputation)Partner Member (947 reputation)Partner Member (947 reputation)
Group: Forum Members
Posts: 25, Visits: 120
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?


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
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.

Sercan
Sercan
Partner Member (947 reputation)Partner Member (947 reputation)Partner Member (947 reputation)Partner Member (947 reputation)Partner Member (947 reputation)Partner Member (947 reputation)Partner Member (947 reputation)Partner Member (947 reputation)Partner Member (947 reputation)
Group: Forum Members
Posts: 25, Visits: 120
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?

Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
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.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search