summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--views/controls/textfield/textfield.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/views/controls/textfield/textfield.cc b/views/controls/textfield/textfield.cc
index e22da4d..e906337 100644
--- a/views/controls/textfield/textfield.cc
+++ b/views/controls/textfield/textfield.cc
@@ -14,6 +14,9 @@
#include "base/win_util.h"
#endif
+#if defined(OS_LINUX)
+#include "base/keyboard_code_conversion_gtk.h"
+#endif
#include "base/keyboard_codes.h"
#include "base/string_util.h"
#include "views/controls/textfield/native_textfield_wrapper.h"
@@ -291,7 +294,8 @@ base::KeyboardCode Textfield::Keystroke::GetKeyboardCode() const {
#if defined(OS_WIN)
return static_cast<base::KeyboardCode>(key_);
#else
- return static_cast<base::KeyboardCode>(event_.keyval);
+ return static_cast<base::KeyboardCode>(
+ base::WindowsKeyCodeForGdkKeyCode(event_.keyval));
#endif
}