-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Support remapping keybindings #537
Comments
Soontm we'll support re-mapping keybindings, so this won't be an issue :) |
@zadjii-msft I'm still building this so apologies if it already exists, but could you ensure there's a way to export/import settings like these as well? I carry around a dot files repository as I'm sure many others do and I'd love to be able to setup terminator bindings for this in new VM's quickly/easily. |
For now, if you want to mess with some of the keybindings, check out the "TerminalApp" project and go to the |
Could the shortcut default to ctrl-d to keep the same user experience as Linux terminal? |
It doesn't fix the issue entirely obviously, but
|
Did not experience such trouble in Linux terminal with vim. ctrl-d is sent to current "app" in terminal, rather than a "hook" or intercepted by the terminal itself. Looks like it is cmd and powershell should be changed. Then agree ctrl-f4 is reasonable for Terminal to intercept. |
The ability to set your own custom keybindings in the |
This is now the official thread for "Support remapping keybindings" |
and "reevaluate the defaults". |
I'm going to add some context here from what I had in our internal work tracker: Keybindings should be serialized in the following format: [
{ "keys": ["f2"], "command": "next_bookmark" },
{ "keys": ["shift+f2"], "command": "prev_bookmark" },
{ "keys": ["ctrl+f2"], "command": "toggle_bookmark" },
{ "keys": ["ctrl+shift+f2"], "command": "clear_bookmarks" },
] Where each keybinding has a plaintext string that encodes the keychord, and the name of the command that it is mapped to. [
{ "keys": ["ctrl+t"], "command": "newTab" },
{ "keys": ["ctrl+tab"], "command": "nextTab" },
{ "keys": ["ctrl+shift+tab"], "command": "prevTab" },
] As an example VKeys that map to letters should be lowercase in the settings we save, but we shouldn't care if they're upper or lower when we read the file. Additionally, all of the "actions" will need simple strings describing the action that we can use as the value for "command". I'd store the keychord as an array with a single value for the time being. should we later want to implement keybindings with multiple "notes" in the chord, (e.g ["ctrl+k", "ctrl+c"] would be the default for VS to comment a line) then we'll be happy the keybindings are already an array. |
Please can certain key combos be left unmapped by default so the new terminal functions the same as CMD and WSL do so that commands such as Ctrl+W are passed as input to the interpreter rather than picked up by the application then I will be able to search in nano again without switching. |
So to be fair, conhost.exe doesn't have all that many keybindings by default (Ctrl+(shift+)C/V for copy/paste, Ctrl+M for mark mode, that's all I can even think of), while Windows Terminal is going to need a decent number of keybindings. There are just more things that the terminal does. If we switch the binding for close window to Ctrl+Shift+W, then we'll undoubtably get still get issues saying "Ctrl+Shift+W for close window by default impedes my workflow, please change it to <blah>". There's no best set of keybindings, except for allowing quick changing with the settings. |
Maybe it would be better to not map anything by default then at least there can be no conflicts. Or the first time it is pressed a popup could appear asking whether you would like the command passed to the remote machine or interpreted locally with a checkbox to remember the selection. |
Hello. I'm using MidnightCommander/MCEdit inside WSL and have no problems. But if I run WSL inside the Terminal, some annoying things happen:
Command line for WSL: |
Bash uses
Ctrl-W
as delete word, and bash applications overload the use ofCtrl-W
(e.g. in vim,Ctrl-W + W
is used to cycle through window splits). UsingCtrl-W
for close tab breaks those functionalities.The text was updated successfully, but these errors were encountered: