Weber.@event — Macro.@Weber.event type [name] <: [ExpEvent or ExpEvent child]
[fields...]
endMarks 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.
Weber.@key_str — Macro.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().
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.
Base.Libc.time — Method.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.
Weber.keycode — Function.keycode(e::ExpEvent)Report the key code for this event, if there is one.
Weber.iskeydown — Function.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.
Weber.modifiedby — Function.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.
Weber.iskeyup — Function.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.
Weber.listkeys — Function.listkeys()Lists all available key codes in order.
Also see @key_str.
Weber.run_keycode_helper — Function.run_keycode_helper(;extensions=[])Runs a program that will display the keycode for each key that you press.
Weber.endofpause — Function.endofpause(event)Evaluates to true if the event indicates the end of a pause requested by the user.