Support Windows' "Hide pointer while typing" system setting to hide the mouse pointer
Categories
(Core :: Widget: Win32, enhancement, P3)
Tracking
()
People
(Reporter: cpeterson, Assigned: handyman)
References
Details
Attachments
(2 files)
Windows has a "Hide pointer while typing" setting buried deep in its system settings, but it only works in applications that check the setting. The only Windows apps I've found that honor the setting are Notepad and WordPad. macOS hides the mouse pointer by default for all applications.
https://www.tenforums.com/tutorials/101591-turn-off-hide-pointer-while-typing-windows.html
As someone who spends most of my workdays editing Google Docs and spreadsheets in Firefox, hiding the mouse pointer would be very nice. When I click to set focus in a doc and start typing, the cursor and text are obscured by the mouse pointer (because that's where I just clicked focus).
The setting can be accessed via SystemParametersInfo
, specifically SPI_GETMOUSEVANISH
:
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-systemparametersinfow
I don't know if "Hide pointer while typing" setting is enabled by default. The setting probably exists for disable pointer hiding for backwards compatibility with some applications. Maybe we could implement the mouse pointer hiding, regardless of the "Hide pointer while typing" setting (since so few users will know about it).
Updated•3 years ago
|
Assignee | ||
Comment 1•3 years ago
|
||
Judging from this patch for this in Windows terminal, we don't need to expect surprises here. We could just call ShowCursor(FALSE)
on a keypress message and ShowCursor(TRUE)
on a mouse event or window deactivation. Even our current cursor hiding isn't a concern since it uses an entirely different mechanism -- we are showing a transparent arrow for cursor: none
instead of hiding the cursor. The current fullscreen handler would mix with it but I'm sure that the cursor reappearing when we switch to fullscreen wouldn't be an issue.
Assignee | ||
Comment 2•3 years ago
|
||
We need to hide the pointer when we detect a keypress and unhide it when we get any mouse event or window deactivation. We only do this if the Windows "Hide pointer while typing" setting is turned on (it is on by default). We currently also put this behind the Firefox pref "widget.windows.hide_cursor_when_typing".
Updated•3 years ago
|
Assignee | ||
Comment 4•3 years ago
|
||
(In reply to Chris Peterson [:cpeterson] from comment #0)
The "Hide pointer while typing" setting is disabled by default, probably to avoid breaking backwards compatibility with some applications. Maybe we could implement the mouse pointer hiding, regardless of the "Hide pointer while typing" setting (since so few users will know about it).
I think this is on by default. This is on on two of my machines (Windows 10). I suppose its possible that I set it on both but, since I didn't know it existed, that seems unlikely.
Comment 5•3 years ago
|
||
Thanks David Parks [:handyman] for checking relevant reports.
I'd like to refer to my previous comment on this matter: Bug 489407 Comment #4
I'm still on X11 waiting for an implementation of this. Thank you.
Assignee | ||
Comment 6•3 years ago
|
||
Thanks for the report Gyorgy. These bugs are for Windows. I don't know if this is an issue that we currently have a Linux bug for but I don't immediately see one. You may want to track one down or file a new one if you can't find any.
It looks like the Mac already does this with [NSCursor setHiddenUntilMouseMoves]
Reporter | ||
Comment 7•3 years ago
|
||
Jamie: you, or someone on the Accessibility team with Windows experience, might want to review this patch. Could hiding the mouse pointer when the user starts typing cause problems for accessibility software?
Comment 8•3 years ago
|
||
I can't think of any a11y concerns here. I guess the mouse pointer disappearing could perhaps be a concern for some users with cognitive disabilities, though moving the mouse will immediately bring it back. Also, a user can disable it with the Windows setting if they need to.
It's worth noting that the setting is difficult to find; it isn't available in the modern Settings app yet, so you can't, for example, search for "hide pointer". Thus, to be safe, if we do enable this by default at some point, we should keep the pref around for a while just in case we get a bunch of users who are hurt by this and they have trouble finding the Windows setting.
Comment 10•3 years ago
|
||
bugherder |
Should this be in about:preferences#experimental
?
Reporter | ||
Comment 12•3 years ago
|
||
I've been testing widget.windows.hide_cursor_when_typing
for a few days now and haven't found any bugs besides the minor issues already reported in bug 1759558.
Assignee | ||
Comment 13•3 years ago
|
||
(In reply to Kagami :saschanaz from comment #11)
Should this be in
about:preferences#experimental
?
I think we're just going to turn it on and let it ride the trains. After playing with it, it doesn't look like it has any serious edge cases. I'd like to deal with the things in bug 1759558 first but they are minor and not important.
Assignee | ||
Comment 15•2 years ago
|
||
Due to issues like bug 1774453, we turned off the support by default. We can turn it back on if we address the issues there -- essentially, it needs to be DOM aware and probably limited to use with the proper inputs, like text fields.
Comment 16•2 years ago
|
||
This only hides the cursor if it's on the page you're editing, but given
that the point of the feature is to move the cursor out of the way, that
seems acceptable (and honestly it feels more of a feature than a bug).
This should work across platforms (though non-windows platforms need
ui.hideCursorWhileTyping=1 in about:config to enable).
Comment 17•1 year ago
|
||
I forgot why I never landed this.
Comment 18•1 year ago
|
||
Comment 19•1 year ago
|
||
Comment 20•1 year ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/f6df025bb64c
https://hg.mozilla.org/mozilla-central/rev/8934e6e6ccb6
Updated•1 year ago
|
Comment 21•1 year ago
|
||
Release Note Request (optional, but appreciated)
[Why is this notable]: Implements a Windows setting that is turned on by default.
[Affects Firefox for Android]: No
[Suggested wording]: Mouse cursor will now disappear when typing on Windows if the relevant system setting says so.
[Links (documentation, blog post, etc)]: See comment 0
Comment 22•1 year ago
|
||
Added a slightly reworded note to the Fx119 Nightly release notes. Keeping the relnote? flag open to keep it on the radar for inclusion in our final release notes.
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Description
•