Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotkey for Windows shell context menu #17710

Merged
merged 1 commit into from
Feb 16, 2017

Conversation

mlewand
Copy link
Contributor

@mlewand mlewand commented Dec 22, 2016

First of all thanks for a great editor, it's high time to give you some love back. 🙂

Here's the pull request to fix #15939, which essentially requests for a hotkey in Windows shell context menu.

It adds a "win32ShellHotkey" property in product.json, allowing for hotkey customization.

I suggest setting default value to "o" with following reason:

  • "o" is used already by Sublime Text - so if someone switches, he or she is already familiar with it! 😄
  • "c" would be a fist pick here, as it's the first letter of "Code", however in default context menu you have already "copy" in context menu, which should have as easy access as possible,

The cool thing is that if you completely skip "win32ShellHotkey" property in product.json instead of crushing it simply won't cause an error in build process but will create no hotkey at all. And if you set it to empty, it will use the first letter from product.nameShort.

Also I think it should be case insensitive, so if you set it doesn't matter if you set it to "o" or "O".

The only thing that I did not implement on purpose is handling for case when product.win32ShellHotkey character is not present in product.nameShort. Ideally we'd want to append it like: "Open with Code - OSS (y)" - but I wanted to keep it clean, and avoid unnecessary logic. Anyway, if that's something you'd like to get, just let me know.

@msftclas
Copy link

Hi @mlewand, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes. I promise there's no faxing. https://cla.microsoft.com.

TTYL, MSBOT;

@mlewand
Copy link
Contributor Author

mlewand commented Dec 22, 2016

Rebased the branch onto latest master so that we have nice and green tests :) Also I'll close and reopen the PR as I signed CLA yesterday and it still did not take effect...

@mlewand mlewand closed this Dec 22, 2016
@mlewand mlewand reopened this Dec 22, 2016
@msftclas
Copy link

Hi @mlewand, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!
We will now validate the agreement and then real humans will evaluate your PR.

TTYL, MSBOT;

@joaomoreno joaomoreno added this to the January 2017 milestone Jan 3, 2017
Copy link
Member

@joaomoreno joaomoreno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be more comfortable with this if we simply had a shellNameShort property in package.json, leaving all the magic out of it.

Also, have you verified that simply adding a & before a letter works?

Copy link
Member

@joaomoreno joaomoreno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be more comfortable with this if we simply had a shellNameShort property in package.json, leaving all the magic out of it.

Also, have you verified that simply adding a & before a letter works?

@mlewand
Copy link
Contributor Author

mlewand commented Feb 6, 2017

@joaomoreno thanks for the R. Yea I verified this change and it works well.

I'd be more comfortable with this if we simply had a shellNameShort property in package.json, leaving all the magic out of it.

Do you want me to put shellNameShort property alone in the package.json? The reason why I'm asking is that package.json does not contain meta information like that so far.

@joaomoreno
Copy link
Member

Sorry, I meant product.json!

@mlewand
Copy link
Contributor Author

mlewand commented Feb 6, 2017

Ahh, now it makes perfect sense 🙂 I'll take a look on that in a spare time.

…Windows shell, allowing to provide a custom hotkey.
@mlewand
Copy link
Contributor Author

mlewand commented Feb 7, 2017

@joaomoreno all right the code has been pushed. I have amended the former commit, to keep the history shorter.

@mlewand
Copy link
Contributor Author

mlewand commented Feb 15, 2017

@joaomoreno any chances of getting it in some time soon? It's a pretty trivial fix, while pretty important for Windows keyboard users.

@joaomoreno
Copy link
Member

Good job!

@joaomoreno joaomoreno merged commit a26ca6c into microsoft:master Feb 16, 2017
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add shortcut for file right click context menu.
3 participants