From 454aa3b656cd9da298aa21a1b227d1ca04660a4e Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Mon, 21 Nov 2016 08:39:58 -0700 Subject: [PATCH] Restore ability to bind dead keys on macOS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A previous fix for IME input bails out of keystroke handling if the legacy keyCode property is 229. Unfortunately, this is also the value of keyCode for keystrokes like alt-u, which don’t pop up the IME menu. These keystrokes should be handled normally. It seems like the best way to distinguish these keys from the IME case is that their key value is ‘Dead’. --- src/keymap-manager.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/keymap-manager.coffee b/src/keymap-manager.coffee index 8b5a9ca..c332ba1 100644 --- a/src/keymap-manager.coffee +++ b/src/keymap-manager.coffee @@ -492,7 +492,7 @@ class KeymapManager # 229, which is the "composition key code". This API is deprecated, but this # is the most simple and reliable way we found to ignore keystrokes that are # part of IME compositions. - if event.keyCode is 229 + if event.keyCode is 229 and event.key isnt 'Dead' return # keystroke is the atom keybind syntax, e.g. 'ctrl-a'