WordPress.org

Make WordPress Core

Changeset 8778


Ignore:
Timestamp:
08/30/2008 12:28:13 AM (10 years ago)
Author:
ryan
Message:

Support Mac meta key. see #7643

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/js/jquery/jquery.hotkeys.js

    r8777 r8778  
    7070                ctrl = event.ctrlKey,
    7171                alt= event.altKey,
     72                meta = event.metaKey,
    7273                propagate = true, // default behaivour
    7374                mapPoint = null;
     
    8283            }
    8384            var cbMap = that.all[element].events[type].callbackMap;
    84             if(!shift && !ctrl && !alt) { // No Modifiers
     85            if(!shift && !ctrl && !alt && !meta) { // No Modifiers
    8586                mapPoint = cbMap[special] ||  cbMap[character]
    8687            }
     
    9192                if(ctrl) modif+= 'ctrl+';
    9293                if(shift) modif += 'shift+';
     94                if(meta) modif += 'meta+';
    9395                // modifiers + special keys or modifiers + characters or modifiers + shift characters
    9496                mapPoint = cbMap[modif+special] || cbMap[modif+character] || cbMap[modif+that.shift_nums[character]]
Note: See TracChangeset for help on using the changeset viewer.