4

This SO post documents a keyboard shortcut to activate the hover text documentation pop-up in VS Code. However, sometimes the documentation is long enough that you need to be able to scroll through it. Is there a key combination to scroll through the hover text pop-up without using the mouse? (Of course if you activate the hover text using your mouse, then you can scroll through using the scroll wheel on your mouse.)

Cameron Bieganek
  • 7,208
  • 1
  • 23
  • 40
  • 3
    from what i saw, there is currently no option to scroll through the hover text with keyboard, source: https://github.com/microsoft/vscode/issues/69836 – hasezoey Dec 30 '20 at 12:21

1 Answers1

1

The issue mentioned by @hasezoey has been closed as completed. In the Insiders Build v1.77 will be 4 new commands that allow you to scroll the hover box:

editor.action.scrollUpHover      // upArrow when hover widget focused
Action that allows to scroll up in the hover widget with the up arrow when the hover widget is focused.

editor.action.scrollDownHover   // downArrow when hover widget focused
Action that allows to scroll down in the hover widget with the up arrow when the hover widget is focused.

editor.action.pageUpHover       // pageUp when hover widget focused
Action that allows to page up in the hover widget with the page up command when the hover widget is focused.

editor.action.pageDownHover     // pageDown when hover widget focused
Action that allows to page down in the hover widget with the page down command when the hover widget is focused.

And to focus that hover widget box so that the commands work there is a new command:

Show or Focus Hover
editor.action.showHover
"Controls if when triggered with the keyboard, the hover should take focus immediately."

Label for action that will trigger the showing/focusing of a hover in the editor.,
If the hover is not visible, it will show the hover.,
This allows for users to show the hover without using the mouse.,
If the hover is already visible, it will take focus.

This command will both show the hover and focus it - so that that the scroll commands then work, or if the hover widget is already visible, the command will focus it.

If all goes well, this may hit Stable v1.77 early April 2023.

Mark
  • 143,421
  • 24
  • 428
  • 436