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

Unified Diff: ui/base/keycodes/keyboard_code_conversion_mac.h

Issue 8953037: Aura needs event translation for Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Nico's comment #5. Created 9 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/base/events.h ('k') | ui/base/keycodes/keyboard_code_conversion_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/keycodes/keyboard_code_conversion_mac.h
diff --git a/ui/base/keycodes/keyboard_code_conversion_mac.h b/ui/base/keycodes/keyboard_code_conversion_mac.h
index 74499b7d04079e0e03764f949e84bc1410eda445..ef2bb5d6a1dc100e31bc8c0b6538952d449af675 100644
--- a/ui/base/keycodes/keyboard_code_conversion_mac.h
+++ b/ui/base/keycodes/keyboard_code_conversion_mac.h
@@ -24,13 +24,18 @@ namespace ui {
// |characterIgnoringModifiers|.
// -1 will be returned if the keycode can't be converted.
// This function is mainly for simulating keyboard events in unit tests.
-// See third_party/WebKit/Source/WebKit/chromium/src/mac/WebInputEventFactory.mm for
-// reverse conversion.
+// See |KeyboardCodeFromNSEvent| for reverse conversion.
UI_EXPORT int MacKeyCodeForWindowsKeyCode(KeyboardCode keycode,
NSUInteger flags,
unichar* character,
unichar* characterIgnoringModifiers);
+// This implementation cribbed from:
+// third_party/WebKit/Source/WebKit/chromium/src/mac/WebInputEventFactory.mm
+// Converts |event| into a |KeyboardCode|. The mapping is not direct as the Mac
+// has a different notion of key codes.
+UI_EXPORT KeyboardCode KeyboardCodeFromNSEvent(NSEvent* event);
+
} // namespace ui
#endif // UI_BASE_KEYCODES_KEYBOARD_CODE_CONVERSION_MAC_H_
« no previous file with comments | « ui/base/events.h ('k') | ui/base/keycodes/keyboard_code_conversion_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698