Using different shortcuts / keybinds / keymaps set in different profiles #22951

Closed
opened 2026-01-31 08:28:12 +00:00 by claunia · 2 comments
Owner

Originally created by @repackage8650 on GitHub (Feb 20, 2025).

Description of the new feature

I have seen that there are demands for switching shrotcuts / keybinds / keymaps sets in #9301 and #15277, which I think this is because people are used to different shrotcuts / keybinds / keymaps when working in different profiles, so that I think it would be an effective solution if the shrotcuts / keybinds / keymaps set can be specified in the profile.

Proposed technical implementation details

A simple and specific idea is as follows: move the current actions options to the default profile as default actions, and allow each profile to override the default actions, such as overriding unnecessary actions to null or adding keybinds for new actions.
The new settings.json will look like this:

{
    ...,
    "actions": 
    [
        {
             "command": "ACommandName",
             "id": "User.a" 
        },
        {
             "command": "BCommandName",
             "id": "User.b" 
        },
        {
             "command": "CCommandName",
             "id": "User.c" 
        },
        {
             "command": "DCommandName",
             "id": "User.d" 
        },
        ...
    ],
    ...,
    "profiles": 
    {
        "defaults": 
        {
            ...,
            "keybinds": 
            [
                {
                    "id": "User.a",
                    "keys": 
                    [
                        "ctrl+a"
                    ]
                },
                ...
            ]
        },
        "list": 
        [
            {
                "commandline": "%ProgramFiles%\\Neovim\\bin\\nvim.exe",
                "guid": "{00000000-0000-0000-0000-000000000000}",
                "hidden": false,
                "icon": "%ProgramFiles%\\Neovim\\bin\\neovim.png",
                "name": "Neovim",
                "keybinds": 
                [
                    {
                        "id": null,
                        "keys": 
                        [
                            "ctrl+a"
                        ]
                    },
                    ...,
                    {
                        "id": "User.b",
                        "keys": 
                        [
                            "ctrl+b"
                        ]
                    },
                    ...
                ]
            },
            {
                "commandline": "%ProgramFiles%\\Git\\bin\\bash.exe",
                "guid": "{00000000-0000-0000-0000-000000000000}",
                "hidden": false,
                "icon": "%ProgramFiles%\\Git\\git-bash.exe",
                "name": "Git Bash",
                "keybinds": 
                [
                    {
                        "id": null,
                        "keys": 
                        [
                            "ctrl+a"
                        ]
                    },
                    ...,
                    {
                        "id": "User.c",
                        "keys": 
                        [
                            "ctrl+c"
                        ]
                    },
                    ...
                ]
            },
            {
                "commandline": "%ProgramFiles%\\PowerShell\\7\\pwsh.exe",
                "guid": "{00000000-0000-0000-0000-000000000000}",
                "hidden": false,
                "name": "PowerShell",
                "source": "Windows.Terminal.PowershellCore",
                "keybinds": 
                [
                    {
                        "id": null,
                        "keys": 
                        [
                            "ctrl+a"
                        ]
                    },
                    ...,
                    {
                        "id": "User.d",
                        "keys": 
                        [
                            "ctrl+d"
                        ]
                    },
                    ...
                ]
            },
            ...
        ]
    },
    ...
}
Originally created by @repackage8650 on GitHub (Feb 20, 2025). ### Description of the new feature I have seen that there are demands for **switching shrotcuts / keybinds / keymaps sets** in #9301 and #15277, which I think this is because people are used to different shrotcuts / keybinds / keymaps when working in **different profiles**, so that I think it would be an effective solution if the shrotcuts / keybinds / keymaps set can be specified in the profile. ### Proposed technical implementation details A simple and specific idea is as follows: move the current `actions` options to the `default profile` as `default actions`, and allow each profile to override the `default actions`, such as overriding unnecessary actions to `null` or adding keybinds for new actions. The new `settings.json` will look like this: ```json { ..., "actions": [ { "command": "ACommandName", "id": "User.a" }, { "command": "BCommandName", "id": "User.b" }, { "command": "CCommandName", "id": "User.c" }, { "command": "DCommandName", "id": "User.d" }, ... ], ..., "profiles": { "defaults": { ..., "keybinds": [ { "id": "User.a", "keys": [ "ctrl+a" ] }, ... ] }, "list": [ { "commandline": "%ProgramFiles%\\Neovim\\bin\\nvim.exe", "guid": "{00000000-0000-0000-0000-000000000000}", "hidden": false, "icon": "%ProgramFiles%\\Neovim\\bin\\neovim.png", "name": "Neovim", "keybinds": [ { "id": null, "keys": [ "ctrl+a" ] }, ..., { "id": "User.b", "keys": [ "ctrl+b" ] }, ... ] }, { "commandline": "%ProgramFiles%\\Git\\bin\\bash.exe", "guid": "{00000000-0000-0000-0000-000000000000}", "hidden": false, "icon": "%ProgramFiles%\\Git\\git-bash.exe", "name": "Git Bash", "keybinds": [ { "id": null, "keys": [ "ctrl+a" ] }, ..., { "id": "User.c", "keys": [ "ctrl+c" ] }, ... ] }, { "commandline": "%ProgramFiles%\\PowerShell\\7\\pwsh.exe", "guid": "{00000000-0000-0000-0000-000000000000}", "hidden": false, "name": "PowerShell", "source": "Windows.Terminal.PowershellCore", "keybinds": [ { "id": null, "keys": [ "ctrl+a" ] }, ..., { "id": "User.d", "keys": [ "ctrl+d" ] }, ... ] }, ... ] }, ... } ```
claunia added the Issue-FeatureResolution-Duplicate labels 2026-01-31 08:28:12 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Feb 24, 2025):

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 (Feb 24, 2025): 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

@microsoft-github-policy-service[bot] commented on GitHub (Feb 24, 2025):

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!

@microsoft-github-policy-service[bot] commented on GitHub (Feb 24, 2025): 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! <!-- Policy app identification https://img.shields.io/static/v1?label=PullRequestIssueManagement. -->
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#22951