-
-
Notifications
You must be signed in to change notification settings - Fork 413
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3bbefc8
commit 9d6e2b9
Showing
7 changed files
with
24 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/*! | ||
* hotkeys-js v3.6.5 | ||
* hotkeys-js v3.6.6 | ||
* A simple micro-library for defining and dispatching keyboard shortcuts. It has no dependencies. | ||
* | ||
* Copyright (c) 2019 kenny wong <[email protected]> | ||
|
@@ -293,9 +293,12 @@ function eventHandler(event, handler, scope) { | |
|
||
function dispatch(event) { | ||
var asterisk = _handlers['*']; | ||
var key = event.keyCode || event.which || event.charCode; // 搜集绑定的键 | ||
var key = event.keyCode || event.which || event.charCode; // Collect bound keys | ||
// If an Input Method Editor is processing key input and the event is keydown, return 229. | ||
// https://stackoverflow.com/questions/25043934/is-it-ok-to-ignore-keydown-events-with-keycode-229 | ||
// http://lists.w3.org/Archives/Public/www-dom/2010JulSep/att-0182/keyCode-spec.html | ||
|
||
if (_downKeys.indexOf(key) === -1) _downKeys.push(key); // Gecko(Firefox)的command键值224,在Webkit(Chrome)中保持一致 | ||
if (_downKeys.indexOf(key) === -1 && key !== 229) _downKeys.push(key); // Gecko(Firefox)的command键值224,在Webkit(Chrome)中保持一致 | ||
// Webkit左右command键值不一样 | ||
|
||
if (key === 93 || key === 224) key = 91; | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/*! | ||
* hotkeys-js v3.6.5 | ||
* hotkeys-js v3.6.6 | ||
* A simple micro-library for defining and dispatching keyboard shortcuts. It has no dependencies. | ||
* | ||
* Copyright (c) 2019 kenny wong <[email protected]> | ||
|
@@ -291,9 +291,12 @@ function eventHandler(event, handler, scope) { | |
|
||
function dispatch(event) { | ||
var asterisk = _handlers['*']; | ||
var key = event.keyCode || event.which || event.charCode; // 搜集绑定的键 | ||
var key = event.keyCode || event.which || event.charCode; // Collect bound keys | ||
// If an Input Method Editor is processing key input and the event is keydown, return 229. | ||
// https://stackoverflow.com/questions/25043934/is-it-ok-to-ignore-keydown-events-with-keycode-229 | ||
// http://lists.w3.org/Archives/Public/www-dom/2010JulSep/att-0182/keyCode-spec.html | ||
|
||
if (_downKeys.indexOf(key) === -1) _downKeys.push(key); // Gecko(Firefox)的command键值224,在Webkit(Chrome)中保持一致 | ||
if (_downKeys.indexOf(key) === -1 && key !== 229) _downKeys.push(key); // Gecko(Firefox)的command键值224,在Webkit(Chrome)中保持一致 | ||
// Webkit左右command键值不一样 | ||
|
||
if (key === 93 || key === 224) key = 91; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/*! | ||
* hotkeys-js v3.6.5 | ||
* hotkeys-js v3.6.6 | ||
* A simple micro-library for defining and dispatching keyboard shortcuts. It has no dependencies. | ||
* | ||
* Copyright (c) 2019 kenny wong <[email protected]> | ||
|
@@ -297,9 +297,12 @@ | |
|
||
function dispatch(event) { | ||
var asterisk = _handlers['*']; | ||
var key = event.keyCode || event.which || event.charCode; // 搜集绑定的键 | ||
var key = event.keyCode || event.which || event.charCode; // Collect bound keys | ||
// If an Input Method Editor is processing key input and the event is keydown, return 229. | ||
// https://stackoverflow.com/questions/25043934/is-it-ok-to-ignore-keydown-events-with-keycode-229 | ||
// http://lists.w3.org/Archives/Public/www-dom/2010JulSep/att-0182/keyCode-spec.html | ||
|
||
if (_downKeys.indexOf(key) === -1) _downKeys.push(key); // Gecko(Firefox)的command键值224,在Webkit(Chrome)中保持一致 | ||
if (_downKeys.indexOf(key) === -1 && key !== 229) _downKeys.push(key); // Gecko(Firefox)的command键值224,在Webkit(Chrome)中保持一致 | ||
// Webkit左右command键值不一样 | ||
|
||
if (key === 93 || key === 224) key = 91; | ||
|
Oops, something went wrong.