Reputation: 5038
I used to use Atom where I could select a folder in the explorer sidebar, press "a", and then this would create a new file.
I thought I had finally gotten this command to work in VSCode by
File: New File
to be A
with a When
of sideBarFocus
This configuration allows me to create a new file by pressing "a".
However, if I try to rename a file to contain the letter "a", I cannot, because as soon as I press "a" it tries to create a new file.
I would like to be able to name files to contain the letter "a". (While having "a" still allow me to create a new file when I'm not renaming.)
How can I fix this?
Upvotes: 1
Views: 448
Reputation: 182441
Add another negated when clause to your keybinding:
{
"key": "a",
"command": "explorer.newFile",
"when": "sideBarFocus && !inputFocus"
}
so it won't operate when an input box has focus.
Upvotes: 1