提交 c0ca375c 编写于 作者: G Gabriele Cirulli

properly ignore meta keys

上级 57deb5d9
......@@ -35,10 +35,11 @@ KeyboardInputManager.prototype.listen = function () {
};
document.addEventListener("keydown", function (event) {
var modifiers = event.altKey && event.ctrlKey && event.metaKey &&
var modifiers = event.altKey || event.ctrlKey || event.metaKey ||
event.shiftKey;
var mapped = map[event.which];
console.log(event);
if (!modifiers) {
if (mapped !== undefined) {
event.preventDefault();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册