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:
Corey Johnson & Nathan Sobo
2012-01-10 17:40:08 -08:00
parent 11866b90fe
commit 6a25dc00c5
2 changed files with 38 additions and 1 deletions

View File

@@ -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]