Bug 199137 - [iOS] Key code is 0 on keyup of locale-specific punctuation typed using software keyboard
Summary: [iOS] Key code is 0 on keyup of locale-specific punctuation typed using softw...
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Local Build
Hardware: iPhone / iPad iOS 12
: P2 Normal
Assignee: Daniel Bates
Keywords: InRadar, PlatformOnly
Depends on:
Blocks: 190571
  Show dependency treegraph
Reported: 2019-06-23 14:32 PDT by Daniel Bates
Modified: 2019-08-17 09:35 PDT (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Bates 2019-06-23 14:32:37 PDT
Steps to reproduce:

1. Visit <https://unixpapa.com/js/testkey.html>
2. Focus the textarea.
3. Switch to Pinyin keyboard (note: effects other keyboard layouts as well).
4. Type 。(it's on the key in the same position as the .? key in US keyboard layout).

Then keyup has 0 for keyCode. But it should be key code for the . on US keyboard layout. Other locale-specific punctuation is also affected.
Comment 1 Radar WebKit Bug Importer 2019-06-23 14:32:50 PDT
Comment 2 Daniel Bates 2019-07-05 10:13:05 PDT
Just for reference, Microsoft Edge 42.17134.1.0 only emits a keydown with key code 229 (composition key code) for 。

^^^ Edge is even more broken.
Comment 3 Daniel Bates 2019-08-17 09:35:12 PDT
As the title saids, this bug only affects the software keyboard. This problem may be intractable to solve for all non-US layouts. The problem is that the layout of the software keyboard may ***not*** correspond to any known hardware keyboard layout.