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

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

Issue 796003005: Located vs non-located ui::KeyboardCode functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address review comment (wez) Created 5 years, 11 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/events/event.cc ('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 9404394b5621fe7b9bfb7ac3ed86e2209d054b30..0c14ed74cee248798e11f3abfeb90cc9251c1548 100644
--- a/ui/events/keycodes/keyboard_code_conversion.h
+++ b/ui/events/keycodes/keyboard_code_conversion.h
@@ -11,6 +11,7 @@
namespace ui {
+enum class DomCode;
enum class DomKey;
// Helper functions to get the meaning of a Windows key code in a
@@ -40,6 +41,18 @@ EVENTS_BASE_EXPORT bool GetMeaningFromKeyCode(KeyboardCode key_code,
DomKey* dom_key,
base::char16* character);
+// Determine the non-located VKEY corresponding to a located VKEY.
+// Most modifier keys have two kinds of KeyboardCode: located (e.g.
+// VKEY_LSHIFT and VKEY_RSHIFT), that indentify one of two specific
+// physical keys, and non-located (e.g. VKEY_SHIFT) that identify
+// only the operation.
+EVENTS_BASE_EXPORT KeyboardCode
+LocatedToNonLocatedKeyboardCode(KeyboardCode key_code);
+
+// Determine the located VKEY corresponding to a non-located VKEY.
+EVENTS_BASE_EXPORT KeyboardCode
+NonLocatedToLocatedKeyboardCode(KeyboardCode key_code, DomCode dom_code);
+
} // namespace ui
#endif // UI_EVENTS_KEYCODES_KEYBOARD_CODE_CONVERSION_H_
« no previous file with comments | « ui/events/event.cc ('k') | ui/events/keycodes/keyboard_code_conversion.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698