Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Partial key mapping can get wrongly resolved #200

Closed
madakk opened this issue Dec 22, 2016 · 1 comment
Closed

Partial key mapping can get wrongly resolved #200

madakk opened this issue Dec 22, 2016 · 1 comment

Comments

@madakk
Copy link

madakk commented Dec 22, 2016

I don't understand the specifics of the keymap manager enough to directly point at the issue, but it has to do with partial key mappings and overrides. It looks like in some circumstances, the wrong binding can be resolved either as the timeout or when hitting multiple keys.

To reproduce, add the following two (random) commands to your keymap:

'body':
  'ctrl-tab': 'status-bar:toggle'
  'ctrl-tab ^ctrl': 'editor:log-cursor-scope'

Now, hold down Ctrl and press Tab once, keeping Ctrl held. After a second, your tab will switch to your recent tab. If you have the key binding resolver visible, you can see that the native mapping to pane:show-next-recently-used-item gets called. Releasing Ctrl at this point doesn't cause the log, but I'm assuming that's because the key combination already timed-out.

Now, hold down Ctrl and press Tab twice. The second tab causes the status bar to toggle and the tab to switch to the next recent tab, somehow both key bindings get called. In this scenario the time-out never happens, and whenever you release Ctrl the log is shown as expected.

See additional discussion here.

@nathansobo
Copy link
Contributor

This is a bug in the current keymap implementation and should be fixed in Atom 1.14 via #156. 1.14 will be released to beta channel in early January, but you could build from source if this is really blocking your workflow.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants