You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Bundled prefixed keys bindings delay even if 'unset!' by user keymap #78
This affects keybindings like cmd-k, where cmd-k is the prefix of many keybindings that come bundled with Atom. Hitting cmd-k has a delay even if every single one of these keybindings are unset! in the user key map.
Doing some debugging, in the dev tools. What appears to be happening is this...
Putting a breakpoint on line 440 of keymap-manager.js (where partial matches are found)...
... and hitting cmd-k to hit our breakpoint, we see that the partialMatchCandidates array being filtered will iterate over the bundled keymap bindings BEFORE the user bindings. The console in the screenshot above, shows the source of all the keybindings of partialMatchCandidates. As you can all the bindings from /Application/Atom.app/* are at the top, while the user bindings from /Users/* are on the bottom. This ordering allows line 444 of keymap-manager.js to be reached, which incorrectly identifies it as a partialMatch even though a user specified keymap binding has it unset!.
A naive fix that simply reverses the order of partialMatchCandidates (process bundled bindings AFTER user bindings)...
...correctly yields an empty partialMatches as all user bindings are added to the ignoreKeystrokes set and all the bundled key bindings are then ignored.
@stmichael mentioned this behavior on a different issue #49
Activity
peterwmwong commentedon Apr 22, 2015
Simply flipping the order is probably not the correct fix. Maybe first adding all the
unset!bindings to theignoreKeystrokesset, before filtering?ilyashubin commentedon Jun 30, 2015
+1. Would be nice to have a way to remove this delay somehow
meleyal commentedon Jul 2, 2015
+1
birbird commentedon Jul 20, 2015
+1
🐛 Add `unset!` keymaps to `ignoreKeystrokes` set before checking for …
Merge pull request #95 from tmunro/master