Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use keyCode instead of key for keyup/keydown events #9

Closed
freddyb opened this issue Mar 25, 2021 · 1 comment
Closed

Use keyCode instead of key for keyup/keydown events #9

freddyb opened this issue Mar 25, 2021 · 1 comment

Comments

@freddyb
Copy link

freddyb commented Mar 25, 2021

Hey,

Aside: first of all, huge kudos for pulling this off. I have especially enjoyed the technical write-up. For context: I know how to play a keyboard but have never used a synthesizer user so I'm still fooling around.

I noticed that your MidiKeyboard implementation is based upon a keyMap using letters to identify keys on the keyboard.
While this works well on a US keyboard, it is a bit cumbersome on others. E.g., on a German keyboard, the letters "z" and "y" are swapped and playing notes would involve a some odd finger gymnastics :)

A possible solution is to use the key's code as they translate roughly to button-positions on the keyboard rather than what is actually printed on the keycap.

Thanks!

@Ameobea
Copy link
Owner

Ameobea commented Mar 25, 2021

Hey, tyvm for trying the synth and opening this issue!

I 100% agree key codes is a much better way to handle this, and I'll get this implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants