We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
#142
Defining input bindings in CONFIG
kaplay({ // Define buttons buttons: { up: { keyboard: ["w", "up"], controller: ["dpad-up"] }, }, saveButtons: true, // save them in localStorage? (idea) });
Setting and getting input bindings in runtime
setButton("up", { keyboard: ["w"], controller: ["dpad-up"], }); getButton("up") // get the up bindings
Using input bindings
onButtonPress("up") // work as onGamepadButtonPress("dpad-up") and onKeyPress("up") onButtonDown("up") onButtonRelease("up")