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

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben3eeE committed Jun 15, 2019
1 parent 03a891e commit bb18734
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion spec/helpers/keymaps/mac-undefined-keys.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"KeyF": {
"unmodified": "f",
"withShift": "F",
"withAltGraph": "",
"withAltGraph": "f",
"withAltGraphShift": "Ë"
}
}
6 changes: 1 addition & 5 deletions src/helpers.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ exports.keystrokeForKeyboardEvent = (event, customKeystrokeResolvers) ->

currentLayout = KeyboardLayout.getCurrentKeyboardLayout()

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

if key is undefined
if process.platform is 'darwin'
key = KeyboardLayout.getCurrentKeymap()?[event.code]

if NUMPAD_KEY_NAMES_BY_KEYBOARD_EVENT_CODE[code]? and event.getModifierState('NumLock')
key = NUMPAD_KEY_NAMES_BY_KEYBOARD_EVENT_CODE[code]

Expand Down

0 comments on commit bb18734

Please sign in to comment.