Template repo for tiny cross-platform apps that can be modified on phone, tablet or computer.

give up on supporting the OS paste operation

Thanks Origedit for reporting this. Mobile operating systems provide a mechanism to paste in the popup keyboard. Unfortunately it's hard to support for 3 reasons:

  • LÖVE translates it to love.keypressed and love.textinput events
  • love.textinput events batch up multiple keys
  • you get all the love.keypressed events before any of the love.textinput events.

As a result, at the time when you see a love.keypressed event with the 'return' key, there seems to be no way to tell that it is part of a paste operation.

I could probably get a 90% or 99% solution working, but that would just make the remaining issues harder to spot. Better to just not depend on the OS for pasting.

Created by  akkartik  on November 16, 2024
3LEFSNGD35WZHYZQ7KVSSSJO4WJR24W67KOMPCMQ3J2WGXFE4GFQC
Change contents