⚠ This website is the beta version of the PCIbex documentation and is still under development. ⚠
Link Search Menu Expand Document

Key element

since

beta 0.3

description

Creates a keypress detector.

syntax

newKey("ELEMENT_NAME",KEY_STRING)
  • "ELEMENT_NAME": The name of the newly-created element.
  • KEY_STRING : A string of keyboard keys that validate the Key element.

note(s)

  • Pass the empty string "" for a press on any keyboard key.
  • Pass a single space " " for a press of the spacebar key.
  • Since PennController 1.4, you can pass special keys like "Enter", "Shift", and "Escape".
  • Since PennController 1.4, you can pass multiple arguments to named Key elements, for example "newKey("answer", "FJ", "Escape").

example

// To be filled in

Action commands

key.callback

syntax

getKey(“ELEMENT_NAME”).callback()

description

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

example

click to expand
// example
↑ back to top

key.log

syntax

getKey(“ELEMENT_NAME”).log()

description

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

example

click to expand
// example
↑ back to top

key.wait

syntax

getKey(“ELEMENT_NAME”).wait()

description

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

example

click to expand
// example
↑ back to top

standard.disable

syntax

getX(“ELEMENT_NAME”).disable()

description

Disables any interactive feature of the element.

example

click to expand

@// example
↑ back to top

standard.enable

syntax

getX(“ELEMENT_NAME”).enable()

description

Enables any interactive feature that was previously disabled.

example

click to expand
// example
↑ back to top

standard.setVar

syntax

getX(“ELEMENT_NAME”).setVar()

description

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

example

click to expand
// example
↑ back to top

Test commands

key.test.pressed

syntax

getKey(“ELEMENT_NAME”).test.pressed()

description

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

example

click to expand
// example
↑ back to top