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
2 Asked on September 2, 2020 by hack-r
1 Asked on September 1, 2020 by neuser
1 Asked on September 1, 2020 by user2534761
1 Asked on August 29, 2020 by prateek
6 Asked on August 24, 2020 by pietro
1 Asked on August 21, 2020 by vlada
2 Asked on August 20, 2020 by fadi
0 Asked on August 17, 2020 by mirza
charts microsoft excel microsoft excel 2010 microsoft excel 2016 worksheet function
1 Asked on August 15, 2020 by arvendra-dubey
3 Asked on August 15, 2020 by prometheus
1 Asked on August 8, 2020 by arjun
1 Asked on August 7, 2020 by adam-przedniczek
Get help from others!
Recent Answers
Recent Questions
© 2023 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP