From 6508d05e5f0ccf747d114de59867567c37320718 Mon Sep 17 00:00:00 2001 From: Matheus Fernandes Date: Fri, 2 Dec 2016 11:22:25 -0200 Subject: [PATCH] Fix a regression introduced by #1058 Such regression broke the character composition/paste on macOS --- app/accelerators.js | 2 -- lib/hterm.js | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/app/accelerators.js b/app/accelerators.js index 7e0a53ed..ddd76ae1 100644 --- a/app/accelerators.js +++ b/app/accelerators.js @@ -102,7 +102,6 @@ for (const key in allAccelerators) { // decides if a keybard event is a Hyper Accelerator function isAccelerator(e) { let keys = []; - console.log(e); if (!e.ctrlKey && !e.metaKey && !e.altKey) { // all accelerators needs Ctrl or Cmd or Alt return false; @@ -130,7 +129,6 @@ function isAccelerator(e) { } keys = keys.join('+'); - return cache.includes(keys); } diff --git a/lib/hterm.js b/lib/hterm.js index af5934e3..d9f202c8 100644 --- a/lib/hterm.js +++ b/lib/hterm.js @@ -166,7 +166,7 @@ hterm.Keyboard.prototype.onKeyDown_ = function (e) { e.preventDefault(); } - if (isAccelerator(e)) { + if (e.altKey || e.metaKey || isAccelerator(e)) { // hterm shouldn't consume a hyper accelerator return; }