Support Mac meta key. see #7643

git-svn-id: https://develop.svn.wordpress.org/trunk@8778 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-08-30 00:28:13 +00:00
parent 54d9937ca8
commit 00dbe08054
1 changed files with 3 additions and 1 deletions

View File

@ -69,6 +69,7 @@ USAGE:
shift = event.shiftKey, shift = event.shiftKey,
ctrl = event.ctrlKey, ctrl = event.ctrlKey,
alt= event.altKey, alt= event.altKey,
meta = event.metaKey,
propagate = true, // default behaivour propagate = true, // default behaivour
mapPoint = null; mapPoint = null;
@ -81,7 +82,7 @@ USAGE:
} }
} }
var cbMap = that.all[element].events[type].callbackMap; 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] mapPoint = cbMap[special] || cbMap[character]
} }
// deals with combinaitons (alt|ctrl|shift+anything) // deals with combinaitons (alt|ctrl|shift+anything)
@ -90,6 +91,7 @@ USAGE:
if(alt) modif +='alt+'; if(alt) modif +='alt+';
if(ctrl) modif+= 'ctrl+'; if(ctrl) modif+= 'ctrl+';
if(shift) modif += 'shift+'; if(shift) modif += 'shift+';
if(meta) modif += 'meta+';
// modifiers + special keys or modifiers + characters or modifiers + shift characters // modifiers + special keys or modifiers + characters or modifiers + shift characters
mapPoint = cbMap[modif+special] || cbMap[modif+character] || cbMap[modif+that.shift_nums[character]] mapPoint = cbMap[modif+special] || cbMap[modif+character] || cbMap[modif+that.shift_nums[character]]
} }