Skip to content

Cannot unbind key through null id #18430

Open
Open
@folofjc

Description

Windows Terminal version

1.21.3231.0

Windows build number

10.0.26100.2894

Other Software

No response

Steps to reproduce

I am trying to unbind ctrl-h.
I am following the steps from https://learn.microsoft.com/en-us/windows/terminal/customize-settings/actions#unbind-keys-disable-keybindings

In this case, I copy the section about setting the id to null:

{
   "id" : null, "keys" : ["ctrl+h"]
}

I put this in the settings.json file.

Here is what that part of my file looks like now:

{
    "$help": "https://aka.ms/terminal-documentation",
    "$schema": "https://aka.ms/terminal-profiles-schema",
    "actions": 
    [
        {
            "command": "unbound",
            "keys": "ctrl+v"
        },
        {
            "command": "unbound",
            "keys": "ctrl+c"
        },
        {
            "command": 
            {
                "action": "copy",
                "singleLine": false
            },
            "id": "User.copy.644BA8F2"
        },
        {
            "command": "paste",
            "id": "User.paste",
            "keys": "ctrl+shift+v"
        },
        {
            "command": 
            {
                "action": "splitPane",
                "split": "auto",
                "splitMode": "duplicate"
            },
            "id": "User.splitPane.A6751878",
            "keys": "alt+shift+d"
        },
        {
            "command": "find",
            "id": "User.find",
            "keys": "ctrl+shift+f"
        },
        {
            "id" : null, "keys" : ["ctrl+h"]
        }
        
    ],
    "copyFormatting": "none",
    "copyOnSelect": false,
    "defaultProfile": "{d8e96812-b789-5068-a5ae-10b2fb53e95f}",
    "newTabMenu": 
    [
        {
            "type": "remainingProfiles"
        }
    ],
    "profiles": 
    {
        "defaults": 
        {
            "cursorShape": "filledBox",
            "experimental.rightClickContextMenu": true,
            "font": 
            {
                "size": 10
            },
            "showMarksOnScrollbar": true
        },
        "list": 
        [
            {
                "commandline": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
                "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
                "hidden": false,
                "name": "Windows PowerShell"
            },
            {
                "commandline": "%SystemRoot%\\System32\\cmd.exe",
                "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
                "hidden": false,
                "name": "Command Prompt"
            },
            {
                "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
                "hidden": false,
                "name": "Azure Cloud Shell",
                "source": "Windows.Terminal.Azure"
            },
            {
                "colorScheme": "Tango Dark",
                "cursorShape": "filledBox",
                "font": 
                {
                    "size": 11
                },
                "guid": "{d8e96812-b789-5068-a5ae-10b2fb53e95f}",
                "hidden": false,
                "name": "Ubuntu 24.04.1 LTS",
                "source": "CanonicalGroupLimited.Ubuntu24.04LTS_79rhkp1fndgsc"
            },
            {
                "guid": "{963ff2f7-6aed-5ce3-9d91-90d99571f53a}",
                "hidden": true,
                "name": "Ubuntu-24.04",
                "source": "Windows.Terminal.Wsl"
            }
        ]
    },
    "schemes": [],
    "themes": []
}

Expected Behavior

I expect it to at least load the settings file. Ideally, it should unbind ctrl-h from WSL and the command prompt.

Since I am copying directly from the windows documents, I expect this to work.

Actual Behavior

I get an error:

Image

As you can see, it does not like the null and says it expects a string.

Metadata

Labels

Area-SettingsIssues related to settings and customizability, for console or terminalIssue-BugIt either shouldn't be doing this or needs an investigation.Product-TerminalThe new Windows Terminal.

Type

Projects

  • Status

    To Cherry Pick
  • Status

    To Cherry Pick

Relationships

None yet

Development

No branches or pull requests

Issue actions