question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItĀ collects links to all the places you might be looking at while hunting down a tough bug.

And, if youā€™re still stuck at the end, weā€™re happy to hop on a call to see how we can help out.

Dispatch a chord keybinding again if it is not followed by a second part

See original GitHub issue

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version: 1.63.2
  • OS Version: MacOS Big Sur 11.6

Steps to Reproduce:

  1. Type the default Cmd+K shortcut to clear the terminal => VS Code successfully catches the key down event but says Cmd+K is not a shortcut
  2. In the keyboard shortcut settings, change the ā€œSourceā€ to ā€œUserā€ by changing the when condition to the same value than it already was set to.
  3. Type Cmd+K => terminal successfully cleared
  4. Click on ā€œReset key bindingā€ => Doesnā€™t change anything except the ā€œSourceā€ column (because the when condition never changed), but it breaks the keyboard binding.

Demo: https://youtu.be/u6WXsDoErmw

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
alexdimacommented, Jan 6, 2022
  1. Even if this extension defined a CtrlK-CtrlR binding, and even if there is no ā€œwhen conditionā€, that should not disable the Ctrl+K terminalFocused binding, right?

The keybinding rules defined by the extension do not have a when context. That means that they will be active in all contexts, even when the terminal has focus. This as designed. Please see keybindings documentation.

  1. Considering this extension seems to mess bindings up, it seems shady that it does break the Ctrl+K ā€œclear terminalā€ binding when itā€™s in ā€œDefaultā€ mode but doesnā€™t break it when itā€™s in ā€œUserā€ mode as shown in the video in my initial post.

Can you please provide clear steps that reproduce a problem but which donā€™t involve installing the problematic extension?

0reactions
8BitRobotcommented, Jan 27, 2022

Hereā€™s an alternative idea: what if VS Code provides the option to create keybindings of multiple keys and one modifier? As in, the user can hold down cmd while they press k and g; if they let go of cmd it registers the cmd+k, and if they add a g while still holding down cmd itā€™ll register the whole shortcut cmd+k cmd+g?

Iā€™ve stumbled into this issue myself by trying to create a keymap that resembles the IPA keyboard shortcuts here. In this website, it binds alt+a to one character, alt+a+a to another, and so on. The number of times you press the second character while still holding down alt is what determines the character being typed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Visual Studio Code Key Bindings
Here you will find the complete list of key bindings for Visual Studio Code and how to change them.
Read more >
Ctrl-C keybinding is having no effect
It depends on where and when you evaluate this code. Well actually, the important thing - that the code that is evaluated after...
Read more >
Keybinds - Rust Wiki
It is worth noting that a multi-key bind is not a separate bind from the keys that it uses. You cannot bind one...
Read more >
Sacha Chua's Emacs configuration
(Although I changed my mind about the menu - I want that again.) ... (setq kill-ring-max 1000) ... MODIFICATION: Do not define the...
Read more >
Mastering Key Bindings in Emacs
Undefined is self-explanatory: it does no operation when it is invoked. Prefix keys are keys like C-x and C-c . They are make...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found