In Notepad++ usage of Scintilla, my Windows 10 mouse options choice for "Hide pointer while typing" isn't respected when the mouse cursor and keyboard input focus is in a Scintilla control/window. Some further discussion is located here: https://community.notepad-plus-plus.org/topic/23017/mouse-cursor-visibility-when-typing-starts
The same happens in SciTE 5.2.2, so it's not just Notepad++'s usage of the library.
Inspired from sakura editor.
patch added:
Respect SPI_GETMOUSEVANISH from OS
SPI_GETMOUSEVANISH sets a
BOOL(4 bytes), not abool(1 byte).RequestShowCursordoesn't need to callDisplayCursoras the cursor will be set in soon-to-be-calledButtonMoveWithModifiersand there could be flicker if set twice. ThereforeRequestShowCursorcan just beisCursorHidden = false;.how about move
SystemParametersInfoW(SPI_GETMOUSEVANISH, ...intoGetIntelliMouseParameters()?A function Shoud have only one function according its name.
GetMouseParametersorGetSystemParameters.Committed as [5bd06e] with some name changes:
TypingWithoutCursor -> HideCursorIfPreferred
typingWithoutCursorByOS -> typingWithoutCursor
isCursorHidden -> cursorIsHidden
Related
Commit: [5bd06e]
It seems this needs further works: in Windows Notepad deleting character (e.g. with Backspace) mouse is still hidden.Edit: It's my fail on sync the patch for
case WM_CHAR:.Last edit: Zufu Liu 2023-06-11
code simplified.
easier reading!
Last edit: johnsonj 2025-05-21
That doesn't work for me. The cursor flickers for the first character typed then switches to the arrow on the next.
Thank you for your testing.
I am sorry I did not catch it.
patch attached:
By placing the cursor hiding inside
WM_KEYDOWNthe cursor is hidden for arrow movement and other keyboard commands. The "Hide pointer while typing" option is only meant for typing visible characters as demonstrated by Notepad and edit fields in system dialogs.In the code
NULLis strongly disliked by code checking tools and comparing aHCURSORtonullptris also iffy so its best to rely on the falsy value of HCURSOR{} with a bareif (::GetCursor()).Thank you for your instructions.
Gtk patch attached according your instructions.
This doesn't appear to be checking the system for the equivalent to the "hide pointer while typing" choice
SPI_GETMOUSEVANISH.I appreciate you for your hard works.
I submit a patch for Qt.
Setting a global override cursor seems too likely to interfere with other elements of the application. It may be safer to set the cursor for the window as is done by
Window::SetCursorcallingQWidget::setCursorinqt/ScintillaEditBase/PlatQt.cpp.Despite having system settings support for "Hide pointer while typing", it is not commonly implemented on Windows. Even Microsoft products like Visual C++ and OneNote do not have it. Since it is unusual on Windows, it shouldn't be active unless the option has ben chosen but this Qt patch turns it on without checking the option.