microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
161.94k stars 28.47k forks source link

Allow open recent folder in new window using mouse middle click #219325

Open ck97756 opened 1 month ago

ck97756 commented 1 month ago

Middle click usually means open in new window Currently (VSCode version: 1.90.2) in menu File -> Open Recent When you middle click the item in the list It will open in the current window

VSCodeTriageBot commented 1 month ago

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

bpasero commented 1 month ago

At least when using native menus, we do not seem to be able to detect that:

https://github.com/microsoft/vscode/blob/859a0942630b74c73da4929a32e9f280f8c3b94a/src/vs/platform/menubar/electron-main/menubar.ts#L580-L582

For custom menus, I am not sure if we have logic to detect option or middle click, maybe @sbatten or @benibenj could advise.

benibenj commented 1 month ago

We only get two types of events from the menu, Click and Close.

For the Click event we only get the itemId: number and context: IContextMenuEvent

export interface IContextMenuEvent {
    shiftKey?: boolean;
    ctrlKey?: boolean;
    altKey?: boolean;
    metaKey?: boolean;
}
vs-code-engineering[bot] commented 6 days ago

This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!