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

Commit bb18734

Browse files
committed
test
1 parent 03a891e commit bb18734

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

spec/helpers/keymaps/mac-undefined-keys.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"KeyF": {
33
"unmodified": "f",
44
"withShift": "F",
5-
"withAltGraph": "",
5+
"withAltGraph": "f",
66
"withAltGraphShift": "Ë"
77
}
88
}

src/helpers.coffee

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ exports.keystrokeForKeyboardEvent = (event, customKeystrokeResolvers) ->
139139

140140
currentLayout = KeyboardLayout.getCurrentKeyboardLayout()
141141

142-
if key is 'Dead'
142+
if not key or key is 'Dead'
143143
if process.platform is 'darwin' and characters = KeyboardLayout.getCurrentKeymap()?[event.code]
144144
if altKey and shiftKey and characters.withAltGraphShift?
145145
key = characters.withAltGraphShift
@@ -150,10 +150,6 @@ exports.keystrokeForKeyboardEvent = (event, customKeystrokeResolvers) ->
150150
else if characters.unmodified?
151151
key = characters.unmodified
152152

153-
if key is undefined
154-
if process.platform is 'darwin'
155-
key = KeyboardLayout.getCurrentKeymap()?[event.code]
156-
157153
if NUMPAD_KEY_NAMES_BY_KEYBOARD_EVENT_CODE[code]? and event.getModifierState('NumLock')
158154
key = NUMPAD_KEY_NAMES_BY_KEYBOARD_EVENT_CODE[code]
159155

0 commit comments

Comments
 (0)