|
|
|
@ -167,8 +167,11 @@ function dispatch(event) {
|
|
|
|
|
const asterisk = _handlers['*'];
|
|
|
|
|
let key = event.keyCode || event.which || event.charCode;
|
|
|
|
|
|
|
|
|
|
// 搜集绑定的键
|
|
|
|
|
if (_downKeys.indexOf(key) === -1) _downKeys.push(key);
|
|
|
|
|
// 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 && key !== 229) _downKeys.push(key);
|
|
|
|
|
|
|
|
|
|
// Gecko(Firefox)的command键值224,在Webkit(Chrome)中保持一致
|
|
|
|
|
// Webkit左右command键值不一样
|
|
|
|
|