profile-specific keybindings #10248

Closed
opened 2026-01-31 02:16:20 +00:00 by claunia · 2 comments
Owner

Originally created by @nbros on GitHub (Aug 21, 2020).

Description of the new feature/enhancement

Please allow creating keybindings per profile in addition to the existing global keybindings, so that the profile-specific keybindings only apply to the profile in which they are defined.

For example, I'd like to use Ctrl+D to close cmd.exe or pwsh, but still send the EOT (End of Transmission character) to Ubuntu with WSL.
So that the following would work;

  • Open a cmd tab, type <Ctrl+D> 🡒 the tab closes
  • Open a Ubuntu (WSL) tab, type <Ctrl+D> 🡒 the tab closes (this already works and should keep working)
  • Open a Ubuntu (WSL) tab, type cat<Enter>hello world<Ctrl+D> 🡒 the terminal echoes hello world back and does not close (this already works and should keep working)

Proposed technical implementation details (optional)

It could look something like this:

{
    (...)
    "profiles":
    {
        (...)
        "list":
        [
            {
                // Make changes here to the cmd.exe profile.
                "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
                "name": "Command Prompt",
                "commandline": "cmd.exe",
                "hidden": false,
                // profile-specific keybindings
                "keybindings": [
                  { "command": "closeTab", "keys": "ctrl+d" }
                ]
            },
            (...)
        ]
    },
    (...)
    // global keybindings
    "keybindings":
    [
        (...)
    ]
}
Originally created by @nbros on GitHub (Aug 21, 2020). # Description of the new feature/enhancement Please allow creating keybindings per profile in addition to the existing global keybindings, so that the profile-specific keybindings only apply to the profile in which they are defined. For example, I'd like to use Ctrl+D to close cmd.exe or pwsh, but still send the EOT ([End of Transmission](https://en.wikipedia.org/wiki/End-of-Transmission_character) character) to Ubuntu with WSL. So that the following would work; - Open a cmd tab, type `<Ctrl+D>` 🡒 the tab closes - Open a Ubuntu (WSL) tab, type `<Ctrl+D>` 🡒 the tab closes (this already works and should keep working) - Open a Ubuntu (WSL) tab, type `cat<Enter>hello world<Ctrl+D>` 🡒 the terminal echoes `hello world` back and does **not** close (this already works and should keep working) # Proposed technical implementation details (optional) It could look something like this: ``` { (...) "profiles": { (...) "list": [ { // Make changes here to the cmd.exe profile. "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}", "name": "Command Prompt", "commandline": "cmd.exe", "hidden": false, // profile-specific keybindings "keybindings": [ { "command": "closeTab", "keys": "ctrl+d" } ] }, (...) ] }, (...) // global keybindings "keybindings": [ (...) ] } ```
claunia added the Issue-FeatureResolution-Duplicate labels 2026-01-31 02:16:21 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Aug 21, 2020):

Thanks for the suggestion! This is actually already being tracked by another issue on our repo - please refer to #5790 for more discussion.

/dup #5790

@zadjii-msft commented on GitHub (Aug 21, 2020): Thanks for the suggestion! This is actually already being tracked by another issue on our repo - please refer to #5790 for more discussion. /dup #5790
Author
Owner

@ghost commented on GitHub (Aug 21, 2020):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (Aug 21, 2020): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#10248