document a few more keyboard primitives

This commit is contained in:
Kartik K. Agaram 2023-06-05 22:22:53 -07:00
parent 9e17337217
commit fc094496c1
1 changed files with 9 additions and 0 deletions

View File

@ -251,6 +251,15 @@ visible on screen.
### keyboard primitives
* `App.is_cursor_movement(key)` -- return `true` if `key` is a cursor movement
key (arrow keys, page-up/down, home/end)
* `App.cmd_down()`, `App.ctrl_down`, `App.alt_down()`, `App.shift_down()` --
predicates for different modifier keys.
* `App.any_modifier_down()` -- returns `true` if any of the modifier keys is
currently pressed.
* `App.key_down(key)` -- returns `true` if the given key is currently pressed.
(Based on [LÖVE](https://love2d.org/wiki/love.keyboard.isDown).)