Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit 454aa3b

Browse files
author
Nathan Sobo
committed
Restore ability to bind dead keys on macOS
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’.
1 parent 8181625 commit 454aa3b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/keymap-manager.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ class KeymapManager
492492
# 229, which is the "composition key code". This API is deprecated, but this
493493
# is the most simple and reliable way we found to ignore keystrokes that are
494494
# part of IME compositions.
495-
if event.keyCode is 229
495+
if event.keyCode is 229 and event.key isnt 'Dead'
496496
return
497497

498498
# keystroke is the atom keybind syntax, e.g. 'ctrl-a'

0 commit comments

Comments
 (0)