hotkeys-js
Advanced tools
Comparing version 1.0.2 to 1.0.3
{ | ||
"name": "hotkeys-js", | ||
"main": "src/hotkeys.js", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"homepage": "https://github.com/jaywcjlove/hotkeys", | ||
@@ -6,0 +6,0 @@ "authors": [ |
{ | ||
"name": "hotkeys-js", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "A simple micro-library for defining and dispatching keyboard shortcuts. It has no dependencies.", | ||
"keywords": [ | ||
"hotkey", | ||
"hotkeys", | ||
"hotkeys-js", | ||
"hotkeysjs", | ||
"key", | ||
@@ -8,0 +11,0 @@ "keys", |
@@ -114,3 +114,3 @@ //IE对indexOf方法的支持 | ||
if(asterisk) for (i = 0; i < asterisk.length; i++) { | ||
if(asterisk[i].scope === scope) eventHandler(asterisk[i],scope); | ||
if(asterisk[i].scope === scope) eventHandler(event,asterisk[i],scope); | ||
} | ||
@@ -123,7 +123,7 @@ | ||
//找到处理内容 | ||
eventHandler(_handlers[key][i],scope); | ||
eventHandler(event,_handlers[key][i],scope); | ||
} | ||
} | ||
function eventHandler(handler,scope){ | ||
function eventHandler(event,handler,scope){ | ||
var modifiersMatch; | ||
@@ -271,2 +271,3 @@ //看它是否在当前范围 | ||
getScope:getScope, | ||
deleteScope:deleteScope, | ||
getPressedKeyCodes:getPressedKeyCodes, | ||
@@ -273,0 +274,0 @@ isPressed:isPressed, |
Sorry, the diff of this file is not supported yet
282
18171