Bug 224039

Summary: Wrong keyCode with composition start with ControlKey
Product: WebKit Reporter: Spring Hack <springhack>
Component: UI EventsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WORKSFORME    
Severity: Normal CC: smoley
Priority: P2    
Version: Safari 14   
Hardware: iPhone / iPad   
OS: iOS 14   
Attachments:
Description Flags
simple html file to test keyCode none

Spring Hack
Reported 2021-03-31 22:34:27 PDT
Created attachment 424871 [details] simple html file to test keyCode When use some web emulate terminal I found `ctrl-c` not work as expect, it fire `enter` key finally, so I make a simple html code to test; it show keyCode of `ctrl` is `17` and `keyCode` of `c` is `67`, but `ctrl-c` is `13` which is the keyCode of `enter` key. Try think about this operation, if I type `rm -rf /` then I found it wrong, so I press `ctrl-c` intent to cancel this operation, but it finally delete all my files, so I think it's a terrible bug.
Attachments
simple html file to test keyCode (565 bytes, text/html)
2021-03-31 22:34 PDT, Spring Hack
no flags
Smoley
Comment 1 2021-04-07 16:18:51 PDT
Thanks for filing, this does not reproduce for me on the latest macOS 11.3 Beta with Safari 14.1, on the latest iOS 14.5 beta or with TOT 14.2 using the provided test case. I see: TYPE(keydown) KEY(Control) CODE(ControlLeft) KEY_CODE(17) TYPE(keydown) KEY(c) CODE(KeyC) KEY_CODE(67) TYPE(keyup) KEY(Control) CODE(ControlLeft) KEY_CODE(17) TYPE(keyup) KEY(c) CODE(KeyC) KEY_CODE(67)
Note You need to log in before you can comment on or make changes to this bug.