Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scrolling hover popup with keyboard #69836

Closed
akshaal opened this issue Mar 5, 2019 · 72 comments · Fixed by #176057
Closed

Scrolling hover popup with keyboard #69836

akshaal opened this issue Mar 5, 2019 · 72 comments · Fixed by #176057
Assignees
Labels
editor-hover Editor mouse hover feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders on-testplan
Milestone

Comments

@akshaal
Copy link

akshaal commented Mar 5, 2019

It's already possible to create a keyboard shortcut to trigger a hover popup window with keyboard.. But mouse is still required to scroll the windows.

@sandy081
Copy link
Member

sandy081 commented Mar 6, 2019

Hmm interesting, I did not know that there is a shortcut to open hover :)

@sandy081 sandy081 added the editor-hover Editor mouse hover label Mar 6, 2019
@sandy081 sandy081 modified the milestone: March 2019 Mar 6, 2019
@sandy081 sandy081 removed the editor-hover Editor mouse hover label Mar 6, 2019
@sandy081 sandy081 removed their assignment Mar 6, 2019
@sandy081
Copy link
Member

sandy081 commented Mar 6, 2019

We never focus hover and any key press or mouse move will hide the hover.

@alexandrudima Moving this to you, let me know if I have to do anything.

@akshaal akshaal changed the title Srolling hover popup with keyboard Scrolling hover popup with keyboard Mar 6, 2019
@akshaal
Copy link
Author

akshaal commented Mar 6, 2019

{
        "key": "alt+f1",
        "command": "editor.action.showHover",
        "when": "editorTextFocus"
},

Press alt+f1 and notice that the hover is focused.. or at least no key press hide it. But you still can't scroll the content inside.
VSCode 1.31.1

@alexdima
Copy link
Member

alexdima commented Mar 6, 2019

In 1.31, the action editor.action.showHover focuses the hover.
In (the upcoming) 1.32, the action will not focus the hover.

This change came in via #66827 which tackles #10643

@alexdima alexdima added editor-hover Editor mouse hover feature-request Request for new features or functionality labels Mar 6, 2019
@akshaal
Copy link
Author

akshaal commented Mar 6, 2019

Ok, I see.. How about a new "editor.action.showHoverFocused" or something like that? And if focused, make it scrollable with keyboard.

@alexdreptu
Copy link

@alexandrudima in 1.32 editor.action.showHover doesn't automatically focus the hover but now it also doesn't close with Esc anymore. Is there currently any way to set a key bind for this to happen without using the mouse?

@rbenson
Copy link

rbenson commented Mar 18, 2019

@alexdreptu the default has been ctrl+k ctrl+i since I have known about it, a year+. Focus has never been given to the pop-up.

@alexdreptu
Copy link

@rbenson yes but you could close it using Esc, now there is no way to close it without using the mouse.

@dorian-marchal
Copy link

dorian-marchal commented Apr 4, 2019

Is their a workaround to scroll the hover tooltip without the mouse, currently?
Maybe there is a way to let it take more space, so the scrolling is not necessary in most cases?

@alexdima alexdima added this to the Backlog milestone Apr 29, 2019
@alexdima alexdima removed their assignment Apr 29, 2019
@JUD210
Copy link

JUD210 commented Jul 4, 2019

I can't understand why this topic is abandoned.
Is it impossible or not necessary? hmm...

@JUD210
Copy link

JUD210 commented Jul 4, 2019

As a Keyboard shortcut addictive user, If this feature is added, It would be really enjoyable.
Maybe later my skill goes up, I should contribute.

@hasrthur
Copy link

Is there any progress on this?

1 similar comment
@stania
Copy link

stania commented Jun 17, 2020

Is there any progress on this?

@anunezmartinez
Copy link

