about summary refs log tree commit diff stats
path: root/text.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2023-11-25 15:29:25 -0800
committerKartik K. Agaram <vc@akkartik.com>2023-11-25 15:29:25 -0800
commite0625d0ad60f60c81b5946c0e058e2f12123046b (patch)
tree0dc83e352505a08b7c2c83770108fb4ed4c95bc7 /text.lua
parent00e0e346b34eecb4f6a1a26ae887fd4c75c6184e (diff)
parentaed0eb592af0a757d60710967c80ccd7c4ba2439 (diff)
downloadview.love-e0625d0ad60f60c81b5946c0e058e2f12123046b.tar.gz
Merge text.love
Diffstat (limited to 'text.lua')
-rw-r--r--text.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/text.lua b/text.lua
index 76883ae..b869d6b 100644
--- a/text.lua
+++ b/text.lua
@@ -125,6 +125,19 @@ function Text.populate_screen_line_starting_pos(State, line_index)
   end
 end
 
+function Text.text_input(State, t)
+  if App.mouse_down(1) then return end
+  if App.any_modifier_down() then
+    if App.key_down(t) then
+      -- The modifiers didn't change the key. Handle it in keychord_pressed.
+      return
+    else
+      -- Key mutated by the keyboard layout. Continue below.
+    end
+  end
+end
+
+-- Don't handle any keys here that would trigger text_input above.
 function Text.keychord_press(State, chord)
 --?   print('chord', chord, State.selection1.line, State.selection1.pos)
   --== shortcuts that move the cursor