Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Hide mouse cursor when typing #618

Closed
gwww opened this issue Apr 2, 2021 · 10 comments
Closed

Hide mouse cursor when typing #618

gwww opened this issue Apr 2, 2021 · 10 comments
Labels
enhancement New feature or request fixed-in-nightly This is (or is assumed to be) fixed in the nightly builds.

Comments

@gwww
Copy link
Contributor

gwww commented Apr 2, 2021

Hide the mouse cursor if no movement and type a character in wezterm.

@gwww gwww added the enhancement New feature or request label Apr 2, 2021
wez added a commit that referenced this issue Apr 3, 2021
Mouse movement will show the cursor again.

macOS: fix hiding the cursor

refs: #618
@wez wez added the fixed-in-nightly This is (or is assumed to be) fixed in the nightly builds. label Apr 3, 2021
wez added a commit that referenced this issue Apr 3, 2021
@gwww
Copy link
Contributor Author

gwww commented Apr 3, 2021

I have tested and works as expected. Thank you!

@gwww gwww closed this as completed Apr 3, 2021
@SuperSandro2000
Copy link
Contributor

Can this be turned off? I always loose my cursor when it is hidden.

@gwww
Copy link
Contributor Author

gwww commented Apr 7, 2021

I'm finding this functionality buggy. I have not been able to pinpoint it but what happens is that the cursor turns off and will not turn back on until I click outside of wezterm window. Moving the mouse, inside or outside, of wezterm does not turn it on. Clicking inside of wezterm does not turn it on. Only clicking outside of wezterm will get it to turn back on.

This happens multiple times per day but I have found "the" sequence to make it always happen.

@wez wez reopened this Apr 10, 2021
@wez
Copy link
Owner

wez commented Apr 10, 2021

@gwww are you on macOS?

@gwww
Copy link
Contributor Author

gwww commented Apr 10, 2021

Yes, macOS, 11.1

@SuperSandro2000
Copy link
Contributor

I also noticed that when selecting text through tmux the cursor disappears and reappears every time I hold shift and move my cursor.

wez added a commit that referenced this issue Apr 10, 2021
NSCursor hide/unhide must be perfectly balanced otherwise
the cursor can vanish unexpectedly when the mouse leaves
the window, and not come back.

So, let's use NSCursor:setHiddenUntilMouseMoves instead; it's
not 100% fulfilling the promise of the API, but it's close enough
and should avoid the permanent invisibility issue.

refs: #618
@gwww
Copy link
Contributor Author

gwww commented Apr 11, 2021

I'm using the nightly with this fix and it is working properly so far.

@wez wez closed this as completed in d5886e6 Apr 15, 2021
@ram02z
Copy link

ram02z commented May 3, 2021

Has this been implemented on wayland?

@wez
Copy link
Owner

wez commented May 3, 2021

@ram02z not yet. Wayland support is difficult because it is incompatible with my nvidia hardware. If you're in a position to have a go at implementing this feature on Wayland, I'd be happy to take a PR for it!

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2023

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 4, 2023
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
enhancement New feature or request fixed-in-nightly This is (or is assumed to be) fixed in the nightly builds.
Projects
None yet
Development

No branches or pull requests

4 participants