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

Add 'explorerViewletFocus for keybinding when` context #15002

Closed
waderyan opened this issue Nov 4, 2016 · 10 comments
Closed

Add 'explorerViewletFocus for keybinding when` context #15002

waderyan opened this issue Nov 4, 2016 · 10 comments
Assignees
Labels
file-explorer Explorer widget issues verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@waderyan
Copy link

waderyan commented Nov 4, 2016

Atom provides keyboard shortcuts such as a and shift+a when in the file explorer context. As far as I can tell we do not have an explorerFocus value for when, when defining keybindings. This would be needed to implement user request here.

What we want to do is add something like this to the Atom Keymap extension.

{
    "mac": "a",
    "win": "a",
    "linux": "a",
    "key": "a",
    "command": "workbench.files.action.createNewFile",
    "when": "explorerFocus"
},
{
    "mac": "shift+a",
    "win": "shift+a",
    "linux": "shift+a",
    "key": "shift+a",
    "command": "workbench.files.action.createNewFolder",
    "when": "explorerFocus"
}
@alexdima
Copy link
Member

alexdima commented Nov 7, 2016

The explorer hasn't fully adopted our keybindings story and at this point not all keybindings are customizable in there (e.g. F2).

@alexdima alexdima assigned bpasero and unassigned alexdima Nov 7, 2016
@bpasero
Copy link
Member

bpasero commented Nov 7, 2016

This issue has already been reported. Please use the search function next time before reporting an issue and/or this time if you are curious about the progress of the issue.

@bpasero bpasero closed this as completed Nov 7, 2016
@waderyan
Copy link
Author

waderyan commented Nov 7, 2016

@bpasero can you point the issue out to me? I did do a search but it looks like I can't find it. Its not easy to find related issues :)

@waderyan
Copy link
Author

waderyan commented Nov 7, 2016

Maybe this one - #4557

@bpasero
Copy link
Member

bpasero commented Nov 7, 2016

@waderyan thats it. sorry, I did not want to treat you any more special than I do any other user ;)

@bpasero
Copy link
Member

bpasero commented Jan 31, 2017

I added new contexts that can be used to assign keybindings that only work when explorer or open editors have focus:

  • explorerFocus
  • openEditorsFocus

@waderyan
Copy link
Author

Awesome!

@isidorn
Copy link
Contributor

isidorn commented Feb 22, 2017

Does not work for me, my example:

{
            "key": "cmd+e",
            "command": "workbench.action.quickOpen",
            "when": "explorerFocus"
      },

@isidorn isidorn reopened this Feb 22, 2017
@isidorn isidorn removed the verified Verification succeeded label Feb 22, 2017
@bpasero
Copy link
Member

bpasero commented Feb 22, 2017

@isidorn sorry, the context key is: explorerViewletFocus

@bpasero bpasero closed this as completed Feb 22, 2017
@bpasero bpasero changed the title Add 'explorerFocus for keybinding when` context Add 'explorerViewletFocus for keybinding when` context Feb 22, 2017
@isidorn isidorn added the verified Verification succeeded label Feb 22, 2017
@isidorn
Copy link
Contributor

isidorn commented Feb 22, 2017

@bpasero no worries, works now

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
file-explorer Explorer widget issues verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants