about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2023-11-25 15:27:12 -0800
committerKartik K. Agaram <vc@akkartik.com>2023-11-25 15:27:12 -0800
commitaed0eb592af0a757d60710967c80ccd7c4ba2439 (patch)
tree497ae1ff03f3c05aac0ae50c999a9f1a0d41aac4
parent5561ebf06f70acbb553fdee750364a6cba4baf95 (diff)
parentf6420efd908b68fa881169729c46def2899b5790 (diff)
downloadtext.love-aed0eb592af0a757d60710967c80ccd7c4ba2439.tar.gz
Merge lines.love
-rw-r--r--text.lua9
1 files changed, 8 insertions, 1 deletions
diff --git a/text.lua b/text.lua
index 9a3d8a8..33dd29e 100644
--- a/text.lua
+++ b/text.lua
@@ -124,7 +124,14 @@ end
 
 function Text.text_input(State, t)
   if App.mouse_down(1) then return end
-  if App.ctrl_down() or App.alt_down() or App.cmd_down() 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
   local before = snapshot(State, State.cursor1.line)
 --?   print(State.screen_top1.line, State.screen_top1.pos, State.cursor1.line, State.cursor1.pos, State.screen_bottom1.line, State.screen_bottom1.pos)
   Text.insert_at_cursor(State, t)