[feature-requests:#1561] Map invalid cursor to blank cursor.
Status: open
Group: Initial
Labels: scintilla mouse cursor hide
Created: Sat May 24, 2025 03:00 AM UTC by johnsonj
Last Updated: Sat May 24, 2025 03:00 AM UTC
Owner: johnsonj
Attachments:
Window::Cursor:invalid is visualized to blank cursor.
patch attached:
Sent from sourceforge.net because scintill...@googlegroups.com is subscribed to https://sourceforge.net/p/scintilla/feature-requests/
To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/scintilla/admin/feature-requests/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.
Why?
I'd like to implement noCursorTyping for Win, Gtk and Qt.
I find it is simple to implement the feature in Editor.cxx.
Attachments:
[feature-requests:#1561] Map invalid cursor to blank cursor.
Status: open
Group: Initial
Labels: scintilla mouse cursor hide
Created: Sat May 24, 2025 03:00 AM UTC by johnsonj
Last Updated: Sun May 25, 2025 12:16 AM UTC
Owner: johnsonj
Attachments:
There's quite a bit more code required to implement cursor hiding, including setting discovery as well as the additions inside Editor
.
[feature-requests:#1561] Map invalid cursor to blank cursor.
Status: open
Group: Initial
Labels: scintilla mouse cursor hide
Created: Sat May 24, 2025 03:00 AM UTC by johnsonj
Last Updated: Sun May 25, 2025 03:50 AM UTC
Owner: johnsonj
Attachments:
I have tried noCursurTyping feature of Win32 to be moved into Editor for supporting all platforms.
macOS gives no blank cursor.
This diff uses setHiddenUntilMouseMoves instead of custom blank cursor for macOS style
But I saw custom blank cursor with transparent image works perfect either.
Attachments:
[feature-requests:#1561] Map invalid cursor to blank cursor.
Status: open
Group: Initial
Labels: scintilla mouse cursor hide
Created: Sat May 24, 2025 03:00 AM UTC by johnsonj
Last Updated: Sun May 25, 2025 10:12 PM UTC
Owner: johnsonj
Attachments:
This doesn't unhide the cursor in as many circumstances as before since it requires that the mouse position really moved and Windows sends extra WM_MOUSEMOVE messages in some situations. For example, use Ctrl+Tab
to switch between documents and SciTE would previously reshow the cursor. With the patch, it doesn't.
https://devblogs.microsoft.com/oldnewthing/20031001-00/?p=42343
There's not much reason to protect the reset of cursorIsHidden
with if (typingWithoutCursor)
and it more likely to leave the cursor hidden when its not required.
[feature-requests:#1561] Map invalid cursor to blank cursor.
Status: open
Group: Initial
Labels: scintilla mouse cursor hide
Created: Sat May 24, 2025 03:00 AM UTC by johnsonj
Last Updated: Fri May 30, 2025 03:10 PM UTC
Owner: johnsonj
Attachments:
it works well on all platforms.
naming refined.
Attachments:
[feature-requests:#1561] Map invalid cursor to blank cursor.
Status: open
Group: Initial
Labels: scintilla mouse cursor hide
Created: Sat May 24, 2025 03:00 AM UTC by johnsonj
Last Updated: Sat May 31, 2025 01:44 AM UTC
Owner: johnsonj
Attachments:
For example, use Ctrl+Tab to switch between documents and SciTE would previously reshow the cursor. With the patch, it doesn't.
It still doesn't. In case I wasn't clear: the cursor should show when the document is switched. Hide-pointer-while-typing is a light, temporary convenience mode that should be abandoned whenever the use stops typing by performing a larger scope command.
hideCursor0601.diff
made the opposite to the wanted change. For Win32, it needs to set cursorIsVisible = true
on every WM_MOUSEMOVE
, even for the extra messages that did not really move the mouse since they indicate a major change to the window.
[feature-requests:#1561] Map invalid cursor to blank cursor.
Status: open
Group: Initial
Labels: scintilla mouse cursor hide
Created: Sat May 24, 2025 03:00 AM UTC by johnsonj
Last Updated: Sun Jun 01, 2025 01:52 PM UTC
Owner: johnsonj
Attachments:
Semantics changed: cursorIsHidden -> cursorIsVisible -> cursorIsIn
Win32 behaves as your instruction for ctrl+tab, ctrl+N and so forth.
Gtk does keep its cursor state as is.
I am not sure Qt and macOS since I have no tab-featured test application.
But I guess they also behaves as Gtk.
Attachments:
[feature-requests:#1561] Map invalid cursor to blank cursor.
Status: open
Group: Initial
Labels: scintilla mouse cursor hide
Created: Sat May 24, 2025 03:00 AM UTC by johnsonj
Last Updated: Sun Jun 01, 2025 10:12 PM UTC
Owner: johnsonj
Attachments:
Semantics changed: cursorIsHidden -> cursorIsVisible -> cursorIsIn
This change doesn't make sense to me: in what?
Win32 behaves as your instruction for ctrl+tab, ctrl+N and so forth.
It doesn't work for me in SciTE:
action | cursor |
---|---|
start | visible |
type 'a' | invisible |
Ctrl+Tab | invisible |
typingWithoutCursor
remains false forever except on Win32. Therefore it has no effect and is useless on other platforms. There has to be enabling code that can set it to true.
[feature-requests:#1561] Map invalid cursor to blank cursor.
Status: open
Group: Initial
Labels: scintilla mouse cursor hide
Created: Sat May 24, 2025 03:00 AM UTC by johnsonj
Last Updated: Tue Jun 03, 2025 12:26 PM UTC
Owner: johnsonj
Attachments:
I realize hidden cursor does not depend on visibility.
It depends on character added and whether in or out of edit pane.
(it triggers when character added and only if within edit pane.)
My plan is moving win32 code to Editor, so that make it work for all platforms.
I'd like to expose typingWithoutCursor to user option.
but I did not work on this yet.
Respond spurious event of mouse moving on win32
Ctrl+N, Ctrl+Tab etc revives cursor to be normal.
https://youtu.be/4itLcZUkN9o
Hide cursor while typing for scintilla on macOS
implemented with 16x16 transeparent PNG
https://youtu.be/dlh7dGbdfRo
[feature-requests:#1561] Map invalid cursor to blank cursor.
Status: open
Group: Initial
Labels: scintilla mouse cursor hide
Created: Sat May 24, 2025 03:00 AM UTC by johnsonj
Last Updated: Wed Jun 11, 2025 11:55 PM UTC
Owner: johnsonj
Attachments:
Sometimes it works but not other times.
https://www.youtube.com/watch?v=DnWpkmVeRpk
[feature-requests:#1561] Map invalid cursor to blank cursor.
Status: open
Group: Initial
Labels: scintilla mouse cursor hide
Created: Sat May 24, 2025 03:00 AM UTC by johnsonj
Last Updated: Thu Jun 12, 2025 09:47 AM UTC
Owner: johnsonj
Attachments:
Avoding spurious mouse move event on win32, I bind "cursorIsVisible" with keyboard modifiers. To my surprise, GTK can show cursor between tabs.
but I gave up mouse leave event, which is too elusive to catch.
Hide cursor while typing for scintilla on GTK
https://youtu.be/yQl-mf3XC9w
Attachments:
[feature-requests:#1561] Map invalid cursor to blank cursor.
Status: open
Group: Initial
Labels: scintilla mouse cursor hide
Created: Sat May 24, 2025 03:00 AM UTC by johnsonj
Last Updated: Thu Jun 12, 2025 10:53 PM UTC
Owner: johnsonj
Attachments:
That is flipping cursorIsVisible
on and off with WM_KEYDOWN
then WM_CHAR
for typing. Just holding down Shift
prior to typing a capital letter sets cursorIsVisible
. This is more difficult to understand than a mode that lasts from the user starting typing until moving the mouse or performing a command. It could result in spurious showing of the cursor in unexpected situations since cursorIsVisible
may be true when WM_SETCURSOR
is received.
It might be better to set cursorIsVisible
in Editor::SetDocPointer
as that occurs for some of the most important commands. There may be other circumstances that need setting cursorIsVisible
.
This feature still needs to define an API or access to system settings on non-Win32 platforms before there is a benefit to adding it.
[feature-requests:#1561] Map invalid cursor to blank cursor.
Status: open
Group: Initial
Labels: scintilla mouse cursor hide
Created: Sat May 24, 2025 03:00 AM UTC by johnsonj
Last Updated: Mon Jun 16, 2025 11:58 AM UTC
Owner: johnsonj
Attachments:
I managed to build scite working.
+ Set or Get whether hiding mouse cursor or not while typing text.
+ Blank cursor is set (hidden) when any character is typed in.
+ Either mouse moving or buffer switching restores cursor to be normal (shown).
Attachments:
[feature-requests:#1561] Map invalid cursor to blank cursor.
Status: open
Group: Initial
Labels: scintilla mouse cursor hide
Created: Sat May 24, 2025 03:00 AM UTC by johnsonj
Last Updated: Wed Jun 18, 2025 01:29 AM UTC
Owner: johnsonj
Attachments:
[feature-requests:#1561] Map invalid cursor to blank cursor.
Status: open
Group: Initial
Labels: scintilla mouse cursor hide
Created: Sat May 24, 2025 03:00 AM UTC by johnsonj
Last Updated: Sat Jun 21, 2025 10:17 AM UTC
Owner: johnsonj
Attachments:
With this change, typingWithoutCursor
will revert to the system setting every time WM_SETTINGCHANGE
is processed which may be for a wide range of conditions that occur during a run. This makes SCI_SETTYPINGWITHOUTCURSOR
unreliable on Windows.
There needs to be a clear plan on how to decide which source is authoritative: SCI_SETTYPINGWITHOUTCURSOR
or WM_SETTINGCHANGE.SPI_GETMOUSEVANISH
.
[feature-requests:#1561] Map invalid cursor to blank cursor.
Status: open
Group: Initial
Labels: scintilla mouse cursor hide
Created: Sat May 24, 2025 03:00 AM UTC by johnsonj
Last Updated: Sat Jun 21, 2025 10:20 AM UTC
Owner: johnsonj
Attachments:
I prefer SCI_SETTYPINGWITHOUTCURSOR.
Attachments:
[feature-requests:#1561] Map invalid cursor to blank cursor.
Status: open
Group: Initial
Labels: scintilla mouse cursor hide
Created: Sat May 24, 2025 03:00 AM UTC by johnsonj
Last Updated: Mon Jun 23, 2025 01:40 AM UTC
Owner: johnsonj
Attachments:
[feature-requests:#1561] Map invalid cursor to blank cursor.
Status: open
Group: Initial
Labels: scintilla mouse cursor hide
Created: Sat May 24, 2025 03:00 AM UTC by johnsonj
Last Updated: Mon Jun 23, 2025 02:45 PM UTC
Owner: johnsonj
Attachments:
That is removing functionality that is wanted by other users.
[feature-requests:#1561] Map invalid cursor to blank cursor.
Status: open
Group: Initial
Labels: scintilla mouse cursor hide
Created: Sat May 24, 2025 03:00 AM UTC by johnsonj
Last Updated: Mon Jun 23, 2025 02:47 PM UTC
Owner: johnsonj
Attachments:
[feature-requests:#1561] Map invalid cursor to blank cursor.
Status: open
Group: Initial
Labels: scintilla mouse cursor hide
Created: Sat May 24, 2025 03:00 AM UTC by johnsonj
Last Updated: Mon Jun 23, 2025 09:44 PM UTC
Owner: johnsonj
Attachments:
[feature-requests:#1561] Map invalid cursor to blank cursor.
Status: open
Group: Initial
Labels: scintilla mouse cursor hide
Created: Sat May 24, 2025 03:00 AM UTC by johnsonj
Last Updated: Tue Jun 24, 2025 11:48 AM UTC
Owner: johnsonj
Attachments:
Current behaviour should be preserved with cursor visible when typing as the default.
Even when I go to the Windows settings and turn off "Hide pointer while typing", it still disappears. There will be upset users if this implementation is committed.
[feature-requests:#1561] Map invalid cursor to blank cursor.
Status: open
Group: Initial
Labels: scintilla mouse cursor hide
Created: Sat May 24, 2025 03:00 AM UTC by johnsonj
Last Updated: Tue Jun 24, 2025 11:49 AM UTC
Owner: johnsonj
Attachments:
[feature-requests:#1561] Map invalid cursor to blank cursor.
Status: open
Group: Initial
Labels: scintilla mouse cursor hide
Created: Sat May 24, 2025 03:00 AM UTC by johnsonj
Last Updated: Wed Jun 25, 2025 10:31 PM UTC
Owner: johnsonj
Attachments:
[feature-requests:#1561] Map invalid cursor to blank cursor.
Status: open
Group: Initial
Labels: scintilla mouse cursor hide
Created: Sat May 24, 2025 03:00 AM UTC by johnsonj
Last Updated: Thu Jun 26, 2025 11:44 AM UTC
Owner: johnsonj
Attachments:
To avoid changing behaviour unexpectedly, SciTE should also default to no hiding or to hiding only on Win32.