Bug 224039 - Wrong keyCode with composition start with ControlKey
Summary: Wrong keyCode with composition start with ControlKey
Status: RESOLVED WORKSFORME
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: Safari 14
Hardware: iPhone / iPad iOS 14
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-31 22:34 PDT by Spring Hack
Modified: 2021-04-07 16:18 PDT (History)
1 user (show)

See Also:


Attachments
simple html file to test keyCode (565 bytes, text/html)
2021-03-31 22:34 PDT, Spring Hack
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Spring Hack 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.
Comment 1 Smoley 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)