Allow User Entered Args in Key Commands #14169

Closed
opened 2026-01-31 04:02:51 +00:00 by claunia · 6 comments
Owner

Originally created by @TheBrenny on GitHub (Jun 9, 2021).

Description of the new feature/enhancement

Windows Terminal should implement a feature similar to how user-entered arguments can be entered for Run Configurations in VSCode.

One example would be to have a newTab command bound to ctrl+shift+n, with the profile attribute set to "${input:getProfile}" (see the technical example below). A similar example would be splitting panes and selecting horizontal or vertical from a list.

This would allow for more flexibility within keyboard commands, and open up possibilities for many more interesting and helpful keyboard shortcuts.

Proposed technical implementation details (optional)

In VSCode's .vscode/launch.json file, specifying an "inputs": [] array and an object within allows you to use that input in the run configuration, such as entering specific arguments. This can be done by using "${input:foo}", where foo is the id of an object in inputs.

This would allow Windows Terminal users to have a keyboard command like the following:

{
    "command": {
    "action": "newTab",
    "profile": "${input:getProfile}"
    },
    "keys": "ctrl+shift+n"
}

where getProfile could be defined as:

{
    "id": "getProfile",
    "type": "promptString",
    "description": "Enter a profile name or GUID"
}
Originally created by @TheBrenny on GitHub (Jun 9, 2021). # Description of the new feature/enhancement Windows Terminal should implement a feature similar to how user-entered arguments can be entered for Run Configurations in VSCode. One example would be to have a `newTab` command bound to `ctrl+shift+n`, with the `profile` attribute set to `"${input:getProfile}"` (see the technical example below). A similar example would be splitting panes and selecting `horizontal` or `vertical` from a list. This would allow for more flexibility within keyboard commands, and open up possibilities for many more interesting and helpful keyboard shortcuts. # Proposed technical implementation details (optional) In VSCode's `.vscode/launch.json` file, specifying an `"inputs": []` array and an object within allows you to use that input in the run configuration, such as entering specific arguments. This can be done by using `"${input:foo}"`, where foo is the `id` of an object in `inputs`. This would allow Windows Terminal users to have a keyboard command like the following: ```json { "command": { "action": "newTab", "profile": "${input:getProfile}" }, "keys": "ctrl+shift+n" } ``` where `getProfile` could be defined as: ```json { "id": "getProfile", "type": "promptString", "description": "Enter a profile name or GUID" } ```
claunia added the Issue-FeatureResolution-DuplicateProduct-Terminal labels 2026-01-31 04:02:51 +00:00
Author
Owner

@ghost commented on GitHub (Jul 10, 2021):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@ghost commented on GitHub (Jul 10, 2021): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
Author
Owner

@TheBrenny commented on GitHub (Jul 12, 2021):

What was the feedback that I needed to provide?

@TheBrenny commented on GitHub (Jul 12, 2021): What was the feedback that I needed to provide?
Author
Owner

@zadjii-msft commented on GitHub (Jul 12, 2021):

Oh my god, I'm so sorry. I absolutely had a whole response typed up but must have never sent it. My bad!


This sounds like exactly something the command palette can already do with "iterable commands". There's already "New Tab..." commands in the palette that will display a list of profiles for you to pick from. I know that's not as generic as "allow arbitrary arguments", but is that what you're looking for?

@zadjii-msft commented on GitHub (Jul 12, 2021): Oh my god, I'm so sorry. I absolutely had a whole response typed up but must have never sent it. My bad! <hr> This sounds like exactly something the command palette can already do with "[iterable commands](https://docs.microsoft.com/en-us/windows/terminal/command-palette#iterable-commands)". There's already "New Tab..." commands in the palette that will display a list of profiles for you to pick from. I know that's not as generic as "allow arbitrary arguments", but is that what you're looking for?
Author
Owner

@TheBrenny commented on GitHub (Jul 13, 2021):

That solves one half of the problem! 🎉

But I'm also looking for a way to bind this to a key combination. For example, I can bind the single command newTab to ctrl+n, but having the command palette open to choose a profile bound to ctrl+shift+n would be ideal.

@TheBrenny commented on GitHub (Jul 13, 2021): That solves one half of the problem! 🎉 But I'm also looking for a way to bind this to a key combination. For example, I can bind the single command `newTab` to `ctrl+n`, but having the command palette open to choose a profile bound to `ctrl+shift+n` would be ideal.
Author
Owner

@zadjii-msft commented on GitHub (Jul 26, 2021):

@TheBrenny That element of what you're looking for sounds like #10209

/dup #10209

@zadjii-msft commented on GitHub (Jul 26, 2021): @TheBrenny That element of what you're looking for sounds like #10209 /dup #10209
Author
Owner

@ghost commented on GitHub (Jul 26, 2021):

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 (Jul 26, 2021): 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#14169