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

Issue 430463005: linux/cros: Supports XKeyEvent to Unicode conversion independent from user's locale. (Closed)

Created:
6 years, 4 months ago by Yuki
Modified:
5 years, 4 months ago
Reviewers:
Nico, sadrul, Wez
CC:
chromium-reviews, tdresser+watch_chromium.org, kpschoedel
Project:
chromium
Visibility:
Public.

Description

linux/cros: Supports XKeyEvent to Unicode conversion independent from user's locale. XLookupString depends on user's locale settings (LC_CTYPE). The returned string is encoded in LC_CTYPE, and if the string cannot be respresented in LC_CTYPE, it becomes an empty string. i.e. users cannot input characters. This CL introduces our own map from KeySym (virtual key code in X) to Unicode character. This map works independent from user's locale. BUG=395019 TEST=Done manually. R=sadrul@chromium.org, wez@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=289272

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : Updated BUILD.gn #

Patch Set 4 : Addressed review comments. #

Total comments: 28

Patch Set 5 : Addressed review comments. #

Total comments: 2

Patch Set 6 : Addressed review comments. #

Patch Set 7 : Synced. #

Total comments: 6

Patch Set 8 : Addressed sadrul's review comments. #

Total comments: 2

Patch Set 9 : Addressed sadrul's review comments. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+879 lines, -12 lines) Patch
M ui/events/BUILD.gn View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M ui/events/events.gyp View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M ui/events/keycodes/keyboard_code_conversion_x.cc View 1 2 3 4 5 4 chunks +6 lines, -12 lines 0 comments Download
A ui/events/x/keysym_to_unicode.h View 1 2 3 4 1 chunk +20 lines, -0 lines 0 comments Download
A ui/events/x/keysym_to_unicode.cc View 1 2 3 4 5 6 7 8 1 chunk +849 lines, -0 lines 1 comment Download

Messages

