chiyadev / genshin-schedule

🕑 Genshin farming scheduler
https://genshin.chiya.dev
MIT License
72 stars 17 forks source link

External keyboard numeric keypad does not substract resin on Firefox on macOS #55

Closed Andrew67 closed 3 years ago

Andrew67 commented 3 years ago

(I fully intend to submit a PR for this but as I'll explain below it's not currently possible)

This issue appears to be a perfect storm of:

If you happen to have such a device on macOS you can test it out here: https://omatsuri.app/events-keycode

Basically, for e.g. 4, the top row key returns: key: '4', code: 'Digit4', which: 52 but the numeric keypad returns (I think this matches NumLock off on Windows but macOS does not do NumLock): key: '4', code: 'Numpad4', which: 100 Furthermore, Chrome seems to pave over this difference and returns the same as the top row key above, so it is left as a Firefox issue.

Solution:

luaneko commented 3 years ago

Interesting. I can reproduce this on my mac with Firefox, although to be honest, it's not much of an inconvenience. The number of people who use Genshin Schedule on a macOS Firefox with numpad keys is probably very, very low.

But if you intend to fix this and submit a PR anyway, I will definitely have a look!

Andrew67 commented 3 years ago

Ready! https://github.com/chiyadev/genshin-schedule/pull/56 Tested on Firefox/Edge on macOS