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

Unified Diff: views/event_gtk.cc

Issue 235025: Use windows keycodes under linux (and all non-windows platforms). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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 | « views/event.h ('k') | views/focus/accelerator_handler_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/event_gtk.cc
===================================================================
--- views/event_gtk.cc (revision 27238)
+++ views/event_gtk.cc (working copy)
@@ -6,18 +6,19 @@
#include <gdk/gdk.h>
+#include "base/keyboard_code_conversion_gtk.h"
+
namespace views {
// TODO(jcampan): the same physical key can send different keyvals (ex: a or A).
// In order for accelerators to work, we need to normalize that. The right
// solution should probably to get the key-code out of the keystate.
-KeyEvent::KeyEvent(GdkEventKey* event, bool make_lower_case)
+KeyEvent::KeyEvent(GdkEventKey* event)
: Event(event->type == GDK_KEY_PRESS ?
Event::ET_KEY_PRESSED : Event::ET_KEY_RELEASED,
GetFlagsFromGdkState(event->state)),
// TODO(erg): All these values are iffy.
- character_(make_lower_case ? gdk_keyval_to_lower(event->keyval) :
- event->keyval),
+ character_(base::WindowsKeyCodeForGdkKeyCode(event->keyval)),
repeat_count_(0),
message_flags_(0) {
}
« no previous file with comments | « views/event.h ('k') | views/focus/accelerator_handler_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698