Also allow hiding the mouse on using arrow keys or backspace (non-modifier non-character keys) #2538
Replies: 2 comments 2 replies
-
I converted this to a discussion since it is a suggestion rather than an accepted feature. Hm, I can see the desire. I think a more interesting design approach might be to hide the mouse if it contains text or if key encoding results in non-empty data sent to the pty. This latter condition would allow arrow keys as you desire to hide the mouse since they encode. I have a memory that I tried this before but I can't fully remember if that's true or why I didn't continue with it. |
Beta Was this translation helpful? Give feedback.
-
A little more context for MacOS: The pointer hides on motion key press (arrows, pg up/dn, home/end) in many "well-known" editors and many other apps for ex: Apple Pages, TextMate, BBEdit, Safari, etc. Pointer generally hides on modified motion key press as well (Ctrl or Opt + arrows etc). In Apple Numbers (spreadsheets), the pointer does not hide for arrow motion, maybe intentional for spreadsheet use-cases, not sure. Function keys: in Mac GUI apps these generally do not hide the pointer, but they DO in Terminal.app. Believe this would be beneficial in a terminal app since function keys are fairly frequently used in tui apps (Midnight Commander etc) and also frequently useful in bindings in editors such as Helix for motion, editing, or other app actions. There are here & there "funny" exceptions (some probably bugs/unintentional), for ex. TextMate does not hide the pointer for Ctrl+ Left/Right arrow. Safari does not hide the pointer on Pg Up if the page is already at the top, or for Pg Dn if the page is already at the bottom, but DOES hide the pointer for up arrow at the top and down arrow at the bottom (huh). On Mac, the pointer generally does not hide on pressing modifiers alone (S/C/A/Cmd). Despite some of these inconsistencies, believe it makes sense to hide the pointer for motion keys and function keys. And for any modifier combos (S/C/A/Cmd in any mix) with motion keys and function keys as well, because there are many common bindings and custom bindings that use modified motion keys and function keys for moving in modified ways (for ex. Cmd + L/R to move to the beginning/end of a line) or for various app actions. More simply, the pointer should hide if a motion key or function key is pressed either alone or as part of any combo. It should also hide for Backspace & Delete ofc, bc these are actual typing/editing keys. Benefit - when using shell, editors, or tui apps, it's a normal desire to get rid of the pointer blocking the user's view, when the user uses any motion keys and in some apps function keys as well. In some apps (tui file managers, tui info apps for ex), the motion keys frequently dominate usage, and the mouse pointer should go away when using these apps in this common mode. Even if "hide pointer" for motion keys and function keys is not the Ghostty default, would abs be great to have the ability to enable this. |
Beta Was this translation helpful? Give feedback.
-
mouse-hide-while-typing = true
is a great feature. However I would like it to also hide the mouse when using the arrow keys. I don't know if other people would like that behavior so maybe it might be better to make an extra option for it instead of adding it to themouse-hide-while-typing
option.What do you think?
Beta Was this translation helpful? Give feedback.
All reactions