The new PCIbex Farm is here! Be sure to check out all of its new features and changes.

Link Search Menu Expand Document

selector.keys

description

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.

syntax

getSelector(ELEMENT_NAME).keys(key1, key2, ...)
  • key1 :
  • key2 :
  • ... :

example(s)


@newImage("square", "square.png")
@,
@newImage("triangle", "triangle.png")
@    .before( getImage("square") )
@    .print()
@,
@newSelector("shapes")
@    .disableClicks()
@    .add( getImage("square") , getImage("triangle") )
$    .keys(     "F"           ,        "J"           )
@    .wait()
  • Adds two images side by side and waits for a selection by pressing either the F key or the J key.