From 5db271c67aae23c2e853e3ad1a29243b347049ad Mon Sep 17 00:00:00 2001 From: jaywcjlove <398188662@qq.com> Date: Thu, 10 May 2018 15:04:22 +0800 Subject: [PATCH] released v3.3.0 --- dist/hotkeys.common.js | 3 +-- dist/hotkeys.common.min.js | 2 +- dist/hotkeys.esm.js | 3 +-- dist/hotkeys.js | 3 +-- dist/hotkeys.min.js | 2 +- package.json | 2 +- 6 files changed, 6 insertions(+), 9 deletions(-) diff --git a/dist/hotkeys.common.js b/dist/hotkeys.common.js index 74f074c2..2889456a 100644 --- a/dist/hotkeys.common.js +++ b/dist/hotkeys.common.js @@ -161,7 +161,6 @@ function isPressed(keyCode) { if (typeof keyCode === 'string') { keyCode = code(keyCode); // 转换成键码 } - return _downKeys.indexOf(keyCode) !== -1; } @@ -188,8 +187,8 @@ function deleteScope(scope, newScope) { // 清除修饰键 function clearModifier(event) { - var i = _downKeys.indexOf(key); var key = event.keyCode || event.which || event.charCode; + var i = _downKeys.indexOf(key); // 从列表中清除按压过的键 if (i >= 0) _downKeys.splice(i, 1); diff --git a/dist/hotkeys.common.min.js b/dist/hotkeys.common.min.js index 9da87f47..8d41addb 100644 --- a/dist/hotkeys.common.min.js +++ b/dist/hotkeys.common.min.js @@ -1,2 +1,2 @@ /*! hotkeys-js v3.2.0 | MIT (c) 2018 kenny wong | http://jaywcjlove.github.io/hotkeys */ -"use strict";var isff="undefined"!=typeof navigator&&0= 0) _downKeys.splice(i, 1); diff --git a/dist/hotkeys.js b/dist/hotkeys.js index dfcf8b1a..41854d60 100644 --- a/dist/hotkeys.js +++ b/dist/hotkeys.js @@ -165,7 +165,6 @@ function isPressed(keyCode) { if (typeof keyCode === 'string') { keyCode = code(keyCode); // 转换成键码 } - return _downKeys.indexOf(keyCode) !== -1; } @@ -192,8 +191,8 @@ function deleteScope(scope, newScope) { // 清除修饰键 function clearModifier(event) { - var i = _downKeys.indexOf(key); var key = event.keyCode || event.which || event.charCode; + var i = _downKeys.indexOf(key); // 从列表中清除按压过的键 if (i >= 0) _downKeys.splice(i, 1); diff --git a/dist/hotkeys.min.js b/dist/hotkeys.min.js index 2c483608..45454115 100644 --- a/dist/hotkeys.min.js +++ b/dist/hotkeys.min.js @@ -1,2 +1,2 @@ /*! hotkeys-js v3.2.0 | MIT (c) 2018 kenny wong | http://jaywcjlove.github.io/hotkeys */ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.hotkeys=t()}(this,function(){"use strict";var e="undefined"!=typeof navigator&&0