fenomas / game-inputs

A simple module for abstracting key/mouse input for games. Demo:
http://fenomas.github.io/game-inputs/
20 stars 6 forks source link

Drop `vkey` and use `keyboardEvent.code` strings #10

Closed fenomas closed 2 years ago

fenomas commented 2 years ago

It's probably time to do a major version of this module, which handles key codes exclusively as KeyboardEvent.code values instead of ad-hoc strings from the vkey dependency.

@nornagon It sounds like you've already worked with this, let me know if you have any thoughts!

nornagon commented 2 years ago

That sounds reasonable to me! I don’t think there’s really any reason to use keyCode in modern browsers.

On Wed, Jan 26, 2022 at 22:46 Andy Hall @.***> wrote:

It's probably time to do a major version of this module, which handles key codes exclusively as KeyboardEvent.code https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code values instead of ad-hoc strings from the vkey dependency.

@nornagon https://github.com/nornagon It sounds like you've already worked with this, let me know if you have any thoughts!

— Reply to this email directly, view it on GitHub https://github.com/fenomas/game-inputs/issues/10, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABKGAEUQJWUOO2ITPU52XTUYDS4XANCNFSM5M5A4DYQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

--

j

fenomas commented 2 years ago

Thanks @nornagon. I did a full modernization pass on the inputs module and updated noa#develop (and noa-examples#develop), if you want to have a look. Please let me know if you see any problems!

fenomas commented 2 years ago

Seems fine, so now published as v0.6.0.