fix repeating backspace on iOS

This commit is contained in:
Kartik K. Agaram 2023-11-21 22:58:16 -08:00
parent 511aace3f1
commit 086062791f
2 changed files with 2 additions and 0 deletions

View File

@ -74,6 +74,7 @@ function love.run()
if OS == 'iOS' then if OS == 'iOS' then
love.keyboard.setTextInput(true) -- magic. iOS seems to lose textinput events after calls to setMode. love.keyboard.setTextInput(true) -- magic. iOS seems to lose textinput events after calls to setMode.
-- https://github.com/love2d/love/issues/1959 -- https://github.com/love2d/love/issues/1959
love.keyboard.setKeyRepeat(true)
end end
end end

View File

@ -221,6 +221,7 @@ function App.keychord_press(chord, key)
if OS == 'iOS' then if OS == 'iOS' then
love.keyboard.setTextInput(true) -- magic. iOS is prone to losing textinput events. love.keyboard.setTextInput(true) -- magic. iOS is prone to losing textinput events.
-- https://github.com/love2d/love/issues/1959 -- https://github.com/love2d/love/issues/1959
love.keyboard.setKeyRepeat(true)
end end
-- ignore events for some time after window in focus (mostly alt-tab) -- ignore events for some time after window in focus (mostly alt-tab)
if Current_time < Last_focus_time + 0.01 then if Current_time < Last_focus_time + 0.01 then