Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use keyboard to focus on git commit message input VSCode?

Is there any way to focus to this input by keyboard rather than mouse click in VisualStudioCode?

enter image description here

like image 243
user956609 Avatar asked Aug 19 '20 17:08

user956609


People also ask

How do you add a keyboard shortcut to VS Code?

All keyboard shortcuts in VS Code can be customized via the keybindings. json file. To configure keyboard shortcuts through the JSON file, open Keyboard Shortcuts editor and select the Open Keyboard Shortcuts (JSON) button on the right of the editor title bar. This will open your keybindings.

How do you select text with keyboard VS Code?

Ctrl+D selects the word at the cursor, or the next occurrence of the current selection. Tip: You can also add more cursors with Ctrl+Shift+L, which will add a selection at each occurrence of the current selected text.


2 Answers

Well certainly not ideal, I've found that ctrl shift G then ESC , Tab will focus the Source Control Message input.

Now when you repeat ctrl shift G it seems to focus the input directly.

like image 116
skube Avatar answered Oct 06 '22 20:10

skube


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",
    },
like image 38
laoyb Avatar answered Oct 06 '22 20:10

laoyb