Prevent mouse cursor from showing on short, unintentional flicks - #8508
Conversation
|
Rather than making these new options, make mouse_hide_wait take optional extra fields. You can do that by changing option_type to a custom function defined in options/utils.py and similarly adding a function to to-c.h and setting ctype to !c_function_name. Also in Options use an anonymous struct to group these settings together. |
|
Thanks for your quick response! I've made the changes you mentioned, see if that's right? |
…optional parameters for struct. mouse_show_* renamed to mouse_unhide_*
|
Looks generally OK after a quick once over will review in detail when I have some time. |
|
Hi, I see that in your cleanup commit 3d440cf you replaced the |
|
yup, sorry, typo. fixed. |
I use kitty daily, and hiding the mouse in my terminal helps my focus a lot. Currently, kitty always shows the mouse cursor immediately after I move the mouse, even if it happens due to unintentional flicks on my trackpad, breaking my focus.
In this patch, I've added three new options
mouse_show_wait,mouse_show_threshold, andmouse_scroll_show.mouse_show_waitcontrols how long to wait before mouse activity is treated an intentional,mouse_show_thresholdcontrols the threshold to treat mouse activity as intentional, andmouse_scroll_showcontrols whether mouse scrolls trigger unhiding the mouse cursor. The current behaviour can be recovered by settingmouse_show_waitto 0, and is configured to be the default.