From 00dbe080544b259cacc912bba9938da358ac035b Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Sat, 30 Aug 2008 00:28:13 +0000 Subject: [PATCH] Support Mac meta key. see #7643 git-svn-id: https://develop.svn.wordpress.org/trunk@8778 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/js/jquery/jquery.hotkeys.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wp-includes/js/jquery/jquery.hotkeys.js b/wp-includes/js/jquery/jquery.hotkeys.js index b545cd8211..7508630927 100644 --- a/wp-includes/js/jquery/jquery.hotkeys.js +++ b/wp-includes/js/jquery/jquery.hotkeys.js @@ -69,6 +69,7 @@ USAGE: shift = event.shiftKey, ctrl = event.ctrlKey, alt= event.altKey, + meta = event.metaKey, propagate = true, // default behaivour mapPoint = null; @@ -81,7 +82,7 @@ USAGE: } } var cbMap = that.all[element].events[type].callbackMap; - if(!shift && !ctrl && !alt) { // No Modifiers + if(!shift && !ctrl && !alt && !meta) { // No Modifiers mapPoint = cbMap[special] || cbMap[character] } // deals with combinaitons (alt|ctrl|shift+anything) @@ -90,6 +91,7 @@ USAGE: if(alt) modif +='alt+'; if(ctrl) modif+= 'ctrl+'; if(shift) modif += 'shift+'; + if(meta) modif += 'meta+'; // modifiers + special keys or modifiers + characters or modifiers + shift characters mapPoint = cbMap[modif+special] || cbMap[modif+character] || cbMap[modif+that.shift_nums[character]] }