-
Notifications
You must be signed in to change notification settings - Fork 30.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[terminal] (⌘K) was pressed. Waiting for second key of chord... #7240
Comments
I don't think ⌘K would be a good default because it would conflict with the chord keybindings. I'm going to close this off as a duplicate of #6603 which will allow you to set your own keybinding for clearing the terminal. |
@Tyriar I'm so used to the The I realise I may not be alone in this, so I have a suggestion:
This way, there won't be a conflict by default, but the user can opt to lose chord keybindings when in the context of the terminal, in favour of using the well-recognised shortcut. Would you mind to reopen the issue to make it easier to find, and to continue the discussion? |
Thanks @Merott for chiming in. I use ⌘K very heavily too. I would love to take this discussion to a point where it might be possible to detach the default bindings whenever the terminal is in focus (except perhaps one shortcut to focus back on the workbench) and only retain the platform-level shortcuts that deal specifically with the terminal. I'm not sure if that's possible, but I suppose that would be most ideal. |
I can definitely sympathize, I'm not going to be happy unless I copy and paste in the terminal using ctrl+shift+c and ctrl+shift+v for example. I'm not sure how the chord keybindings work exactly and what can override them, but there are conditions you can attach to keybindings, for example:
A You can also unbind keybindings as of v1.2.0 which is another possible remedy. So it's not possible right now to bind anything to ⌘K? |
@prashaantt - I came to Github the log this issue myself, but I found this one 👍 - It shouldn't be necessary to disable all keybindings in terminal. In fact, I wouldn't want that. This can really be simplified to changing the behaviour of the {
"key": "cmd+k",
"command": "terminal.action.clear", // does not exist today
"when": "terminalFocus" // does not exist today
} With the updated Thanks @Tyriar for reopening the issue. And to answer your question, it seems that as of right now, |
Upstream issue: xtermjs/xterm.js#118 |
Any of idea of what it would take to implement a "terminalFocus" when condition? Would love to contribute to get this issue solved. I hit cmd+k quite a lot out of habit! |
@jensvdh xtermjs/xterm.js#118 will probably fix the issue without requiring a terminalFocus event, I'm hoping to get this done for July. |
Closing in favor of #6603 |
Steps to Reproduce:
⌘K is a recognised shortcut for clearing out the terminal on the Mac, but here it also conflicts with Code's other key bindings.
The text was updated successfully, but these errors were encountered: