fenomas / game-inputs

A simple module for abstracting key/mouse input for games. Demo:
http://fenomas.github.io/game-inputs/
21 stars 6 forks source link

support binding to physical keys #9

Closed nornagon closed 2 years ago

nornagon commented 2 years ago

This adds support for binding to physical keys through KeyboardEvent.code.

Old bindings will still work; this is backwards-compatible. With this change, you can bind to key codes like KeyW, KeyA, KeyS, KeyD and have them work correctly regardless of keyboard layout.