selector.settings.keys

getSelector(id).settings.keys( "key1", "key2", ... )

Makes it possible to select the elements by pressing the specified keys. The keys are associated to the element in the order in which they were added, if no shuffle took place in the meantime.

Example:

[js highlight=”10″ try=”true”]newImage(“square”, “square.png”)
,
newImage(“triangle”, “triangle.png”)
.settings.before( getImage(“square”) )
.print()
,
newSelector(“shapes”)
.settings.disableClicks()
.settings.add( getImage(“square”) , getImage(“triangle”) )
.settings.keys( “F” , “J” )
.wait()
[/js]

Adds two images side by side and waits for a selection by pressing either the F key or the J key.