controller-input

Unifies browser user input sources into a simple controller model, useful for loop driven applications like games

Usage no npm install needed!

<script type="module">
  import controllerInput from 'https://cdn.skypack.dev/controller-input';
</script>

README

controller-input

Simple, unified user input.

In a browser users have numerous ways to cause input events: they can press a key, move a mouse, touch their screen, or even move a joystick on a gamepad. controller-input abstracts all of this away while exposing a simple Controller model capable of handling and normalizing any input a user sends at it.