Bug 432927

Summary: Implement "shake to find" (like in macOS) for Track mouse
Product: [Plasma] kwin Reporter: Dan Dascalescu <ddascalescu+kde>
Component: effects-variousAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist CC: ashark, jphands, kde, nate, ngompa13, tetrao
Priority: NOR    
Version: 5.18.5   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 6.0

Description Dan Dascalescu 2021-02-14 10:57:56 UTC
The Track Mouse effect is very useful on large screens, but also hard to discover (https://www.reddit.com/r/kde/comments/k7clw1/concentric_rotating_circles_appear_when_you_press/ges6ae9/).

How about triggering the effect when the mouse is moved rapidly in an "agitated" back and forth (or figure 8/infinity) pattern, without the user having to hold any modifier keys? macOS does this.

Not sure what false positives might look like (games?), but if none, the effect could be enabled by default. I know I've been missing it for years too (and would right click to see what popper up) until I discovered the setting.
Comment 1 Dan Dascalescu 2021-02-14 11:01:06 UTC
This macOS accessibility feature is called "shake to find" and was introduced in OS X El Capitan.

Windows has it too - https://github.com/microsoft/PowerToys/issues/131#issuecomment-497291827

Source code for an alternative implementation - https://spinalcode.co.uk/2018/11/06/windows-shake-to-find-cursor/
Comment 2 Nate Graham 2021-02-19 22:02:39 UTC
Heh yeah, I think GNOME does too at this point.
Comment 3 Nate Graham 2023-11-27 15:42:49 UTC
*** Bug 448634 has been marked as a duplicate of this bug. ***
Comment 4 Nate Graham 2023-11-27 15:42:52 UTC
*** Bug 468968 has been marked as a duplicate of this bug. ***
Comment 5 Nate Graham 2023-11-27 15:43:15 UTC
In progress with https://invent.kde.org/plasma/kwin/-/merge_requests/4713!
Comment 6 Vlad Zahorodnii 2023-11-28 16:43:37 UTC
Git commit 831064f351e310afe50dc7cdf11b9aac3ce9cfc7 by Vlad Zahorodnii.
Committed on 28/11/2023 at 17:36.
Pushed by vladz into branch 'master'.

plugins: Add shakecursor plugin

This plugin helps you locate the cursor by enlarging it when the pointer
is quickly moved back and forth.

M  +1    -0    src/plugins/CMakeLists.txt
A  +17   -0    src/plugins/shakecursor/CMakeLists.txt
A  +18   -0    src/plugins/shakecursor/main.cpp     [License: GPL(v2.0+)]
A  +9    -0    src/plugins/shakecursor/metadata.json
A  +195  -0    src/plugins/shakecursor/shakecursor.cpp     [License: GPL(v2.0+)]
A  +65   -0    src/plugins/shakecursor/shakecursor.h     [License: GPL(v2.0+)]
A  +18   -0    src/plugins/shakecursor/shakecursorconfig.kcfg
A  +8    -0    src/plugins/shakecursor/shakecursorconfig.kcfgc
A  +85   -0    src/plugins/shakecursor/shakedetector.cpp     [License: GPL(v2.0+)]
A  +43   -0    src/plugins/shakecursor/shakedetector.h     [License: GPL(v2.0+)]

https://invent.kde.org/plasma/kwin/-/commit/831064f351e310afe50dc7cdf11b9aac3ce9cfc7
Comment 7 Nate Graham 2023-12-02 04:37:16 UTC
Note that for now the feature is off by default and must be manually enabled in System Settings' Desktop Effects page if you'd like to test it out.
Comment 8 Paul Hands 2024-01-03 19:23:26 UTC
Just wanted to say I just tested this in 6.0 Beta 2 in a VirtualBox VM.   It works beautifully on a 4K screen.

Thank you KDE people!
Comment 9 tetrao 2024-02-26 09:40:32 UTC
I tried this in Wayland. When the cursor gets bigger its being pixelated. Also when you move cursor while holding left click the cursor doesn't moves *but somehow moves when the cursor is back to original size again*.
Comment 10 Nate Graham 2024-02-26 17:37:03 UTC
Please submit new bug reports to report additional issues. This one is only to track the implementation of the feature, not everything about it.