Total messages: 22 (1 generated)
Yuki
Could you review this CL? I think that, with this fix, we can get rid ...
6 years, 4 months ago (2014-08-02 11:56:57 UTC) #1
Wez
On 2014/08/02 11:56:57, Yuki wrote: > Could you review this CL? > > I think ...
6 years, 4 months ago (2014-08-05 00:51:41 UTC) #2
Yuki
On 2014/08/05 00:51:41, Wez wrote: > On 2014/08/02 11:56:57, Yuki wrote: > > Could you ...
6 years, 4 months ago (2014-08-05 14:55:42 UTC) #3
Wez
OK, thanks for taking the time to check that. I think using the old-style KeySym-> ...
6 years, 4 months ago (2014-08-05 17:52:43 UTC) #4
Yuki
First, I changed the code a little bit and now it treats Latin 1 and ...
6 years, 4 months ago (2014-08-06 15:10:34 UTC) #5
Wez
https://codereview.chromium.org/430463005/diff/60001/ui/events/BUILD.gn File ui/events/BUILD.gn (right): https://codereview.chromium.org/430463005/diff/60001/ui/events/BUILD.gn#newcode63 ui/events/BUILD.gn:63: "keycodes/keysym_to_unicode_x.h", Since this conversion isn't anything to do with ...
6 years, 4 months ago (2014-08-07 23:37:12 UTC) #6
Yuki
https://codereview.chromium.org/430463005/diff/60001/ui/events/BUILD.gn File ui/events/BUILD.gn (right): https://codereview.chromium.org/430463005/diff/60001/ui/events/BUILD.gn#newcode63 ui/events/BUILD.gn:63: "keycodes/keysym_to_unicode_x.h", On 2014/08/07 23:37:11, Wez wrote: > Since this ...
6 years, 4 months ago (2014-08-08 14:22:09 UTC) #7
Wez
lgtm https://codereview.chromium.org/430463005/diff/80001/ui/events/keycodes/keyboard_code_conversion_x.cc File ui/events/keycodes/keyboard_code_conversion_x.cc (right): https://codereview.chromium.org/430463005/diff/80001/ui/events/keycodes/keyboard_code_conversion_x.cc#newcode846 ui/events/keycodes/keyboard_code_conversion_x.cc:846: const XKeyEvent* xkey; nit: Style guide requires local ...
6 years, 4 months ago (2014-08-08 22:56:25 UTC) #8
Yuki
sadrul@, could you review as an owner of: ui/events/BUILD.gn https://codereview.chromium.org/430463005/diff/80001/ui/events/keycodes/keyboard_code_conversion_x.cc File ui/events/keycodes/keyboard_code_conversion_x.cc (right): https://codereview.chromium.org/430463005/diff/80001/ui/events/keycodes/keyboard_code_conversion_x.cc#newcode846 ui/events/keycodes/keyboard_code_conversion_x.cc:846: ...
6 years, 4 months ago (2014-08-11 05:58:52 UTC) #9
sadrul
https://codereview.chromium.org/430463005/diff/120001/ui/events/x/keysym_to_unicode.cc File ui/events/x/keysym_to_unicode.cc (right): https://codereview.chromium.org/430463005/diff/120001/ui/events/x/keysym_to_unicode.cc#newcode32 ui/events/x/keysym_to_unicode.cc:32: #define XK_SINHALA Do these defines need to be before ...
6 years, 4 months ago (2014-08-11 18:59:26 UTC) #10
Yuki
https://codereview.chromium.org/430463005/diff/120001/ui/events/x/keysym_to_unicode.cc File ui/events/x/keysym_to_unicode.cc (right): https://codereview.chromium.org/430463005/diff/120001/ui/events/x/keysym_to_unicode.cc#newcode32 ui/events/x/keysym_to_unicode.cc:32: #define XK_SINHALA On 2014/08/11 18:59:26, sadrul wrote: > Do ...
6 years, 4 months ago (2014-08-12 06:11:38 UTC) #11
Yuki
sadrul@, could you take another look?
6 years, 4 months ago (2014-08-13 04:29:28 UTC) #12
sadrul
/cc +kpschoedel@ LGTM https://codereview.chromium.org/430463005/diff/140001/ui/events/x/keysym_to_unicode.cc File ui/events/x/keysym_to_unicode.cc (right): https://codereview.chromium.org/430463005/diff/140001/ui/events/x/keysym_to_unicode.cc#newcode836 ui/events/x/keysym_to_unicode.cc:836: KeySymToUnicodeMap keysym_to_unicode_map; keysym_to_unicode_map_;
6 years, 4 months ago (2014-08-13 04:45:59 UTC) #13
Yuki
Thank you guys for the review. Will commit. https://codereview.chromium.org/430463005/diff/140001/ui/events/x/keysym_to_unicode.cc File ui/events/x/keysym_to_unicode.cc (right): https://codereview.chromium.org/430463005/diff/140001/ui/events/x/keysym_to_unicode.cc#newcode836 ui/events/x/keysym_to_unicode.cc:836: KeySymToUnicodeMap ...
6 years, 4 months ago (2014-08-13 07:38:16 UTC) #14
Yuki
The CQ bit was checked by yukishiino@chromium.org
6 years, 4 months ago (2014-08-13 07:38:30 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yukishiino@chromium.org/430463005/160001
6 years, 4 months ago (2014-08-13 07:39:49 UTC) #16
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: chromium_presubmit on tryserver.chromium.linux ...
6 years, 4 months ago (2014-08-13 11:04:44 UTC) #17
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-13 11:09:33 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/3908)
6 years, 4 months ago (2014-08-13 11:09:33 UTC) #19
Yuki
Committed patchset #9 manually as 289272 (presubmit successful).
6 years, 4 months ago (2014-08-13 12:46:08 UTC) #20
Nico
5 years, 4 months ago (2015-08-15 00:23:06 UTC) #22
Message was sent while issue was closed.
https://codereview.chromium.org/430463005/diff/160001/ui/events/x/keysym_to_u...
File ui/events/x/keysym_to_unicode.cc (right):

https://codereview.chromium.org/430463005/diff/160001/ui/events/x/keysym_to_u...
ui/events/x/keysym_to_unicode.cc:38: #include <unordered_map>
Looks like this adds an include of unordered_map – please don't use C++11
library features yet.

Powered by Google App Engine
This is Rietveld 408576698