Skip to content

Hide pointer while typing #230

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

Closed
ProgerXP opened this issue Jul 9, 2019 · 14 comments
Closed

Hide pointer while typing #230

ProgerXP opened this issue Jul 9, 2019 · 14 comments
Assignees

Comments

@ProgerXP
Copy link
Owner

ProgerXP commented Jul 9, 2019

Windows Control Panel has an option in Mouse Properties > Pointer Options called Hide pointer while typing (enabled by default). For some reason, it doesn't work with Notepad2 or Notepad++. The strangest thing is that if you open a Find dialog and start typing there - the pointer will be hidden. But it isn't hidden while typing in the main window.

I've also noticed that in Firefox cursor isn't hidden in any part of its window but in Gvim on Windows it is hidden properly. So it seems like a program-specific quirk, maybe even Scintilla-specific.

@cshnik
Copy link
Collaborator

cshnik commented Jul 24, 2019

Done.

@cshnik cshnik assigned ProgerXP and unassigned cshnik Jul 24, 2019
@ProgerXP
Copy link
Owner Author

Windows doesn't hide the cursor by default? Do we really need to manually track mouse movements and key presses? Is it a recommended way you've found somewhere?

Also, why the counter is needed?

@cshnik
Copy link
Collaborator

cshnik commented Jul 24, 2019

@ProgerXP
Copy link
Owner Author

Wow, I've never heard of this story. I was sure this setting was enforced by the default window proc. No wonder it's rarely working.

@ProgerXP
Copy link
Owner Author

This works for the main textarea but do you know why Hide pointer while typing is not respected for other input fields? As I've written in the first post:

if you open a Find dialog and start typing there - the pointer will be hidden

But it's even hidden when the setting is disabled.

@ProgerXP ProgerXP removed the bug label Jul 25, 2019
@cshnik
Copy link
Collaborator

cshnik commented Jul 31, 2019

Specified behavior implemented in the Windows OS code responsible for standard input fields/edit controls. While Scintilla editor is a custom control which is not an edit based one.

@ProgerXP
Copy link
Owner Author

ProgerXP commented Aug 5, 2019

Issue: the pointer remains hidden when a (modal) dialog appears. For example, start typing and then press Ctrl+O - you'll have no cursor in the file open dialog.

I think the text area should listen for focus-lost event in addition to mouse-move.

@ProgerXP ProgerXP assigned cshnik and unassigned ProgerXP Aug 5, 2019
cshnik added a commit that referenced this issue Aug 13, 2019
@cshnik
Copy link
Collaborator

cshnik commented Aug 13, 2019

Fixed.

@ProgerXP
Copy link
Owner Author

ProgerXP commented Sep 10, 2021

  1. Hide pointer on arrow keys (navigation) as well. Ideally it should be hidden on any keyboard interaction in the text area rather than WM_CHAR.
  2. Bug: pointer is not shown if it's being moved over the toolbar, statusbar or sub-dialogs. For example, open Find, focus the main window, move pointer to be on top of Find, type something - pointer is hidden but if you move it, it won't appear unless you move it outside of Find's borders into the main window's text area. This might be related to Pointer remains hidden when moving cursor over window caption #314.

@ProgerXP ProgerXP reopened this Sep 10, 2021
@ProgerXP ProgerXP assigned cshnik and unassigned ProgerXP Sep 10, 2021
cshnik added a commit that referenced this issue Nov 29, 2021
@cshnik
Copy link
Collaborator

cshnik commented Nov 29, 2021

Fixed.

@cshnik cshnik assigned ProgerXP and unassigned cshnik Nov 29, 2021
@ProgerXP
Copy link
Owner Author

ProgerXP commented Feb 8, 2022

  1. Pointer is correctly shown if you open Notepad2's dialogs (Alt+O, etc.) but if you make a new blank document and press Ctrl+O or Ctrl+S - the file dialog will have no pointer visible.
  2. Pointer must be shown when calling Launch > Shell Menu.
  3. ...and when starting to drag text. Test: select text, press and hold Ctrl, then mouse-down on the selection and start dragging - you won't see the cursor. However, if you first drag and then press Ctrl, the cursor is not hidden (correct).

@ProgerXP ProgerXP reopened this Feb 8, 2022
@ProgerXP ProgerXP assigned cshnik and unassigned ProgerXP Feb 8, 2022
cshnik added a commit that referenced this issue Aug 1, 2022
@cshnik
Copy link
Collaborator

cshnik commented Aug 1, 2022

  1. Pointer is correctly shown if you open Notepad2's dialogs (Alt+O, etc.) but if you make a new blank document and press Ctrl+O or Ctrl+S - the file dialog will have no pointer visible.

Cannot reproduce.

  1. Pointer must be shown when calling Launch > Shell Menu.

Fixed.

  1. ...and when starting to drag text. Test: select text, press and hold Ctrl, then mouse-down on the selection and start dragging - you won't see the cursor. However, if you first drag and then press Ctrl, the cursor is not hidden (correct).

Fixed.

@cshnik cshnik assigned ProgerXP and unassigned cshnik Aug 1, 2022
@ProgerXP ProgerXP assigned cshnik and unassigned ProgerXP Aug 1, 2022
@ProgerXP
Copy link
Owner Author

ProgerXP commented Aug 1, 2022

Cannot reproduce.

It's quite easy and the problem is again with holding down Ctrl (like in other 2 cases that you have fixed). Try this: press and hold Ctrl, observe that the cursor became invisible, then just press O or S (while holding Ctrl) and you will notice that the dialog has no cursor.

It's important that the document should not be changed because if a "Save?" message box is produced, the cursor will be shown and this bug won't trigger.

cshnik added a commit that referenced this issue Aug 1, 2022
@cshnik
Copy link
Collaborator

cshnik commented Aug 2, 2022

Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants