Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Issue 2474083002: [DomKey X11] Produce correct DomKey when Control is down (Closed)

Created:
4 years, 1 month ago by chongz
Modified:
4 years, 1 month ago
CC:
chromium-reviews, tdresser+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[DomKey X11] Produce correct DomKey when Control is down According spec the DomKey for ctrl-<key> should be the same as pressing <key> along. (When ctrl-<key> doesn't natively generates printable characters) The same applies to ctrl-shift-<key>. (e.g. should produce the same DomKey as shift-<key>) This CL fixed the issue by removing ctrl modifier from |XKeyEvent| when querying |KeySym| using |XLookupString()|. * We have to do this because we have no way to know whether a key combination would print something on screen (see Example 1 below); * We can do this because according to XKB map no key combinations with ctrl key are mapped to printable characters. Example 1: On Linux US keyboard with French layout, |XLookupString()| * Returns '?' for ctrl-shift-/ * Returns '§' for shift-/ We have no way to know if '?' is the character we want. Spec: https://github.com/w3c/uievents/issues/113 TEST=Manually Test 1: 1. Go to https://cdn.rawgit.com/w3c/uievents/gh-pages/tools/key-event-viewer.html 2. Switch to Right Handed Dvorak layout (with en-US physical keyboard) 3. Press ctrl-'w' (The key labeled as 'w') 4. 'key' should be '6' Test 2: 1. Similar to Test 1, but hit ctrl-shift-'w' in step 3 2. 'key' should be '^' Test 3: 1. Go to https://cdn.rawgit.com/w3c/uievents/gh-pages/tests/key-mtest-102fr-fr.html 2. Switch to French layout (with en-US physical keyboard) 3. Click "Show Options" and check "Shift+Control" 4. Click "Start Test" 5. Press ctrl-shift-<highlighted keys> one by one, press ESC to skip special hotkeys 6. Most test cases should be green (Expected keys that doesn't exist) BUG=633838 Committed: https://crrev.com/d093f7b054b78f6740e4aa96e163ae0383ee3cca Cr-Commit-Position: refs/heads/master@{#431674}

Patch Set 1 : Produce correct DomKey when ctrl is down #

Total comments: 2

Patch Set 2 : dtapuska's review: Move #if block #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -10 lines) Patch
M third_party/WebKit/Source/core/editing/EditingBehavior.cpp View 1 1 chunk +7 lines, -1 line 2 comments Download
M ui/events/event.cc View 1 chunk +1 line, -5 lines 0 comments Download
M ui/events/keycodes/keyboard_code_conversion_x.cc View 1 chunk +14 lines, -4 lines 0 comments Download

Messages

Total messages: 40 (24 generated)
chongz
kpschoedel@ I've fixed the issue as you suggested, PTAL, thanks!
4 years, 1 month ago (2016-11-07 21:34:36 UTC) #11
kpschoedel
On 2016/11/07 21:34:36, chongz wrote: > kpschoedel@ I've fixed the issue as you suggested, PTAL, ...
4 years, 1 month ago (2016-11-07 21:41:07 UTC) #12
chongz
dtapuska@ PTAL, thanks!
4 years, 1 month ago (2016-11-07 21:51:27 UTC) #14
dtapuska
On 2016/11/07 21:51:27, chongz wrote: > dtapuska@ PTAL, thanks! lgtm % nit. Are you writing ...
4 years, 1 month ago (2016-11-07 22:01:48 UTC) #15
dtapuska
https://codereview.chromium.org/2474083002/diff/20001/third_party/WebKit/Source/core/editing/EditingBehavior.cpp File third_party/WebKit/Source/core/editing/EditingBehavior.cpp (right): https://codereview.chromium.org/2474083002/diff/20001/third_party/WebKit/Source/core/editing/EditingBehavior.cpp#newcode282 third_party/WebKit/Source/core/editing/EditingBehavior.cpp:282: // According to XKB map no keyboard combinations with ...
4 years, 1 month ago (2016-11-07 22:04:37 UTC) #16
chongz
On 2016/11/07 22:01:48, dtapuska wrote: > On 2016/11/07 21:51:27, chongz wrote: > > dtapuska@ PTAL, ...
4 years, 1 month ago (2016-11-07 22:43:26 UTC) #19
chongz
rbyers@ PTAL, thanks! https://codereview.chromium.org/2474083002/diff/20001/third_party/WebKit/Source/core/editing/EditingBehavior.cpp File third_party/WebKit/Source/core/editing/EditingBehavior.cpp (right): https://codereview.chromium.org/2474083002/diff/20001/third_party/WebKit/Source/core/editing/EditingBehavior.cpp#newcode282 third_party/WebKit/Source/core/editing/EditingBehavior.cpp:282: // According to XKB map no ...
4 years, 1 month ago (2016-11-07 22:44:35 UTC) #21
chongz
avi@ PTAL, thanks! (Rick is in Dev Summit)
4 years, 1 month ago (2016-11-09 15:32:39 UTC) #25
Avi (use Gerrit)
lgtm I'll stamp
4 years, 1 month ago (2016-11-09 15:36:01 UTC) #26
chongz
cbiesinger@ PTAL at "third_party/WebKit/Source/core/", thanks!
4 years, 1 month ago (2016-11-09 16:06:12 UTC) #29
chongz
yosin@ PTAL at "third_party/WebKit/Source/core/", thanks!
4 years, 1 month ago (2016-11-10 17:14:51 UTC) #31
yosin_UTC9
lgtm for core/editing https://codereview.chromium.org/2474083002/diff/40001/third_party/WebKit/Source/core/editing/EditingBehavior.cpp File third_party/WebKit/Source/core/editing/EditingBehavior.cpp (right): https://codereview.chromium.org/2474083002/diff/40001/third_party/WebKit/Source/core/editing/EditingBehavior.cpp#newcode274 third_party/WebKit/Source/core/editing/EditingBehavior.cpp:274: if (event.ctrlKey()) Q: How about other ...
4 years, 1 month ago (2016-11-11 01:49:26 UTC) #32
chongz
https://codereview.chromium.org/2474083002/diff/40001/third_party/WebKit/Source/core/editing/EditingBehavior.cpp File third_party/WebKit/Source/core/editing/EditingBehavior.cpp (right): https://codereview.chromium.org/2474083002/diff/40001/third_party/WebKit/Source/core/editing/EditingBehavior.cpp#newcode274 third_party/WebKit/Source/core/editing/EditingBehavior.cpp:274: if (event.ctrlKey()) On 2016/11/11 01:49:26, Yosi_UTC9 wrote: > Q: ...
4 years, 1 month ago (2016-11-11 20:12:28 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2474083002/40001
4 years, 1 month ago (2016-11-11 21:16:32 UTC) #36
commit-bot: I haz the power
Committed patchset #2 (id:40001)
4 years, 1 month ago (2016-11-11 23:05:50 UTC) #38
commit-bot: I haz the power
4 years, 1 month ago (2016-11-11 23:54:13 UTC) #40
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/d093f7b054b78f6740e4aa96e163ae0383ee3cca
Cr-Commit-Position: refs/heads/master@{#431674}

Powered by Google App Engine
This is Rietveld 408576698