more than 4 response buttons
Hi,
I would like to specify more than 4 response buttons using the mousetrap_response item? Is that possible?
I wrote the following code, but it only seem to work if I limit it to the first 4 buttons.
__warning_message__
draw textline text="Please start moving" x=0 y=0
__end__
set update_feedback yes
set timeout infinite
set start_coordinates "0;0"
set skip_item no
set sketchpad ""
set save_trajectories yes
set reset_mouse yes
set number_of_buttons 8
set mouse_buttons_allowed "left_button;right_button"
set max_initiation_time 1000
set logging_resolution 10
set description "Tracks mouse movements"
set correct_button "[stimulus]"
set click_required yes
set check_initiation_time no
set button8 "x=-352 y=-352 w=64 h=64 name=cs8"
set button7 "x=-480 y=-32 w=64 h=64 name=cs7"
set button6 "x=-352 y=288 w=64 h=64 name=cs6"
set button5 "x=-32 y=416 w=64 h=64 name=cs5"
set button4 "x=288 y=288 w=64 h=64 name=cs4"
set button3 "x=416 y=-32 w=64 h=64 name=cs3"
set button2 "x=288 y=-352 w=64 h=64 name=cs2"
set button1 "x=-32 y=-480 w=64 h=64 name=cs1"
set boundaries "upper=no lower=no left=no right=no"
Also (not essential) is there a way to specify the buttons as circles rather than rectangles, I tried to replace "w" and "h" with "r" but it did not seem to work.
Thanks!
Comments
Hi,
unfortunately, you can only specify up to 4 buttons when using the mousetrap_response item.
However, if you use the underlying Python class called MT_response in an inline script, you can also specify more than 4 buttons.
More information about the Python class can be found here: https://github.com/PascalKieslich/mousetrap-os/blob/master/plugins/mousetrap_response/mousetrap_response.md#importing-the-mt_response-class-for-python-inline_scripts
And a corresponding example experiment called mousetrap_response_python.osexp can be found here: https://github.com/pascalkieslich/mousetrap-os/tree/master/examples
Best,
Pascal