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

Unified Diff: ui/events/keycodes/keyboard_code_conversion_mac.mm

Issue 809773006: MacViews: Intercept events for Menus (after AppKit has interpreted keystrokes) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@20141205-MacViews-AcceleratedWidget-PLUS-AddingLayers-fromcl-PLUS-bringup
Patch Set: rollback card unmask 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
Index: ui/events/keycodes/keyboard_code_conversion_mac.mm
diff --git a/ui/events/keycodes/keyboard_code_conversion_mac.mm b/ui/events/keycodes/keyboard_code_conversion_mac.mm
index 1e976b7198e98df0a1ad831f6c86cff54566b2ca..05dec0ec17c0038c611ddb71f1d30ce28818f462 100644
--- a/ui/events/keycodes/keyboard_code_conversion_mac.mm
+++ b/ui/events/keycodes/keyboard_code_conversion_mac.mm
@@ -203,6 +203,8 @@ const KeyCodeMap kKeyCodesMap[] = {
// A convenient array for getting symbol characters on the number keys.
const char kShiftCharsForNumberKeys[] = ")!@#$%^&*(";
+} // namespace
+
// Translates from character code to keyboard code.
KeyboardCode KeyboardCodeFromCharCode(unichar charCode) {
switch (charCode) {
@@ -311,6 +313,8 @@ KeyboardCode KeyboardCodeFromCharCode(unichar charCode) {
return VKEY_UNKNOWN;
}
+namespace {
+
KeyboardCode KeyboardCodeFromKeyCode(unsigned short keyCode) {
static const KeyboardCode kKeyboardCodes[] = {
/* 0 */ VKEY_A,

Powered by Google App Engine
This is Rietveld 408576698