- From: Fuqiao Xue <notifications@github.com>
- Date: Wed, 28 Feb 2018 01:36:50 -0800
- To: w3c/uievents-code <uievents-code@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/uievents-code/issues/20/369180106@github.com>
I just had a look at the implementation report. WebKit now supports `KeyboardEvent.code`[1]. It's shipped in Safari too[2]. Here's my manual test results in Safari 11.0.3 on 10.13.3: * In Alphanumeric Section - Writing System Keys, `code` attribute values other than "IntlBackslash", "IntlRo", and "IntlYen" are supported. My keyboard does not contain these three keys so I'm not able to test them. * In Alphanumeric Section - Functional Keys, `code` attribute values other than "ContextMenu", "ControlRight", and functional keys found on Japanese and Korean keyboards are supported. My keyboard does not contain those keys either. * In Control Pad Section, "Delete", "End", "Home", "PageDown", and "PageUp" are supported (emulated by fn + various keys). Not sure about "Help" and "Insert". * In Arrow Pad Section, all `code` attribute values are supported. * I haven't tested the Numpad Section (because my MacBook does not contain a numeric keypad). * In Function Section, "Escape" and "F1-12" are supported (with Touch Bar). Not sure about "PrintScreen", "ScrollLock", and "Pause" because of the lack of these keys. * I haven't tested the Media Keys, because my keyboard does not contain these keys. * In Optional Keys, "Fn" is not supported (directly). I don't know how to test "Unidentified". Not sure about other keys. I don't have a Windows machine and therefore I'm not able to provide the test results for Microsoft Edge, although from caniuse.com[2] Edge doesn't seem to support `KeyboardEvent.code`. ----- Test code: ```javascript window.addEventListener("keydown", function (event) { let out = "KeyboardEvent: key='" + event.key + "' | code='" + event.code + "'"; console.log(out); }, true); ``` ----- Links: [1] https://bugs.webkit.org/show_bug.cgi?id=149584 [2] https://webkit.org/blog/6987/release-notes-for-safari-technology-preview-15/ [3] https://caniuse.com/#feat=keyboardevent-code -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/uievents-code/issues/20#issuecomment-369180106
Received on Wednesday, 28 February 2018 09:37:17 UTC