Is there any way to focus to this input by keyboard rather than mouse click in Visual Studio Code?
As a workaround, we can use the extension multi.
Define shortcut like:
{
"key": "escape",
"command": "extension.multiCommand.execute",
"args": {
"sequence": [
"list.focusFirst",
"list.select",
]
},
"when": "listFocus && workbench.scm.active",
},
While certainly not ideal, I've found the following will focus the Source Control Message input field:
Now when you repeat ctrl shift G it seems to focus the input directly.
You can use TAB/SHIFT+TAB key to move focus in left SOURCE CONTROL panel.
For some color theme you can easily notice where the focus is.
Most of the time the focus is located on the file names in Changes pane(?). In that case press SHIFT+TAB key to move focus to Message field.
If you are in any section in the left menu other than Source Control (e.g. Explorer or Extensions, then use Ctrl+Shift+G then press G again
If you are already in the Source Control section of the left menu, then use Tab or Shift+Tab to move focus forward or backward (respectively)
First, if needed, focus Source Control with Ctrl+Shift+G.
Press Home to focus the message box and Enter or Tab or Space to start typing in it.
Thanks to yellowtailfan for bringing this up on GitHub. They specifically said "if one of the changed files has focus", but I don't think that's crucial for Home Enter to work.
Overall, you can navigate the whole Source Control panel like this using direction keys (Up, Down, etc.), which means you can select files, use Left/Right to show/hide sections like "Staged Changes", and access more commit options by highlighting that box then using Tab to move inside it.
Okay, adding my answer found in the following issue, slightly modified:
Ensure that scm.focus command works in all cases
Use this keybinding:
{
"key": "alt+e", // whatever keybinding you want
"command": "extension.multiCommand.execute",
"args": {
"sequence": [
"workbench.scm.focus",
"list.focusFirst",
"list.select"
]
},
}
and the macro extension multi-command.
This works whether the scm view is open or not, whether something is already focussed in the scm view or whether a text editor is focussed.
So just the one keybinding, no need to Home and Enter whether a scm file has focus or not.