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

Unified Diff: ui/base/keycodes/keyboard_code_conversion_wayland.cc

Issue 17265006: wayland patch for inspection Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | « ui/base/keycodes/keyboard_code_conversion_wayland.h ('k') | ui/base/ozone/._touch_event_converter_ozone.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/keycodes/keyboard_code_conversion_wayland.cc
diff --git a/ui/base/keycodes/keyboard_code_conversion_wayland.cc b/ui/base/keycodes/keyboard_code_conversion_wayland.cc
new file mode 100644
index 0000000000000000000000000000000000000000..1e58076f6d48c6b0d0015e57ad0858afa312ae62
--- /dev/null
+++ b/ui/base/keycodes/keyboard_code_conversion_wayland.cc
@@ -0,0 +1,33 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ui/base/keycodes/keyboard_code_conversion_wayland.h"
+
+#include <X11/keysym.h>
+
+#include "base/basictypes.h"
+#include "base/logging.h"
+#include "base/stringprintf.h"
+#include "base/utf_string_conversions.h"
+#include "base/wayland/wayland_event.h"
+
+namespace ui {
+
+uint16 GetCharacterFromWaylandEvent(base::wayland::WaylandEvent* wev)
+{
+ if(wev->key.sym < 256)
+ return wev->key.sym;
+ return 0;
+ /*
+ char buf[6];
+ int bytes_written = XLookupString(&wev->key.key, buf, 6, NULL, NULL);
+ DCHECK_LE(bytes_written, 6);
+
+ string16 result;
+ return (bytes_written > 0 && UTF8ToUTF16(buf, bytes_written, &result) &&
+ result.length() == 1) ? result[0] : 0;
+ */
+}
+
+} // namespace ui
« no previous file with comments | « ui/base/keycodes/keyboard_code_conversion_wayland.h ('k') | ui/base/ozone/._touch_event_converter_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698