Steps to reproduce: 1. Visit <https://unixpapa.com/js/testkey.html>. 2. Ensure default handling is not suppressed for any of the offered events. 3. Enable attribute DOM 3. 4. Focus the text field. 5. Press some key while holding Control down, say Control + A. The keydown and keyup events visually show an empty string for the key property. Compare to Mac, which has output of the form: [[ keydown keyCode=17 which=17 charCode=0 key=Control char=undefined location=1 repeat=false keydown keyCode=65 (A) which=65 (A) charCode=0 key=a char=undefined location=0 repeat=false keyup keyCode=65 (A) which=65 (A) charCode=0 key=a char=undefined location=0 repeat=false keyup keyCode=17 which=17 charCode=0 key=Control char=undefined location=1 repeat=false ]]
<rdar://problem/46795214>
Created attachment 357504 [details] Patch I did not include a test with this change as the patch uses the same code as we do on Mac, we do currently have infrastructure to generate a key event with a Control key modifier flag that has different unmodified and modified input strings, and I wanted to post this patch sooner. When I have a moment I will look to add testing support.
Comment on attachment 357504 [details] Patch Clearing flags on attachment: 357504 Committed r239361: <https://trac.webkit.org/changeset/239361>
All reviewed patches have been landed. Closing bug.
Comment on attachment 357504 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=357504&action=review > Source/WebCore/platform/ios/PlatformEventFactoryIOS.mm:199 > + NSString *characters = isControlDown ? event.charactersIgnoringModifiers : event.characters; Does this do the right thing for Control+Shift+A and other combinations that include both Control and other modifiers?
(In reply to Darin Adler from comment #5) > Comment on attachment 357504 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=357504&action=review > > > Source/WebCore/platform/ios/PlatformEventFactoryIOS.mm:199 > > + NSString *characters = isControlDown ? event.charactersIgnoringModifiers : event.characters; > > Does this do the right thing for Control+Shift+A and other combinations that > include both Control and other modifiers? It will once we fix <rdar://problem/46874406>.