Same problem here :(

@bheadwhite
Copy link

@alexdima @akshaal @sandy081 ^^ any life or possibilities here?

@kohane27
Copy link

kohane27 commented Jul 18, 2020

It would be very nice (especially for vscodevim users) if vscode adds keyboard shortcut support API for scrolling up and down the content in the hover.

@papey
Copy link

papey commented Aug 1, 2020

I also want this feature, tell me if I can help on something. For now I have configured my keyboard (ErgoDox) to simulate mouse wheel up and down, that's odd.

@Radrahil
Copy link

Sure, in 5 years. If only neovim had more plugins...

@THOUSAND-SKY
Copy link

Is this something that someone w/ zero knowledge of the vscode code base could fix in reasonable time?

Has anyone looked into the problem? Would definitely need some pointers before even attempting.

@Tantol
Copy link

Tantol commented Jan 21, 2023

God help us

@SheryConcepts
Copy link

I spent 1 hour trying to come with a solution but sadly. I still need to use mouse.

What functionality is used to scroll with mouse? If we can detect that, then we can map that to keybiindings

@SheryConcepts
Copy link

There should be some api to jump in and out of "hover widget" when we are in hover widget treat like a normal editor..?????

@milanglacier
Copy link

milanglacier commented Feb 21, 2023 via email

@aiday-mar
Copy link
Contributor

aiday-mar commented Mar 7, 2023

Hi all, thank you all for your patience. A PR will soon be merged to solve this issue, which you may track here: #176057. Thank you all for your participation and we apologize for the development delay.

@vscodenpa vscodenpa added unreleased Patch has not yet been released in VS Code Insiders insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Mar 8, 2023
@heartacker
Copy link
Contributor

can anybody tell me how to use this,
I tap ctrl+k ctrl+i, and nothing changed

@aiday-mar
Copy link
Contributor

aiday-mar commented Mar 10, 2023

Hi @heartacker, thanks for commenting. Are you on VS Code or VS Code Insiders? The feature will come out in the stable build next month but is already available in Insiders.

You may also be experiencing this due to a regression that is fixed here: #176740. Let me know when the new Insiders build of VS Code comes out, by tomorrow, if you are still experiencing issues.

@heartacker
Copy link
Contributor

heartacker commented Mar 10, 2023

@aiday-mar thanks and the latest version work now

but there are some questions and suggestion

  1. ctrl+k ctrl+i to pin the hover context and tap again, we should unpin the hover. maybe that is great
  2. when hover is pin, we tap Esc to exit the hover, but we lost the focus from that word.
  3. when editor.action.triggerParameterHints is showed, it doesn't work even we have pinned the hover
  4. we could not scroll Horizontally with or

image

@heartacker
Copy link
Contributor

heartacker commented Mar 10, 2023

bother again, :D

  1. maybe we could keep the hover pined unless we unpin them. now when we pin the hover and we use mouse to focus another word, the pined-hover disappeared, maybe we should keep the hover pined and easy to show hover-context of another word
  2. and a pin/unpin icon to right corner is best. like this ↓
    image
  3. when hover is pined, the only thing is we can scroll the context, and can we add the ability the copy the text? :), when the hover pined,
  • we could use ctrl + ↑ ↓ ← → to move the cursor and use shift + ↑ ↓ ← → to select the text and the we could copy them.
  • or we should use ctrl + ↑ ↓ ← → to scroll and the use ↑ ↓ ← → to move cursor,and use shift + ↑ ↓ ← → to select the text and the we could copy them. let the hover act like a readonly editor 😍
  • Of course, it would be nice if there was a better solution。

I want to copy that binary string
image

@benedictSchurwanz
Copy link

There is a setting Editor > Hover: Sticky, "Controls whether the hover should remain visible when mouse is moved over it."

Turn that on, and you can move your mouse onto the tooltip, and scroll it.

@heartacker
Copy link
Contributor

There is a setting Editor > Hover: Sticky, "Controls whether the hover should remain visible when mouse is moved over it."

Turn that on, and you can move your mouse onto the tooltip, and scroll it.

no , that is not my meaning, the situation is that when the hover is pinned and when we use mouse to click other words, the hover still be show and DO be pinned

@aiday-mar aiday-mar added verification-needed Verification of issue is requested and removed verification-needed Verification of issue is requested labels Mar 20, 2023
@rami3l
Copy link

rami3l commented Mar 31, 2023

Hi there! I'm glad to see this feature landing in the March 2023 update.

However, as I use the vim plugin, I actually use normalModeKeyBindings* in settings.json to control the hover, like so:

"vim.normalModeKeyBindingsNonRecursive": [
    {
      "before": ["K"],
      "commands": ["editor.action.showHover"]
    },
]

Now that the description of the command has been changed to Show or Focus Hover, I'd expect hitting K twice will give me the ability to move up/down in the hover, however it seems to me that the hover is never focused...

I'm not sure if this is the right place to report. If needed, I can definitely open a new issue at https://github.com/VSCodeVim/Vim. (Issue already open at VSCodeVim/Vim#3740.)

@Voronar
Copy link

Voronar commented Apr 3, 2023

As @heartacker mentioned moving cursor around inside popup and selecting text with it would be very handy.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
editor-hover Editor mouse hover feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders on-testplan
Projects
None yet
Development

Successfully merging a pull request may close this issue.