Display a warning when a user tries to bind an action to multiple keys in a single chord #5949

Open
opened 2026-01-31 00:26:18 +00:00 by claunia · 0 comments
Owner

Originally created by @angelog0 on GitHub (Jan 15, 2020).

After upgrading to WT 0.8, I added this to my profile.json:

"keybindings":
    [
        // "index": 1 ==> "Ubuntu"
        { "keys": ["ctrl+2+plus"],
          "command": {"action": "splitPane", "split": "vertical", "index": 1}
        },
        { "keys": ["ctrl+2+-"],
          "command": {"action": "splitPane", "split": "horizontal", "index": 1}
        }//,
        // "index": 2 ==> "CMD"
        // { "keys": ["ctrl+3+plus"],
        //   "command": {"action": "splitPane", "split": "vertical", "index": 2}
        // },
        // { "keys": ["ctrl+3+-"],
        //   "command": {"action": "splitPane", "split": "horizontal", "index": 2}
        // }
    ]

and it works as expected: profile index 0 is MSYS2 and index 1 is Ubuntu, so ctrl+2+... can split current profile calling Ubuntu.

If I uncomment the other lines (index 2 for CMD), both ctrl+2+... and ctrl+3+... open CMD profile. In short adding similar lines for other profile, always open the last profile and not what they should open...

I wonder what is wrong with those lines.. maybe i have misunderstood? Thanks...

Originally created by @angelog0 on GitHub (Jan 15, 2020). After upgrading to WT 0.8, I added this to my `profile.json`: ``` "keybindings": [ // "index": 1 ==> "Ubuntu" { "keys": ["ctrl+2+plus"], "command": {"action": "splitPane", "split": "vertical", "index": 1} }, { "keys": ["ctrl+2+-"], "command": {"action": "splitPane", "split": "horizontal", "index": 1} }//, // "index": 2 ==> "CMD" // { "keys": ["ctrl+3+plus"], // "command": {"action": "splitPane", "split": "vertical", "index": 2} // }, // { "keys": ["ctrl+3+-"], // "command": {"action": "splitPane", "split": "horizontal", "index": 2} // } ] ``` and it works as expected: profile `index 0` is MSYS2 and `index 1` is Ubuntu, so `ctrl+2+...` can split current profile calling Ubuntu. If I uncomment the other lines (`index 2` for CMD), both `ctrl+2+...` and `ctrl+3+...` open CMD profile. In short adding similar lines for other profile, always open the last profile and not what they should open... I wonder what is wrong with those lines.. maybe i have misunderstood? Thanks...
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#5949