Skip to content

Commit

Permalink
Add exclusive option for sequences (as default)
Browse files Browse the repository at this point in the history
As per this bug report: #68
  • Loading branch information
dmauro committed Aug 16, 2015
1 parent a9d69f3 commit 326c417
Show file tree
Hide file tree
Showing 4 changed files with 1,001 additions and 954 deletions.
7 changes: 6 additions & 1 deletion keypress.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,11 @@ class keypress.Listener
else
match = false
break
return combo if match
if match
debugger
if combo.is_exclusive
@_sequence = []
return combo
return false

# Catching Combos
Expand Down Expand Up @@ -537,6 +541,7 @@ class keypress.Listener
keys : keys
on_keydown : callback
is_sequence : true
is_exclusive : true
)

register_combo: (combo_dictionary) ->
Expand Down
Loading

0 comments on commit 326c417

Please sign in to comment.