mirror of
https://github.com/atom/atom.git
synced 2026-02-09 06:05:11 -05:00
Add BindingSetSpec and change keybinding pattern separator.
Also, we allow chorded bindings to be surrounded in <…> in preparation of key sequences.
This commit is contained in:
@@ -30,7 +30,10 @@ class BindingSet
|
||||
pattern.which == event.which
|
||||
|
||||
parseKeyPattern: (pattern) ->
|
||||
[modifiers..., key] = pattern.split '+'
|
||||
pattern = pattern.replace(/<|>/g, "")
|
||||
[modifiers..., key] = pattern.split '-'
|
||||
|
||||
modifiers.push 'shift' if key == key.toUpperCase() and key.toUpperCase() != key.toLowerCase()
|
||||
|
||||
if @namedKeys[key]
|
||||
charCode = @namedKeys[key]
|
||||
|
||||
Reference in New Issue
Block a user