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

[Feature request] Hide cursor while typing #29351

Open
ajitid opened this issue Jun 23, 2017 · 25 comments
Open

[Feature request] Hide cursor while typing #29351

ajitid opened this issue Jun 23, 2017 · 25 comments
Labels
editor-core Editor basic functionality feature-request Request for new features or functionality
Milestone

Comments

@ajitid
Copy link
Contributor

ajitid commented Jun 23, 2017

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?

@vscodebot vscodebot bot added the editor label Jun 23, 2017
@alexdima alexdima added editor-core Editor basic functionality feature-request Request for new features or functionality labels Jun 27, 2017
@alexdima alexdima added this to the Backlog milestone Jun 27, 2017
@alexdima alexdima removed their assignment Jun 27, 2017
@victorz
Copy link

victorz commented Feb 26, 2018

I would really enjoy this feature.

@Gruntfuggly
Copy link

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
Copy link

That would be very handy!

@collegewap
Copy link

Even I would like this feature

@tobioye88
Copy link

Please add this feature

@basaran
Copy link

basaran commented Aug 19, 2020

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
Copy link

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

@klaykree
Copy link

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
Copy link

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 #79915 (comment)

@MichaelScoggins
Copy link

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
Copy link

manojbaishya commented Jun 26, 2021

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
Copy link

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

@duzhen1996
Copy link

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

@arttu-karpinlehto
Copy link

arttu-karpinlehto commented Oct 17, 2021

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
Copy link

dzgraphbed1 commented Oct 17, 2021

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
Copy link

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
Copy link

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

This comment has been minimized.

@h-h-h-h
Copy link
Contributor

h-h-h-h commented Apr 28, 2022

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
Copy link
Contributor

SharakPL commented Feb 25, 2023

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
Copy link

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
Copy link

EytanDn commented May 22, 2024

OH boy this is still open, 7 years later

@andriemc
Copy link

andriemc commented Aug 4, 2024

still looking for this, please add

@LogixTheDev
Copy link

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

(image)

Why VSCode doesn't? 😭

@alexdima any chance this will be enabled?

THIS! I was literally going to post this too (with the same screenshot, even!). It's crazy to me that Microsoft don't respect their own Operating System's design! This superfluous setting which has (afaicr) never worked should be removed, or better yet, implemented system-wide, and across all of Microsoft's software. This kind of thing should just be standard.

Slightly unrelated, but It's about time somebody goes through Windows with a fine-tooth comb and makes sure that there aren't all these loose ends from deprecated or never-implemented features lying around all over the place (and while they're at it, get rid of that ERROR_SUCCESS malarkey, too! What an oxymoron!)

@realMecoy
Copy link

On linux you can install a package called xbanish. To run it in vscode you must run it via terminal. Works perfectly. I'm not sure if this works on windows or mac though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor-core Editor basic functionality feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests