about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2024-02-04 17:15:35 -0800
committerKartik K. Agaram <vc@akkartik.com>2024-02-04 17:15:35 -0800
commit95be13f9db4c79ffd255ed70a9bce0ba09ca93dd (patch)
treeda2cff3f5a4c4f553d6d4ffd23ade01a5eb6a5c6
parent83722db5e432ade410e651aaf55538345c5c14ad (diff)
downloadlines.love-95be13f9db4c79ffd255ed70a9bce0ba09ca93dd.tar.gz
more realism in one more helper
-rw-r--r--app.lua6
-rw-r--r--reference.md4
2 files changed, 5 insertions, 5 deletions
diff --git a/app.lua b/app.lua
index f59897c..627a438 100644
--- a/app.lua
+++ b/app.lua
@@ -365,9 +365,9 @@ end
 
 -- not all keys are textinput
 -- TODO: handle chords of multiple keys
-function App.run_after_keychord(chord)
-  App.keychord_press(chord)
-  App.keyreleased(chord)
+function App.run_after_keychord(chord, key)
+  App.keychord_press(chord, key)
+  App.keyreleased(key)
   App.screen.contents = {}
   App.draw()
 end
diff --git a/reference.md b/reference.md
index df08f28..8256e1d 100644
--- a/reference.md
+++ b/reference.md
@@ -416,8 +416,8 @@ and [the Lua manual](https://www.lua.org/manual/5.1/manual.html).
 * `App.run_after_textinput(t)` -- mimics keystrokes resulting in `t` and then
   draws one frame.
 
-* `App.run_after_keychord(chord)` -- mimics keystrokes resulting in `chord`
-  and then draws one frame.
+* `App.run_after_keychord(chord, key)` -- mimics the final `key` press
+  resulting in `chord` and then draws one frame.
 
 * `App.run_after_mouse_press(x,y, mouse_button)` -- mimics a mouse press down
   followed by drawing a frame.