Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
mgl:taskreference [2013/10/09 04:52]
justin
mgl:taskreference [2015/01/19 23:36] (current)
steeve
Line 439: Line 439:
   task.thistrial.whichButton   task.thistrial.whichButton
  
-This will get filled with which button was pressed (a number from 1-9). Note that if two keys are pressed down at the same time, it will only return the first in the list (e.g. if 1 and 2 are simultaneously pressed, it will return 1).+This will get filled with which button was pressed (a number from 1-9). Note that if two keys are pressed down at the same time, it will only return the first in the list (e.g. if 1 and 2 are simultaneously pressed, it will return 1). //​Caution//:​ whichButton is defined by the index of the button pressed in the list of possible buttons. If your button list is [1 2 3 4 5] and the user presses "​5",​ you will get back "​5"​. If your button list is [5] and the user presses "​5",​ you will get back "​1"​.
  
 If you want to get all the keys that are pressed, you can look at If you want to get all the keys that are pressed, you can look at