KeyPlayer allows using the computer keyboard keys for executing functions when given keys are pressed or released (keyDown and keyUp).
How to link to this file, in quarks/KeyPlayer? KeyPlayerExample.scd
Global dict for all KeyPlayers
Look up KeyPlayers by name in KeyPlayer.all
get or set verbose flag to posts debug messages. default = false.
create a new KeyPlayer
key |
key under wich to store it |
inDict |
an optional dict of keyDown and keyUp functions - not well tested yet. |
ignoreCase |
a flag whether to ignore upper/lowercase letter distinction. |
make a global gui for up to ten KeyPlayers.
The KeyPlayer's name/key
dicts where the down and up actions kept.
a dict with the currently pressed keys
set actions for keyDown and keyUp on given characters
char |
the char for which to put the action |
func |
the action. Is called with arguments |
both |
flag whether to distinguish upper/lower or to respond to both. |
noRep |
on keyDown, flag whether to swallow auto-repeated keystrokes. |
make its own gui for KeyPlayer
evaluate keyActions by hand
remove actions from down or up dicts.
check wether a char is currently down (pressed) or not.
make an instance of KeyLoop for the KeyPlayer
get the KeyLoop for the KeyPlayer
post current actions as code into a Document. Works if all functions are closed.