However it is designed to be independant so it can be used with browserify without using something else from the crtrdg ecosystem.
It supports events for the four directions as well as functions for directly asking the states of the arrows.
You can simply install is with
npm install crtrdg-arrows and then
browserifyto transform it for the browser.
Simple Example with crtrdg-gameloop
var Game = ;var Arrows = ;var game =canvasId: 'game'width: 800height: 400backgroundColor: '#ff1f1f';var arrows = ;var x = 10;arrowsgame;game;