about summary refs log tree commit diff stats
path: root/reference.md
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2023-06-05 22:37:26 -0700
committerKartik K. Agaram <vc@akkartik.com>2023-06-05 22:37:26 -0700
commit64c4015167618675b556c369fd9f576408858a06 (patch)
tree67fdc5495f7d44db780b3c9be598234fc7a65959 /reference.md
parentbf2c2555d662865b94256e6e854acc0715fda6d1 (diff)
parentf1981e85db8cc349dc1e4cfa4cddb6e83ae2ad17 (diff)
downloadtext.love-64c4015167618675b556c369fd9f576408858a06.tar.gz
Merge lines.love
Diffstat (limited to 'reference.md')
-rw-r--r--reference.md18
1 files changed, 16 insertions, 2 deletions
diff --git a/reference.md b/reference.md
index 5c3c29f..9bef95a 100644
--- a/reference.md
+++ b/reference.md
@@ -251,8 +251,16 @@ visible on screen.
 
 ### keyboard primitives
 
-* `App.modifier_down(key)` -- returns `true` if the given key (doesn't
-  actually have to be just a modifier) is currently pressed.
+* `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).)
 
 ### interacting with files
@@ -309,6 +317,12 @@ and [the Lua manual](https://www.lua.org/manual/5.1/manual.html#5.7).
 * `App.setClipboardText(text)` -- stores the string `text` in the clipboard.
   (Based on [LÖVE](https://love2d.org/wiki/love.system.setClipboardText).)
 
+* `array.find(arr, elem)` -- scan table `arr` for `elem` assuming it's
+  organized as an array (just numeric indices).
+
+* `array.any(arr, f)` -- scan table `arr` for any elements satisfying
+  predicate `f`. Return first such element or `false` if none.
+
 There's much more I could include here; check out [the LÖVE manual](https://love2d.org/wiki)
 and [the Lua manual](https://www.lua.org/manual/5.1/manual.html).