summaryrefslogtreecommitdiffstats
path: root/views/controls/textfield/textfield.cc
diff options
context:
space:
mode:
Diffstat (limited to 'views/controls/textfield/textfield.cc')
-rw-r--r--views/controls/textfield/textfield.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/views/controls/textfield/textfield.cc b/views/controls/textfield/textfield.cc
index 368e7fd..bf12e42 100644
--- a/views/controls/textfield/textfield.cc
+++ b/views/controls/textfield/textfield.cc
@@ -14,6 +14,7 @@
#include "base/win_util.h"
#endif
+#include "base/keyboard_codes.h"
#include "base/string_util.h"
#include "views/controls/textfield/native_textfield_wrapper.h"
#include "views/widget/widget.h"
@@ -221,14 +222,14 @@ bool Textfield::SkipDefaultKeyEventProcessing(const KeyEvent& e) {
#if defined(OS_WIN)
// TODO(hamaji): Figure out which keyboard combinations we need to add here,
// similar to LocationBarView::SkipDefaultKeyEventProcessing.
- const int c = e.GetCharacter();
- if (c == VK_BACK)
+ base::KeyboardCode key = e.GetKeyCode();
+ if (key == base::VKEY_BACK)
return true; // We'll handle BackSpace ourselves.
// We don't translate accelerators for ALT + NumPad digit, they are used for
// entering special characters. We do translate alt-home.
- if (e.IsAltDown() && (c != VK_HOME) &&
- win_util::IsNumPadDigit(c, e.IsExtendedKey()))
+ if (e.IsAltDown() && (key != base::VKEY_HOME) &&
+ win_util::IsNumPadDigit(key, e.IsExtendedKey()))
return true;
#endif
return false;