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

Issue 295003: Make backspace not go back while IME is active. (Closed)

Created:
11 years, 2 months ago by Nico
Modified:
9 years, 7 months ago
Reviewers:
James Su, Hironori Bono
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Make backspace not go back while IME is active. Linux does this in GtkIMContextWrapper::ProcessFilteredKeyPressEvent() by setting hardware_keycode to 0. It's a pain to change an NSEvent, so I just added a bool "skip" to NativeWebKeybordEvent and set it to "true" for rawkeydowns while ime is active. BUG=25000 TEST=Open webpage. Focus text field. Type something, hit backspace. Text should be deleted. Focus background, hit backspace. Browser should go back one page. Focus text field, start IME (either by going to syspref->international->input menu and enabling e.g. "Kotoeri" and then selecting this in the top right corner and typing a single "a", or by just activating dead key ime on an us layout by hitting opt-u, opt-i, or opt-e), hit backspace. Browser should not go back but end IME mode. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=29388

Patch Set 1 #

Patch Set 2 : cleanup #

Total comments: 9

Patch Set 3 : Call setKeyIdentifierFromWindowsKeyCode(). #

Patch Set 4 : s/skip/skip_in_browser/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+28 lines, -8 lines) Patch
M chrome/browser/global_keyboard_shortcuts_mac.mm View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/ime_input.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ime_input.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/renderer_host/render_widget_host_view_mac.mm View 1 2 3 1 chunk +5 lines, -2 lines 0 comments Download
M chrome/browser/tab_contents/tab_contents_view_mac.mm View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/common/native_web_keyboard_event.h View 1 2 3 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/common/native_web_keyboard_event_mac.mm View 1 2 3 3 chunks +10 lines, -4 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Nico
Hi Hironori & James, please help review. I'm not very familiar with IMEs, but this ...
11 years, 2 months ago (2009-10-18 17:11:54 UTC) #1
James Su
Hi, This approach looks more elegant than what the Linux code currently does. I suggest ...
11 years, 2 months ago (2009-10-19 01:45:30 UTC) #2
Hironori Bono
LGTM
11 years, 2 months ago (2009-10-19 02:00:57 UTC) #3
Nico
Thanks for the reviews! http://codereview.chromium.org/295003/diff/1001/2004 File chrome/browser/renderer_host/render_widget_host_view_mac.mm (right): http://codereview.chromium.org/295003/diff/1001/2004#newcode592 Line 592: event.windowsKeyCode = 0xE5; Sounds ...
11 years, 2 months ago (2009-10-19 02:42:50 UTC) #4
Nico
Hit sent a bit to early, sorry. Changed my mind about one of the comments. ...
11 years, 2 months ago (2009-10-19 02:50:41 UTC) #5
James Su
LGTM. http://codereview.chromium.org/295003/diff/1001/2006 File chrome/common/native_web_keyboard_event.h (right): http://codereview.chromium.org/295003/diff/1001/2006#newcode56 Line 56: bool skip; skip_in_browser sounds ok to me. ...
11 years, 2 months ago (2009-10-19 02:51:13 UTC) #6
Nico
11 years, 2 months ago (2009-10-19 03:06:11 UTC) #7
Thanks, submitting.

http://codereview.chromium.org/295003/diff/1001/2006
File chrome/common/native_web_keyboard_event.h (right):

http://codereview.chromium.org/295003/diff/1001/2006#newcode56
Line 56: bool skip;
Renamed to skip_in_browser.

> Then, how about move it into defined(OS_MACOSX) block in this CL and move it
out
> later when you extend it to other platforms?

It's in a defined(OS_MACOSX) block at the moment.

Powered by Google App Engine
This is Rietveld 408576698