Events
Weber.@eventMacro.
@Weber.event type [name] <: [ExpEvent or ExpEvent child]
  [fields...]
end

Marks a concrete type as being an experiment event.

This tag is necessary to ensure that all watcher moments are properly precompiled. This macro adds the event to a list of concrete events for which each watcher method must have a precompiled method.

source
Weber.@key_strMacro.
key"keyname"

Generate a key code, using a single character (e.g. key"q" or key"]"), or some special key name surrounded by colons (e.g. :escape:).

Note that keys are orderd and you can list all implemented keys in order, using listkeys. If you want to quickly see the name for a given button you can use run_keycode_helper().

Creating Custom Keycodes

Extensions to Weber can define their own keycodes. Such codes must but of some new type inheriting from Weber.Key, and can be added to the list of codes this macro can generate by updating the private constant Weber.str_to_code. See the section in the user guide on extensions for more details.

source
Base.Libc.timeMethod.
time(e::ExpEvent)

Get the time an event occured relative to the start of the experiment. Resolution is limited by an experiment's input_resolution (which can be specified upon initialization), and the response rate of the device. For instance, keyboards usually have a latency on the order of 20-30ms.

source
Weber.keycodeFunction.
keycode(e::ExpEvent)

Report the key code for this event, if there is one.

source
Weber.iskeydownFunction.
iskeydown(event,[key])

Evalutes to true if the event indicates that the given key (or any key) was pressed down. (See @key_str)

iskeydown(key)

Returns a function which tests if an event indicates the given key was pressed down.

source
Weber.modifiedbyFunction.
modifiedby([event],[modifier = :shift,:ctrl,:alt or :gui])

Returns true if the given event represents a keydown event modified by a given modifier key.

Without the first argument, returns a function that tests if the given event is a keydown event modified by a given modifier key.

source
Weber.iskeyupFunction.
iskeyup(event,[key])

Evalutes to true if the event indicates that the given keyboard key (or any key) was released. (See @key_str)

iskeyup(key)

Returns a function which tests if an event indicates the given key was released.

source
Weber.listkeysFunction.
listkeys()

Lists all available key codes in order.

Also see @key_str.

source
run_keycode_helper(;extensions=[])

Runs a program that will display the keycode for each key that you press.

source
Weber.endofpauseFunction.
endofpause(event)

Evaluates to true if the event indicates the end of a pause requested by the user.

source