Module awful.key
Functions
| new (mod, _key, press, release) | Create a new key to use as binding. |
| match (_key, pressed_mod, pressed_key) | Compare a key object with modifiers and key. |
Tables
| key | Create easily new key objects ignoring certain modifiers. |
| ignore_modifiers | Modifiers to ignore. |
Functions
- new (mod, _key, press, release)
-
Create a new key to use as binding.
This function is useful to create several keys from one, because it will use
the ignore_modifier variable to create more key with or without the ignored
modifiers activated.
For example if you want to ignore CapsLock in your keybinding (which is
ignored by default by this function), creating key binding with this function
will return 2 key objects: one with CapsLock on, and the other one with
CapsLock off.
Parameters:
mod:_key:press:release:
Returns:
-
A table with one or several key objects.
see also:
- match (_key, pressed_mod, pressed_key)
-
Compare a key object with modifiers and key.
Parameters:
_key: The key object.pressed_mod: The modifiers to compare with.pressed_key: The key to compare with.