Input library for javascript games