microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
160.88k stars 28.23k forks source link

[Feature request] Hide cursor while typing #29351

Open ajitid opened 7 years ago

ajitid commented 7 years ago

https://superuser.com/questions/928839/what-does-the-hide-pointer-while-typing-feature-actually-do

Can we get this as an option in VS Code?

victorz commented 6 years ago

I would really enjoy this feature.

Gruntfuggly commented 6 years ago

I'd like this too.

In the short term, I've just knocked this up: https://marketplace.visualstudio.com/items?itemName=Gruntfuggly.banish-pointer

Not quite the same thing, but it might be better than nothing.

mgsergio commented 4 years ago

That would be very handy!

collegewap commented 4 years ago

Even I would like this feature

tobioye88 commented 4 years ago

Please add this feature

basaran commented 3 years ago

You can use a free 3rd party utility called AutoHideMouseCursor that will not only hide the cursor for vscode, but over the entire OS. Quite handy. I found it after finding this thread. It would basically, just hide the mouse on inactivity for a predefined time.

mankinskin commented 3 years ago

Dude how is this still not implemented. This is mandatory for any serious code editor! Terrible..

klaykree commented 3 years ago

I tried looking into adding this but as far as I can tell there is no way to hide the cursor with Nodejs or Electron. It would be possible by calling the OS functions to hide/show the cursor, like this package does https://www.npmjs.com/package/hide-cursor. But I dont know the protocol for adding dependencies to this project.

Another possibility is using document.body.style.cursor = 'none'; but when I tried this it would only hide the cursor in areas other than the text editor area (the document I was altering had "workbench" in its name). So maybe someone more familiar with the project will know how to get the correct document to be able to apply the 'none' cursor style.

manojbaishya commented 3 years ago

There was another issue filed with a relevant chromium bug report.

Gif demo of Notepad behaviour regarding mouse cursor:

typing-notepad

Originally posted by @alexdima in https://github.com/microsoft/vscode/issues/79915#issuecomment-525338610

MichaelScoggins commented 3 years ago

vs code, and just plain microsoft windows (this doesn't even work in the OS for tons of users) should figure this out. it's a very common situation for a user to click a spot to edit text and start typing right in the spot they last had their cursor. it's probably in the hundreds of times or more that i obscured a letter as i typed with no way to verify the word(s) without moving my mouse out of the way.

otherwise all <3

manojbaishya commented 3 years ago

You can use a free 3rd party utility called AutoHideMouseCursor that will not only hide the cursor for vscode, but over the entire OS. Quite handy. I found it after finding this thread. It would basically, just hide the mouse on inactivity for a predefined time.

Thanks a lot! On Linux, a similar utility is available called unclutter that hides the pointer system-wide.

$ sudo apt-get install unclutter
$ unclutter -idle 1 -root # for hiding after a one-second delay

AskUbuntu Answer Ubuntu Manpages ArchWiki

mankinskin commented 3 years ago

@manojbaishya True, there is also xbanish if you want to hide the cursor on keyboard input.

duzhen1996 commented 3 years ago

@basaran very useful suggestion!!!!!!! This problem make me annoyed for a long time, my God.

arttu-karpinlehto commented 2 years ago

Please add this feature to vscode. I use a large, coloured mouse pointer and it effectively hides multiple characters, typically exactly where I want to type. I tried the banish-pointer extension but it somehow corrupts the non-standard pointer.

dzgraphbed1 commented 2 years ago

Please add this feature to vscode. I use a large, coloured mouse pointer and it effectively hides multiple characters, typically exactly where I want to type. I tried the banish-pointer extension but it somehow corrupts the non-standard pointer.

@arttu-karpinlehto

hello, I use a system level software to do this. And it works well.

https://www.softwareok.com/?seite=Microsoft/AutoHideMouseCursor

arttu-karpinlehto commented 2 years ago

Hi @dzgraphbed1 , in fact I tested that too and I was wrong in my previous comment, it is the AutoHideMouseCursor that corrupts the mouse pointer. I prefer an integrated solution, and only in VSCode.

Apologies to @Gruntfuggly , the banish-pointer extension works fine on VSCode, I just got these two solutions mixed up when testing them.

anrisovich commented 2 years ago

I'd like this too.

In the short term, I've just knocked this up: https://marketplace.visualstudio.com/items?itemName=Gruntfuggly.banish-pointer

Not quite the same thing, but it might be better than nothing.

### Cool! Exactly what is needed!

0054 commented 2 years ago

Add this feature pls + 100500

h-h-h-h commented 2 years ago

Instead of @Gruntfuggly's banish-pointer extension's mouse cursor action moveBy -30x-30, what would be needed is a call to WinAPI's ShowCursor(FALSE). However, you'd need to call ShowCursor(TRUE) as soon as the mouse cursor is moved. I don't know whether this is possible without a mouse hook. Even if VS Code informs an extension about a mouse movement anywhere on the window, leaving the window like with Alt+Tab must not keep the cursor hidden. One could listen to OS WM_... mouse events including WM_MOUSELEAVE (does it react on leaving via Alt+Tab?). Listen to the events of the parent VS Code process's window (may there be multiple?) including it's crashing to never keep the cursor hidden.

The best would of course be, if the mouse cursor could be hidden via regular browser means by VS Code.

SharakPL commented 1 year ago

Most Windows apps like Notepad, WordPad, Windows Terminal and even Paint do respect this mouse option:

obraz

Why VSCode doesn't? 😭

@alexdima any chance this will be enabled?

diegodario88 commented 7 months ago

I would like to see this feature in VSCode. It seems that every text editor has this functionality, and it appears to be a standard feature in these types of applications.

EytanDn commented 2 months ago

OH boy this is still open, 7 years later