Can not disable ctrl + alt + number #9702

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

Originally created by @FrankFang on GitHub (Jul 20, 2020).

Environment

Windows build number:10.0.19041.388
Windows Terminal version   : 1.0.1811.0

Steps to reproduce

  1. Put this into config file
        { "command": { "action": "switchToTab", "index": 0 }, "keys": "ctrl+shift+1" },
        { "command": { "action": "switchToTab", "index": 1 }, "keys": "ctrl+shift+2" },
        { "command": { "action": "switchToTab", "index": 2 }, "keys": "ctrl+shift+3" },
        { "command": { "action": "switchToTab", "index": 3 }, "keys": "ctrl+shift+4" },
        { "command": { "action": "switchToTab", "index": 4 }, "keys": "ctrl+shift+5" },
        { "command": { "action": "switchToTab", "index": 5 }, "keys": "ctrl+shift+6" },
        { "command": { "action": "switchToTab", "index": 6 }, "keys": "ctrl+shift+7" },
        { "command": { "action": "switchToTab", "index": 7 }, "keys": "ctrl+shift+8" },
        { "command": { "action": "switchToTab", "index": 8 }, "keys": "ctrl+shift+9" }
    
  2. open 2 tabs
  3. press ctrl + alt + 2

Expected behavior

nothing happens

Actual behavior

switch to tab 2

Originally created by @FrankFang on GitHub (Jul 20, 2020). # Environment ```none Windows build number:10.0.19041.388 Windows Terminal version : 1.0.1811.0 ``` # Steps to reproduce 1. Put this into config file ``` { "command": { "action": "switchToTab", "index": 0 }, "keys": "ctrl+shift+1" }, { "command": { "action": "switchToTab", "index": 1 }, "keys": "ctrl+shift+2" }, { "command": { "action": "switchToTab", "index": 2 }, "keys": "ctrl+shift+3" }, { "command": { "action": "switchToTab", "index": 3 }, "keys": "ctrl+shift+4" }, { "command": { "action": "switchToTab", "index": 4 }, "keys": "ctrl+shift+5" }, { "command": { "action": "switchToTab", "index": 5 }, "keys": "ctrl+shift+6" }, { "command": { "action": "switchToTab", "index": 6 }, "keys": "ctrl+shift+7" }, { "command": { "action": "switchToTab", "index": 7 }, "keys": "ctrl+shift+8" }, { "command": { "action": "switchToTab", "index": 8 }, "keys": "ctrl+shift+9" } ``` 2. open 2 tabs 3. press ctrl + alt + 2 # Expected behavior nothing happens # Actual behavior switch to tab 2
claunia added the Issue-QuestionArea-SettingsResolution-AnsweredProduct-Terminal labels 2026-01-31 02:01:17 +00:00
Author
Owner

@DHowett commented on GitHub (Jul 20, 2020):

You need to explicitly unbind the ctrl+alt bindings.

Do this:

    { "command": "unbound", "keys": "ctrl+alt+1" },
    { "command": "unbound", "keys": "ctrl+alt+2" },
    { "command": "unbound", "keys": "ctrl+alt+3" },
    { "command": "unbound", "keys": "ctrl+alt+4" },
    { "command": "unbound", "keys": "ctrl+alt+5" },
    { "command": "unbound", "keys": "ctrl+alt+6" },
    { "command": "unbound", "keys": "ctrl+alt+7" },
    { "command": "unbound", "keys": "ctrl+alt+8" },
    { "command": "unbound", "keys": "ctrl+alt+9" }
@DHowett commented on GitHub (Jul 20, 2020): You need to explicitly unbind the <kbd>ctrl+alt</kbd> bindings. Do this: ```json { "command": "unbound", "keys": "ctrl+alt+1" }, { "command": "unbound", "keys": "ctrl+alt+2" }, { "command": "unbound", "keys": "ctrl+alt+3" }, { "command": "unbound", "keys": "ctrl+alt+4" }, { "command": "unbound", "keys": "ctrl+alt+5" }, { "command": "unbound", "keys": "ctrl+alt+6" }, { "command": "unbound", "keys": "ctrl+alt+7" }, { "command": "unbound", "keys": "ctrl+alt+8" }, { "command": "unbound", "keys": "ctrl+alt+9" } ```
Author
Owner

@zadjii-msft commented on GitHub (Jul 20, 2020):

The keybindings actually aren't a map of action->key, but rather a mapping of key->action. So you can have the same action bound to multiple different chords. Currently, you've got both Ctrl+alt+1 (from the defaults) and Ctrl+shift+1 (from your settings) bound to the same action.

Doing the above will unbind the mapping from the defaults, leaving you with only the Ctrl+shift+1 version.

@zadjii-msft commented on GitHub (Jul 20, 2020): The keybindings actually aren't a map of action->key, but rather a mapping of key->action. So you can have the same action bound to multiple different chords. Currently, you've got both <kbd>Ctrl+alt+1</kbd> (from the defaults) and <kbd>Ctrl+shift+1</kbd> (from your settings) bound to the same action. Doing the above will _unbind_ the mapping from the defaults, leaving you with only the <kbd>Ctrl+shift+1</kbd> version.
Author
Owner

@FrankFang commented on GitHub (Jul 20, 2020):

Thanks

@FrankFang commented on GitHub (Jul 20, 2020): Thanks
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#9702