This is something I've brought up before but never with a real determination to address the issue myself: With Qt's default shortcut/action mapping, text editor documents built on KTextEditor are prone to be victim of accidental zooming. Qt's standard for this is Ctrl-Wheel events. This means that systems with a trackpad that use 2-finger scrolling and scroll inertia may cause text zooming when the user holds presses the Ctrl key to trigger a shortcut (say, Ctrl-S to save the current document) before coasting has stopped completely. The end of coasting isn't always clear: scroll events may continue to come in with sub-threshold deltas, or when the view has already reached its extreme position and can scroll no further. Qt itself has a form of protection against this kind of annoyance on Mac and possibly other systems where inertial scrolling has better platform support than under X11. But it's not very difficult to implement a similar protection under X11; a proof of concept designed by Thomas Lübking and me: https://github.com/RJVB/qtwheeltest/blob/master/wheeltest.cpp I'd appreciate it if someone could have a look at and comment this approach before I start integrating it with KTextEditor (if at all possible, I haven't checked that yet).
This was easier than I thought so I submitted a patch for review: https://phabricator.kde.org/D5037
author R.J.V. Bertin <rjvbertin@gmail.com> 2017-11-12 16:36:10 (GMT) committer R.J.V. Bertin <rjvbertin@gmail.com> 2017-11-12 16:36:10 (GMT) commit f51befdc80b1a8dfd65b800b3b10dba97d10a2cb (patch) tree a2ea7719932973a03323d4105367892f9a888c45 parent 79f8dcb63ad5b4650c0081e90840359a3caa3eda (diff) prevent accidental zooming. This helps prevent problems that can occur with simulated scroll inertia (e.g. trackpads supporting 2-finger scrolling under X11). Unexpected, accidental text zooming can arise when the user holds presses the Ctrl key to trigger a shortcut before scroll coasting has stopped completely. Differential Revision: https://phabricator.kde.org/D5037 Diffstat -rw-r--r-- src/view/kateviewinternal.cpp 63 -rw-r--r-- src/view/kateviewinternal.h 3 2 files changed, 64 insertions, 2 deletions