about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2024-02-16 21:12:02 -0800
committerKartik K. Agaram <vc@akkartik.com>2024-02-16 21:16:29 -0800
commit219ee116865f8ef2b60fb771c4ad53f5a7dab685 (patch)
tree7fa0a6da56349ced4f9df936014696c0f52c31fc
parent4e9298dda1fb67527d5fdd3172217b803b27e652 (diff)
downloadtext.love-219ee116865f8ef2b60fb771c4ad53f5a7dab685.tar.gz
ensure tapping on editor brings up soft keyboard
-rw-r--r--edit.lua1
-rw-r--r--source_edit.lua1
2 files changed, 2 insertions, 0 deletions
diff --git a/edit.lua b/edit.lua
index bc85a93..b096274 100644
--- a/edit.lua
+++ b/edit.lua
@@ -234,6 +234,7 @@ function edit.quit(State)
 end
 
 function edit.mouse_press(State, x,y, mouse_button)
+  love.keyboard.setTextInput(true)  -- bring up keyboard on touch screen
   if State.search_term then return end
   State.mouse_down = mouse_button
 --?   print_and_log(('edit.mouse_press: cursor at %d,%d'):format(State.cursor1.line, State.cursor1.pos))
diff --git a/source_edit.lua b/source_edit.lua
index 19b754d..e376537 100644
--- a/source_edit.lua
+++ b/source_edit.lua
@@ -238,6 +238,7 @@ function edit.quit(State)
 end
 
 function edit.mouse_press(State, x,y, mouse_button)
+  love.keyboard.setTextInput(true)  -- bring up keyboard on touch screen
   if State.search_term then return end
   State.mouse_down = mouse_button
 --?   print_and_log(('edit.mouse_press: cursor at %d,%d'):format(State.cursor1.line, State.cursor1.pos))