pyfisch / keyboard-types

Types to define keyboard related events.
Apache License 2.0
54 stars 9 forks source link

Add `Key::Finish` #9

Closed ArturKovacs closed 3 years ago

ArturKovacs commented 3 years ago

As you may know I'm in the progress of implementing the new winit keyboard input API here. I found another key variant which was missing, namely Finish. See: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values

Opening an issue for this might be overkill but this seemed to be the most appropriate medium for communicating this.

pyfisch commented 3 years ago

Curiously the Finish key is not part of https://w3c.github.io/uievents-key/. I didn't find a lot of information about this key, do you know a keyboard with this key?

According to the Firefox source code it is a Nokia and Ericsson specific (mobile phone?) key. If I am reading https://hg.mozilla.org/mozilla-central/file/tip/widget/windows/KeyboardLayout.cpp correctly it isn't really handled by Firefox but ignored.

If we are convinced that this key is present on contemporary hardware the correct way forward is to amend the UIEvents key specification.

Opening an issue for this might be overkill but this seemed to be the most appropriate medium for communicating this.

This is perfect for an issue imho. Its a small and well-defined problem, we can discuss here without cluttering any other discussion forum.

ArturKovacs commented 3 years ago

I didn't find a lot of information about this key, do you know a keyboard with this key?

Frankly, I don't. I searched for VK_OEM_FINISH around GitHub and there's a bunch of code referring to it but all I could see was either just the definition of the constant or using it in a table which converts a scancode to a virtual keycode. The most interesting definition I found was this and I found other sources that also suggest that it's some old Nokia/Ericsson stuff but I can't find anything that actually uses it or any page that would describe what this button is.

So at this point I'm just super curious and a bit too invested but this doesn't seem to be required.

@mwallnoefer I can see you made a change to the MDN page specifying which IE versions the described behaviour was tested with. I would be more than delighted if you could let us know what this button is for. 😊

mwallnoefer commented 3 years ago

Oh, that was already more than a year ago. I just extended the IE 9 keymap to IE 11, but I haven't tested all the keys in detail, sorry.

ArturKovacs commented 3 years ago

That's alright. Thanks for getting back to us this quickly anyways.

Considering what we know so far, to me it seems perfectly reasonable to leave Finish out for now. If someone needs it, they can always open a PR. Feel free to close this issue @pyfisch