PascalSenn / keyboard-quickfix

Fully manage quick fix by keyboard
31 stars 6 forks source link

Open quick fix menu without text input focus #12

Closed eEQK closed 2 years ago

eEQK commented 2 years ago

I want to navigate the menu with jk and having the text input focused prevents my keybindings from working. Most of the time I'm not going to use the search input when selecting a quick fix, and instead of having to press Tab every time I open the menu I'd like the menu to not have the text input focus from the very beginning.

I've tried using multiCommand extension with e.g.

    "multiCommand.commands": [
        {
            "command": "multiCommand.openQuickFix",
            "sequence": [
                "keyboard-quickfix.openQuickFix",
                "workbench.action.focusNextPart",
            ],
            "interval": 500,
        },
    ],

or instead of workbench.action.focusNextPart - workbench.action.blur and tab, however none of these work

is it possible to somehow achieve what I want? or alternatively add such functionality to the plugin?

eEQK commented 2 years ago

Actually, the commands mentioned in readme work, it's just I think I've used wrong when clauses with them

    {
        "key": "j",
        "command": "workbench.action.quickOpenSelectNext",
        "when": "!editorTextFocus && inQuickOpen"
    },
    {
        "key": "k",
        "command": "workbench.action.quickOpenSelectPrevious",
        "when": "!editorTextFocus && inQuickOpen"
    },
    {
        "key": "alt+enter",
        "command": "keyboard-quickfix.openQuickFix",
        "when": "editorHasCodeActionsProvider && editorTextFocus && !editorReadonly"
    }

These navigate between entries in the menu even though the text input is focused, which is exactly what I wanted.