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 |