mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
Make sure shift is not double added
This commit is contained in:
@@ -23,10 +23,9 @@ class KeyBinding
|
||||
modifiers.sort()
|
||||
key = _.last(keys)
|
||||
|
||||
# Add the shift modifier if the key is an uppercased alpha char
|
||||
if /^[A-Z]$/.test(key) or 'shift' in modifiers
|
||||
modifiers.push 'shift' unless 'shift' in modifiers
|
||||
key = key.toUpperCase()
|
||||
modifiers.push 'shift' if /^[A-Z]$/.test(key) and 'shift' not in modifiers
|
||||
key = key.toUpperCase() if /^[a-z]$/.test(key) and 'shift' in modifiers
|
||||
|
||||
[modifiers..., key].join('-')
|
||||
|
||||
normalizedKeystroke.join(' ')
|
||||
|
||||
Reference in New Issue
Block a user