I'm starting to make a game that is a 100x100 board on the screen, I want to be able to recognize when the keyboard dates are pressed so that the player moves along the board, I'm using AngularJS, for that there is the ng directive -keypress, but it seems that only works within an input, does anyone have another idea?
My main idea was:
<div ng-keypress = press($event)> </div>
Another idea would be in the body, but I'm not sure, it would be something like this:
<body ng-keypress = press($event)> </body>