atom-keymap
Advanced tools
Comparing version 6.3.1 to 6.3.2
34
api.json
@@ -6,3 +6,3 @@ { | ||
"filename": "src/keymap-manager.coffee", | ||
"srcUrl": "https://github.com/atom/atom-keymap/blob/v6.3.1/src/keymap-manager.coffee#L66", | ||
"srcUrl": "https://github.com/atom/atom-keymap/blob/v6.3.2/src/keymap-manager.coffee#L66", | ||
"sections": [ | ||
@@ -42,3 +42,3 @@ { | ||
"sectionName": "Class Methods", | ||
"srcUrl": "https://github.com/atom/atom-keymap/blob/v6.3.1/src/keymap-manager.coffee#L83", | ||
"srcUrl": "https://github.com/atom/atom-keymap/blob/v6.3.2/src/keymap-manager.coffee#L83", | ||
"visibility": "Public", | ||
@@ -105,3 +105,3 @@ "summary": "Create a keydown DOM event for testing purposes.", | ||
"sectionName": "Construction and Destruction", | ||
"srcUrl": "https://github.com/atom/atom-keymap/blob/v6.3.1/src/keymap-manager.coffee#L109", | ||
"srcUrl": "https://github.com/atom/atom-keymap/blob/v6.3.2/src/keymap-manager.coffee#L109", | ||
"visibility": "Public", | ||
@@ -130,3 +130,3 @@ "summary": "Create a new KeymapManager.", | ||
"sectionName": "Construction and Destruction", | ||
"srcUrl": "https://github.com/atom/atom-keymap/blob/v6.3.1/src/keymap-manager.coffee#L117", | ||
"srcUrl": "https://github.com/atom/atom-keymap/blob/v6.3.2/src/keymap-manager.coffee#L117", | ||
"visibility": "Public", | ||
@@ -139,3 +139,3 @@ "summary": "Clear all registered key bindings and enqueued keystrokes. For use\nin tests. ", | ||
"sectionName": "Construction and Destruction", | ||
"srcUrl": "https://github.com/atom/atom-keymap/blob/v6.3.1/src/keymap-manager.coffee#L125", | ||
"srcUrl": "https://github.com/atom/atom-keymap/blob/v6.3.2/src/keymap-manager.coffee#L125", | ||
"visibility": "Public", | ||
@@ -148,3 +148,3 @@ "summary": "Unwatch all watched paths. ", | ||
"sectionName": "Event Subscription", | ||
"srcUrl": "https://github.com/atom/atom-keymap/blob/v6.3.1/src/keymap-manager.coffee#L151", | ||
"srcUrl": "https://github.com/atom/atom-keymap/blob/v6.3.2/src/keymap-manager.coffee#L151", | ||
"visibility": "Public", | ||
@@ -199,3 +199,3 @@ "summary": "Invoke the given callback when one or more keystrokes completely\nmatch a key binding.", | ||
"sectionName": "Event Subscription", | ||
"srcUrl": "https://github.com/atom/atom-keymap/blob/v6.3.1/src/keymap-manager.coffee#L167", | ||
"srcUrl": "https://github.com/atom/atom-keymap/blob/v6.3.2/src/keymap-manager.coffee#L167", | ||
"visibility": "Public", | ||
@@ -250,3 +250,3 @@ "summary": "Invoke the given callback when one or more keystrokes partially\nmatch a binding.", | ||
"sectionName": "Event Subscription", | ||
"srcUrl": "https://github.com/atom/atom-keymap/blob/v6.3.1/src/keymap-manager.coffee#L181", | ||
"srcUrl": "https://github.com/atom/atom-keymap/blob/v6.3.2/src/keymap-manager.coffee#L181", | ||
"visibility": "Public", | ||
@@ -295,3 +295,3 @@ "summary": "Invoke the given callback when one or more keystrokes fail to match\nany bindings.", | ||
"sectionName": "Event Subscription", | ||
"srcUrl": "https://github.com/atom/atom-keymap/blob/v6.3.1/src/keymap-manager.coffee#L212", | ||
"srcUrl": "https://github.com/atom/atom-keymap/blob/v6.3.2/src/keymap-manager.coffee#L212", | ||
"visibility": "Public", | ||
@@ -340,3 +340,3 @@ "summary": "Invoke the given callback when a keymap file not able to be loaded.", | ||
"sectionName": "Adding and Removing Bindings", | ||
"srcUrl": "https://github.com/atom/atom-keymap/blob/v6.3.1/src/keymap-manager.coffee#L227", | ||
"srcUrl": "https://github.com/atom/atom-keymap/blob/v6.3.2/src/keymap-manager.coffee#L227", | ||
"visibility": "Public", | ||
@@ -369,3 +369,3 @@ "summary": "Add sets of key bindings grouped by CSS selector.", | ||
"sectionName": "Accessing Bindings", | ||
"srcUrl": "https://github.com/atom/atom-keymap/blob/v6.3.1/src/keymap-manager.coffee#L266", | ||
"srcUrl": "https://github.com/atom/atom-keymap/blob/v6.3.2/src/keymap-manager.coffee#L266", | ||
"visibility": "Public", | ||
@@ -384,3 +384,3 @@ "summary": "Get all current key bindings.", | ||
"sectionName": "Accessing Bindings", | ||
"srcUrl": "https://github.com/atom/atom-keymap/blob/v6.3.1/src/keymap-manager.coffee#L281", | ||
"srcUrl": "https://github.com/atom/atom-keymap/blob/v6.3.2/src/keymap-manager.coffee#L281", | ||
"visibility": "Public", | ||
@@ -427,3 +427,3 @@ "summary": "Get the key bindings for a given command and optional target.", | ||
"sectionName": "Managing Keymap Files", | ||
"srcUrl": "https://github.com/atom/atom-keymap/blob/v6.3.1/src/keymap-manager.coffee#L318", | ||
"srcUrl": "https://github.com/atom/atom-keymap/blob/v6.3.2/src/keymap-manager.coffee#L318", | ||
"visibility": "Public", | ||
@@ -464,3 +464,3 @@ "summary": "Load the key bindings from the given path.", | ||
"sectionName": "Managing Keymap Files", | ||
"srcUrl": "https://github.com/atom/atom-keymap/blob/v6.3.1/src/keymap-manager.coffee#L341", | ||
"srcUrl": "https://github.com/atom/atom-keymap/blob/v6.3.2/src/keymap-manager.coffee#L341", | ||
"visibility": "Public", | ||
@@ -495,3 +495,3 @@ "summary": "Cause the keymap to reload the key bindings file at the given path\nwhenever it changes.", | ||
"sectionName": "Managing Keyboard Events", | ||
"srcUrl": "https://github.com/atom/atom-keymap/blob/v6.3.1/src/keymap-manager.coffee#L413", | ||
"srcUrl": "https://github.com/atom/atom-keymap/blob/v6.3.2/src/keymap-manager.coffee#L413", | ||
"visibility": "Public", | ||
@@ -512,3 +512,3 @@ "summary": "Dispatch a custom event associated with the matching key binding for\nthe given `KeyboardEvent` if one can be found.", | ||
"sectionName": "Managing Keyboard Events", | ||
"srcUrl": "https://github.com/atom/atom-keymap/blob/v6.3.1/src/keymap-manager.coffee#L616", | ||
"srcUrl": "https://github.com/atom/atom-keymap/blob/v6.3.2/src/keymap-manager.coffee#L625", | ||
"visibility": "Public", | ||
@@ -535,3 +535,3 @@ "summary": "Translate a keydown event to a keystroke string.", | ||
"sectionName": "Managing Keyboard Events", | ||
"srcUrl": "https://github.com/atom/atom-keymap/blob/v6.3.1/src/keymap-manager.coffee#L623", | ||
"srcUrl": "https://github.com/atom/atom-keymap/blob/v6.3.2/src/keymap-manager.coffee#L632", | ||
"visibility": "Public", | ||
@@ -538,0 +538,0 @@ "summary": "Get the number of milliseconds allowed before pending states caused\nby partial matches of multi-keystroke bindings are terminated.", |
@@ -325,3 +325,3 @@ (function() { | ||
KeymapManager.prototype.handleKeyboardEvent = function(event, _arg) { | ||
var allPartialMatchesContainKeyupRemainder, currentTarget, disabledBindings, dispatchedExactMatch, enableTimeout, eventHandled, exactMatchCandidate, exactMatchCandidates, exactMatches, hasPartialMatches, keydownExactMatchCandidates, keystroke, keystrokes, partialMatch, partialMatchCandidates, partialMatches, replay, shouldUsePartialMatches, target, _i, _j, _len, _len1, _ref2, _ref3; | ||
var allPartialMatchesContainKeyupRemainder, binding, currentTarget, disabledBindings, dispatchedExactMatch, enableTimeout, eventHandled, exactMatchCandidate, exactMatchCandidates, exactMatches, hasPartialMatches, keydownExactMatchCandidates, keystroke, keystrokes, liveMatches, partialMatch, partialMatchCandidates, partialMatches, replay, shouldUsePartialMatches, target, _i, _j, _k, _len, _len1, _len2, _ref2, _ref3, _ref4; | ||
_ref2 = _arg != null ? _arg : {}, replay = _ref2.replay, disabledBindings = _ref2.disabledBindings; | ||
@@ -343,2 +343,12 @@ keystroke = this.keystrokeForKeyboardEvent(event); | ||
partialMatches = this.findPartialMatches(partialMatchCandidates, target); | ||
if (this.pendingPartialMatches != null) { | ||
liveMatches = new Set(partialMatches.concat(exactMatchCandidates)); | ||
_ref4 = this.pendingPartialMatches; | ||
for (_i = 0, _len = _ref4.length; _i < _len; _i++) { | ||
binding = _ref4[_i]; | ||
if (!liveMatches.has(binding)) { | ||
this.bindingsToDisable.push(binding); | ||
} | ||
} | ||
} | ||
hasPartialMatches = partialMatches.length > 0; | ||
@@ -351,4 +361,4 @@ shouldUsePartialMatches = hasPartialMatches; | ||
exactMatches = this.findExactMatches(exactMatchCandidates, currentTarget); | ||
for (_i = 0, _len = exactMatches.length; _i < _len; _i++) { | ||
exactMatchCandidate = exactMatches[_i]; | ||
for (_j = 0, _len1 = exactMatches.length; _j < _len1; _j++) { | ||
exactMatchCandidate = exactMatches[_j]; | ||
if (exactMatchCandidate.command === 'native!') { | ||
@@ -369,4 +379,4 @@ shouldUsePartialMatches = false; | ||
allPartialMatchesContainKeyupRemainder = true; | ||
for (_j = 0, _len1 = partialMatches.length; _j < _len1; _j++) { | ||
partialMatch = partialMatches[_j]; | ||
for (_k = 0, _len2 = partialMatches.length; _k < _len2; _k++) { | ||
partialMatch = partialMatches[_k]; | ||
if (keydownExactMatchCandidates.indexOf(partialMatch) < 0) { | ||
@@ -373,0 +383,0 @@ allPartialMatchesContainKeyupRemainder = false; |
{ | ||
"name": "atom-keymap", | ||
"version": "6.3.1", | ||
"version": "6.3.2", | ||
"description": "Atom's DOM-aware keymap module", | ||
@@ -5,0 +5,0 @@ "main": "./lib/keymap-manager", |
68518
1667