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

Unified Diff: views/controls/textfield/textfield.cc

Issue 113971: IE and Firefox always translate (alt+numpad 7) as an accelerator. We should ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/views/location_bar_view.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/textfield/textfield.cc
===================================================================
--- views/controls/textfield/textfield.cc (revision 17014)
+++ views/controls/textfield/textfield.cc (working copy)
@@ -1179,13 +1179,14 @@
bool Textfield::SkipDefaultKeyEventProcessing(const KeyEvent& e) {
// TODO(hamaji): Figure out which keyboard combinations we need to add here,
// similar to LocationBarView::SkipDefaultKeyEventProcessing.
- if (e.GetCharacter() == VK_BACK)
+ const int c = e.GetCharacter();
+ if (c == VK_BACK)
return true; // We'll handle BackSpace ourselves.
// We don't translate accelerators for ALT + NumPad digit, they are used for
- // entering special characters.
- if (e.IsAltDown() &&
- win_util::IsNumPadDigit(e.GetCharacter(), e.IsExtendedKey()))
+ // entering special characters. We do translate alt-home.
+ if (e.IsAltDown() && (c != VK_HOME) &&
+ win_util::IsNumPadDigit(c, e.IsExtendedKey()))
return true;
return false;
« no previous file with comments | « chrome/browser/views/location_bar_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698