Constructor
new EventManager(options)
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
options |
Object |
Properties
|
- Source:
Methods
addMouseListeners(renderer)
Add various mouse listeners to the Pixi renderer of the Window.
Parameters:
Name | Type | Description |
---|---|---|
renderer |
PIXI.Renderer | The Pixi renderer |
- Source:
clearEvents()
Clear all events from the event buffer.
- Source:
- To Do:
-
- handle the attribs argument
clearKeys()
Clear all keys from the key buffer.
- Source:
getKeys(options) → {Array.<string>}
Get the list of keys pressed by the participant.
Note: The w3c key-event viewer can be used to see possible values for the items in the keyList given the user's keyboard and chosen layout. The "key" and "code" columns in the UI Events fields are the relevant values for the keyList argument.
Parameters:
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
Properties
|
- Source:
Returns:
the list of keys that were pressed.
- Type
- Array.<string>
getMouseInfo() → {EventManager.MouseInfo}
Get the mouse info.
- Source:
Returns:
the mouse info.
keycode2w3c(keycode) → {string}
Convert a keycode to a W3C UI Event code.
This is for legacy browsers.
Parameters:
Name | Type | Description |
---|---|---|
keycode |
number | the keycode |
- Source:
Returns:
corresponding W3C UI Event code
- Type
- string
pyglet2w3c(pygletKeyList) → {Array.string}
Convert a keylist that uses pyglet key names to one that uses W3C KeyboardEvent.code values.
This allows key lists that work in the builder environment to work in psychoJS web experiments.
Parameters:
Name | Type | Description |
---|---|---|
pygletKeyList |
Array.string | the array of pyglet key names |
- Source:
Returns:
the w3c keyList
- Type
- Array.string
resetMoveClock()
Reset the move clock.
- Source:
- To Do:
-
- not implemented
startMoveClock()
Start the move clock.
- Source:
- To Do:
-
- not implemented
stopMoveClock()
Stop the move clock.
- Source:
- To Do:
-
- not implemented
w3c2pyglet(code) → {string}
Convert a W3C Key Code into a pyglet key.
Parameters:
Name | Type | Description |
---|---|---|
code |
string | W3C Key Code |
- Source:
Returns:
corresponding pyglet key
- Type
- string