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.
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.
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.