Super User Asked on January 3, 2022
I would like to assign to one of the new windows terminal profiles a keybinding, as in the following ("keys": "alt+shift+d"
):
{
// Connects to a remote machine using SSH
"guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
"name": "SSH My Local Server",
"tabTitle": "Local Server",
"commandline": "ssh [email protected]",
"keys": "alt+shift+d"
},
what is the way to do this?
There is no keys
property in Profile settings in Windows Terminal. However, you can create custom key bindings (keyboard shortcuts) inside Windows Terminal that give you control of how you interact with the terminal using your keyboard.
The altshift+d shortcut is (by default) dedicated to open a new pane - as you can see in the corresponding part of settings.json
:
// Add custom keybindings to this array.
// To unbind a key combination from your defaults.json, set the command to "unbound".
// To learn more about keybindings, visit https://aka.ms/terminal-keybindings
"keybindings":
[
// Copy and paste are bound to Ctrl+Shift+C and Ctrl+Shift+V in your defaults.json.
// These two lines additionally bind them to Ctrl+C and Ctrl+V.
// To learn more about selection, visit https://aka.ms/terminal-selection
{ "command": {"action": "copy", "singleLine": false }, "keys": "ctrl+c" },
{ "command": "paste", "keys": "ctrl+v" },
// Press Ctrl+Shift+F to open the search box
{ "command": "find", "keys": "ctrl+shift+f" },
// Press Alt+Shift+D to open a new pane.
// - "split": "auto" makes this pane open in the direction that provides the most surface area.
// - "splitMode": "duplicate" makes the new pane use the focused pane's profile.
// To learn more about panes, visit https://aka.ms/terminal-panes
{ "command": { "action": "splitPane", "split": "auto", "splitMode": "duplicate" }, "keys": "alt+shift+d" }
]
You can delete this keyboard shortcut here and add appropriate part from the following default binding schema, for instance (if your "SSH My Local Server"
is the 3rd entry in the profile list)
{ "command": { "action": "newTab", "index": 2 }, "keys": "alt+shift+d" },
Answered by JosefZ on January 3, 2022
1 Asked on December 13, 2021 by sebastian-schlicht
4 Asked on December 13, 2021 by user1001972
2 Asked on December 13, 2021 by shayan
1 Asked on December 13, 2021 by yuvaraj-raja
2 Asked on December 13, 2021 by abhisek
1 Asked on December 13, 2021 by brian-silva
1 Asked on December 13, 2021 by andrew-morton
2 Asked on December 13, 2021 by creative-magic
1 Asked on December 13, 2021 by fran496
1 Asked on December 13, 2021 by kviiten
2 Asked on December 13, 2021 by booga-roo
0 Asked on December 13, 2021 by timvk
2 Asked on December 11, 2021 by h-javed
5 Asked on December 11, 2021
1 Asked on December 11, 2021
devuan extended desktop kde plasma 5 miracast multiple desktop
3 Asked on December 11, 2021
1 Asked on December 11, 2021 by markov
Get help from others!
Recent Questions
Recent Answers
© 2023 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP, SolveDir