Defines the :keys
Element Event Pseudo. It captures key combinations and fires an event when all keys are pressed.
See Also
Note
- This plugin adds some common used keys to the keys you can use, like
-
,end
or=
. See for the complete list below.
The event will only fire when a key combination is pressed. This only works with the keydown
and keyup
events.
Example
myElement.addEvent('keydown:keys(shift+a+b)', function(){
alert('You pressed the following keys: shift, a and b');
});
The following list is a list of the special characters you can use besides the alpha-numerical characters like a, b, 1 and 3.
- enter
- up
- down
- left
- right
- esc
- space
- backspace
- tab
- delete
- shift
- control
- alt
- capslock
- pageup
- pagedown
- end
- home
- numlock
- scrolllock
- ;
- =
- ,
- -
- .
- /
- `
- [
- \
- ]
- '
- +