[PR #12209] [MERGED] Add support for ctrl+click on the dropdown to launch elevated #28894

Open
opened 2026-01-31 09:31:30 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/12209
Author: @zadjii-msft
Created: 1/20/2022
Status: Merged
Merged: 1/27/2022
Merged by: @DHowett

Base: mainHead: dev/migrie/f/ctrl-click-elevate-in-dropdown


📝 Commits (3)

  • 26c1e68 the whole thing
  • 1b7fd81 I think this is it
  • a584b10 Merge commit '26c1e684de9aac85b077f9100cce7117c761b526' into dev/migrie/f/ctrl-click-elevate-in-dropdown

📊 Changes

5 files changed (+41 additions, -14 deletions)

View changed files

📝 src/cascadia/TerminalApp/AppActionHandlers.cpp (+3 -6)
📝 src/cascadia/TerminalApp/Resources/en-US/Resources.resw (+3 -0)
📝 src/cascadia/TerminalApp/TerminalPage.cpp (+28 -6)
📝 src/cascadia/TerminalApp/TerminalPage.h (+2 -2)
📝 src/cascadia/TerminalSettingsModel/ActionArgs.cpp (+5 -0)

📄 Description

image

Just like the shift+click and the alt click shortcuts, now Ctrl+Click will launch a new window with that profile, elevated.

I also found that the GenerateName wasn't updated for the elevate arg, so added that. I considered adding the following to the defaults, but decided against it. It added 10 more entries to the command palette that were only separated by the elevate: true param, so that didn't feel valuable. Those are posted below for posterity.

Considered new keybindings:

        { "command": { "action": "newTab", "index": 0, "elevate": true }, "keys": "ctrl+shift+alt+1" },
        { "command": { "action": "newTab", "index": 1, "elevate": true }, "keys": "ctrl+shift+alt+2" },
        { "command": { "action": "newTab", "index": 2, "elevate": true }, "keys": "ctrl+shift+alt+3" },
        { "command": { "action": "newTab", "index": 3, "elevate": true }, "keys": "ctrl+shift+alt+4" },
        { "command": { "action": "newTab", "index": 4, "elevate": true }, "keys": "ctrl+shift+alt+5" },
        { "command": { "action": "newTab", "index": 5, "elevate": true }, "keys": "ctrl+shift+alt+6" },
        { "command": { "action": "newTab", "index": 6, "elevate": true }, "keys": "ctrl+shift+alt+7" },
        { "command": { "action": "newTab", "index": 7, "elevate": true }, "keys": "ctrl+shift+alt+8" },
        { "command": { "action": "newTab", "index": 8, "elevate": true }, "keys": "ctrl+shift+alt+9" },

Includes a semi-related dead code removal for the elevated param for _OpenNewWindow, which didn't end up being used, and wouldn't work as intended anyways.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/12209 **Author:** [@zadjii-msft](https://github.com/zadjii-msft) **Created:** 1/20/2022 **Status:** ✅ Merged **Merged:** 1/27/2022 **Merged by:** [@DHowett](https://github.com/DHowett) **Base:** `main` ← **Head:** `dev/migrie/f/ctrl-click-elevate-in-dropdown` --- ### 📝 Commits (3) - [`26c1e68`](https://github.com/microsoft/terminal/commit/26c1e684de9aac85b077f9100cce7117c761b526) the whole thing - [`1b7fd81`](https://github.com/microsoft/terminal/commit/1b7fd819235970a42625a2f4ea7a1a4a73ad9442) I think this is it - [`a584b10`](https://github.com/microsoft/terminal/commit/a584b101e5a9e5689a497c49fc31e68e84134be9) Merge commit '26c1e684de9aac85b077f9100cce7117c761b526' into dev/migrie/f/ctrl-click-elevate-in-dropdown ### 📊 Changes **5 files changed** (+41 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalApp/AppActionHandlers.cpp` (+3 -6) 📝 `src/cascadia/TerminalApp/Resources/en-US/Resources.resw` (+3 -0) 📝 `src/cascadia/TerminalApp/TerminalPage.cpp` (+28 -6) 📝 `src/cascadia/TerminalApp/TerminalPage.h` (+2 -2) 📝 `src/cascadia/TerminalSettingsModel/ActionArgs.cpp` (+5 -0) </details> ### 📄 Description ![image](https://user-images.githubusercontent.com/18356694/150421834-de68140b-a935-47d7-95ca-ab91a6421f1b.png) Just like the shift+click and the alt click shortcuts, now Ctrl+Click will launch a new window with that profile, elevated. I also found that the GenerateName wasn't updated for the elevate arg, so added that. I considered adding the following to the defaults, but decided against it. It added 10 more entries to the command palette that were only separated by the `elevate: true` param, so that didn't feel valuable. Those are posted below for posterity. * [x] closes https://github.com/microsoft/terminal/projects/5#card-50759221 * [x] Tested manually * [ ] Docs.... maybe need updating? Considered new keybindings: ```jsonc { "command": { "action": "newTab", "index": 0, "elevate": true }, "keys": "ctrl+shift+alt+1" }, { "command": { "action": "newTab", "index": 1, "elevate": true }, "keys": "ctrl+shift+alt+2" }, { "command": { "action": "newTab", "index": 2, "elevate": true }, "keys": "ctrl+shift+alt+3" }, { "command": { "action": "newTab", "index": 3, "elevate": true }, "keys": "ctrl+shift+alt+4" }, { "command": { "action": "newTab", "index": 4, "elevate": true }, "keys": "ctrl+shift+alt+5" }, { "command": { "action": "newTab", "index": 5, "elevate": true }, "keys": "ctrl+shift+alt+6" }, { "command": { "action": "newTab", "index": 6, "elevate": true }, "keys": "ctrl+shift+alt+7" }, { "command": { "action": "newTab", "index": 7, "elevate": true }, "keys": "ctrl+shift+alt+8" }, { "command": { "action": "newTab", "index": 8, "elevate": true }, "keys": "ctrl+shift+alt+9" }, ``` Includes a semi-related dead code removal for the `elevated` param for `_OpenNewWindow`, which didn't end up being used, and wouldn't work as intended anyways. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:31:30 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#28894