I'm currently working on a game that requires ~10 different buttons. As it stands, I'm using all of the inputs from controller 1 (Up,Down,Left,Right,O,X,Pause) aswell as a few inputs from controller 2 (O,X)
This game will be exported to HTML5 to be played in browser, and I was wondering if there was any way to modify the exported js/html files to allow me to rebind player 1's O/X to be Q and W, and player 2's O/X to be O and P.
This would also mean I would need to rebind the pause button to ONLY be Enter instead of being both Enter and P.
(I use the Enter key as an input in my game by using poke to disable the pause menu)
If anyone knows of a solution please let me know, it would be greatly appreciated!
PS: If remapping the pause button isn't possible then I can work around that, I just need the ability to rebind the main controls :)


where you able to figure this out? i'd love to have my custom keymapping exported to whatever i'm exporting to (bin or html)


@HannesRoets I ended up using STAT(28, scancode)
to check whether or not a keyboard key is being pressed and then made my own key_pressed and key_released functions from there.


Wow, that helped a lot!
Thanks for pointing me in the right direction.
I've made a little cart to show this in action.
p1: up,down,left,right,backspace,r shift, r control and enter
p2: e,d,s,f,l alt, l shift, l control and tab
the only downside is this is just btn() not btnp()
[Please log in to post a comment]