In this script you do:
local onscreen = require ".onscreen"
I wonder if that dot ‘.’ causes problems. Can you please try without it?
Can I also ask why you aren’t using defold-input as a dependency? (ie add https://github.com/britzl/defold-input/archive/2.8.3.zip to game .project dependencies)