From 59e5689d1abc4170e2b07f92804a3b2885a63014 Mon Sep 17 00:00:00 2001 From: Aparajita Fishman Date: Sun, 22 May 2011 17:06:25 -0700 Subject: [PATCH] On WebKit (at least on Mac), right Command key code is 93, not 91. This was not being interpreted correctly. --- AppKit/Platform/DOM/CPPlatformWindow+DOM.j | 11 ++++++----- AppKit/Platform/DOM/CPPlatformWindow+DOMKeys.j | 1 + 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/AppKit/Platform/DOM/CPPlatformWindow+DOM.j b/AppKit/Platform/DOM/CPPlatformWindow+DOM.j index d7af410fd..e15655375 100644 --- a/AppKit/Platform/DOM/CPPlatformWindow+DOM.j +++ b/AppKit/Platform/DOM/CPPlatformWindow+DOM.j @@ -183,11 +183,12 @@ KeyCodesToUnicodeMap[CPKeyCodes.BACKSLASH] = "\\"; KeyCodesToUnicodeMap[CPKeyCodes.CLOSE_SQUARE_BRACKET] = "]"; var ModifierKeyCodes = [ - CPKeyCodes.META, - CPKeyCodes.MAC_FF_META, - CPKeyCodes.CTRL, - CPKeyCodes.ALT, - CPKeyCodes.SHIFT + CPKeyCodes.META, + CPKeyCodes.WEBKIT_RIGHT_META, + CPKeyCodes.MAC_FF_META, + CPKeyCodes.CTRL, + CPKeyCodes.ALT, + CPKeyCodes.SHIFT ], supportsNativeDragAndDrop = [CPPlatform supportsDragAndDrop]; diff --git a/AppKit/Platform/DOM/CPPlatformWindow+DOMKeys.j b/AppKit/Platform/DOM/CPPlatformWindow+DOMKeys.j index aff678fc5..5a7cfa2ea 100644 --- a/AppKit/Platform/DOM/CPPlatformWindow+DOMKeys.j +++ b/AppKit/Platform/DOM/CPPlatformWindow+DOMKeys.j @@ -83,6 +83,7 @@ CPKeyCodes = { Y: 89, Z: 90, META: 91, + WEBKIT_RIGHT_META: 93, // WebKit (on Mac at least) fires this for the right Command key CONTEXT_MENU: 93, NUM_ZERO: 96, NUM_ONE: 97,