pagefaultgames / pokerogue

A browser based Pokémon fangame heavily inspired by the roguelite genre.
https://pokerogue.net
GNU Affero General Public License v3.0
3.91k stars 1.57k forks source link

[Feature] Support for numpad keys on mobile #2186

Open jacko-png opened 3 weeks ago

jacko-png commented 3 weeks ago

Is your feature request related to a problem? Please describe.

I am using PokéRogue on mobile and I'm trying to use a numpad as an input. However, pressing most keys won't be registered in the key remapping screen where a normal keyboard works just fine.

Describe the Feature

Provide support for numpads, if there isn't already. Maybe this should be a bug report instead? I'd like to be able to use a numpad as an input method.

Additional context

I'm using an iPad Air 2 and a Microsoft numpad. I can help troubleshoot if it ends up being a hardware specific issue.

CodeTappert commented 2 weeks ago

What do you mean with "mobile".? Like did you plug in a usb num pad into a IPad?

jacko-png commented 2 weeks ago

It's wireless.

IMG_5020

The issue isn't a bug, because it looks like there are some keys that are blacklisted from being able to be used. e.g. I can use backspace and minus, but I can't use Numpad 1 or, on my full-sized keyboard, backslash.

I might look through the remapping part of the code and see if it is explicitly blacklisted.

jacko-png commented 2 weeks ago

src/ui/settings/abstract-control-settings-ui-handler.ts:432 mentions a settingBlacklisted variable but I'm not sure where it is initialised. I wonder if the numpad keys are added there for some reason?

It might be worth to check old issues and the logs for the keywords ‘numpad’ and ‘blacklist’ for as to why the numpad keys may be blacklisted, if they are blacklisted.

Edit: I'm looking at the history for the file but it seems new after the settings refactor. So I'll try to find where settingsBlacklist is init'd.