Skip to content

playstate: Fix jumping with NumpadEnter on the web build

Latest
Compare
Choose a tag to compare
@SirGFM SirGFM released this 18 May 00:05

As far as I could tell, browsers may completely ignore Numpad's Enter and simply send a 'Return' event instead.

It's possible to hijack a keyboard event and send a different one in its place. However, since there doesn't seem to be a specific keycode for NumpadEnter, that key must be a completely different one.

Hijack NumpadEnter and send F24 instead (since that shouldn't exist on most keyboards) on the web build. This only affects the playstate, since that's the only state that recognizes NumpadEnter presses.

Note that this only affects the web build!