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

Unified Diff: ui/events/keycodes/keyboard_code_conversion.h

Issue 742103002: Ozone keyboard layout (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lite-code
Patch Set: reeeeebase Created 6 years 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/events/events.gyp ('k') | ui/events/keycodes/keyboard_code_conversion.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/keycodes/keyboard_code_conversion.h
diff --git a/ui/events/keycodes/keyboard_code_conversion.h b/ui/events/keycodes/keyboard_code_conversion.h
index b7bdd57157b9c91b177f8d7d46b572a9c5876b83..9404394b5621fe7b9bfb7ac3ed86e2209d054b30 100644
--- a/ui/events/keycodes/keyboard_code_conversion.h
+++ b/ui/events/keycodes/keyboard_code_conversion.h
@@ -5,13 +5,15 @@
#ifndef UI_EVENTS_KEYCODES_KEYBOARD_CODE_CONVERSION_H_
#define UI_EVENTS_KEYCODES_KEYBOARD_CODE_CONVERSION_H_
-#include "base/basictypes.h"
+#include "base/strings/string16.h"
#include "ui/events/events_base_export.h"
#include "ui/events/keycodes/keyboard_codes.h"
namespace ui {
-// A helper function to get the character generated by a key event in a
+enum class DomKey;
+
+// Helper functions to get the meaning of a Windows key code in a
// platform independent way. It supports control characters as well.
// It assumes a US keyboard layout is used, so it may only be used when there
// is no native event or no better way to get the character.
@@ -31,8 +33,12 @@ namespace ui {
// correct character. That's why we can use XLookupString() function to get
// the correct text generated by a X key event (See how is GetCharacter()
// implemented in event_x.cc).
-EVENTS_BASE_EXPORT uint16 GetCharacterFromKeyCode(KeyboardCode key_code,
- int flags);
+EVENTS_BASE_EXPORT base::char16 GetCharacterFromKeyCode(KeyboardCode key_code,
+ int flags);
+EVENTS_BASE_EXPORT bool GetMeaningFromKeyCode(KeyboardCode key_code,
+ int flags,
+ DomKey* dom_key,
+ base::char16* character);
} // namespace ui
« no previous file with comments | « ui/events/events.gyp ('k') | ui/events/keycodes/keyboard_code_conversion.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698