mirror of
https://github.com/Desour/keyevent.git
synced 2024-08-19 20:54:08 +02:00
15 lines
531 B
Markdown
15 lines
531 B
Markdown
## Adds an event for when player presses a key.
|
|
|
|
### This mod is client- and server-side.
|
|
|
|
### Added functions are:
|
|
- `keyevent.register_on_keypress_bits(func(keys, old_keys, dtime, player_name))`
|
|
- `keys`: The pressed keys in bit format.
|
|
- `old_keys`: The keys pressed before.
|
|
- `dtime`: Time from last check.
|
|
- `player_name`: Name of the player. Client-side this is `nil`.
|
|
|
|
- `keyevent.register_on_keypress(func(keys, old_keys, dtime, player_name))`
|
|
- Same as above but `keys` and `old_keys` is given in table format.
|
|
|