| Summary: | Enter, + and - shortcuts do not work when cursor is outside of canvas | ||
|---|---|---|---|
| Product: | [Applications] krita | Reporter: | Tyson Tan <tysontanx> |
| Component: | Usability | Assignee: | Krita Bugs <krita-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | halla |
| Priority: | NOR | ||
| Version First Reported In: | 2.9 Beta | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | http://commits.kde.org/krita/d64d85fb10a58b6ed3b9451abeb1927576052e4d | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
|
Description
Tyson Tan
2015-02-04 07:56:22 UTC
Confirmed. We'll have to look deeper into focus handling after 2.9 -- the tab key in dockers being broken is another example of focus issues. *** Bug 362217 has been marked as a duplicate of this bug. *** Git commit d64d85fb10a58b6ed3b9451abeb1927576052e4d by Dmitry Kazakov.
Committed on 27/04/2016 at 17:38.
Pushed by dkazakov into branch 'master'.
Fix shortcuts when the cursor is outside the canvas
This patch needs testing on Windows, OSX and all the variations
of DE on Linux!
Before today the focus was automatically transferred to the canvas
when the cursor was hovering over it. That caused all input boxes
in the dockers work only when you keep the cursor over them. That
was hardly convenient.
Now the focus can be transferred in a semi-automatic way.
* if you move the cursor outside the canvas without clicking anywhere
the focus is kept on the canvas and you can still use the shortcuts
* if you click in any input box outside the canvas, the focus will be
transferred to that input box. Therefore the shortcuts will not work.
* to return input focus to the canvas you should do one of the following:
- just start a stroke on it
- keep your cursor *moving* over the canvas for 2 seconds and
the focus will be transferred automatically. "Moving" condition is
needed for a case when you drop your mouse or a stylus in a fixed
position on a canvas and move your hands to the keyboard to fill
in input boxes in the dockers. If you do this "dropping" quick
enough (< 2 sec), the focus will be kept on your input box :)
To implement such behavior I had to create a special class
KisTimedSignalThreshold which uses almost the same interface as
KisSignalsCompressor, but does what we need: emit the signal if the
flow of events is strong enough.
Fixes T2346
Related: bug 362217
CC:kimageshop@kde.org
M +1 -0 libs/image/CMakeLists.txt
A +82 -0 libs/image/kis_timed_signal_threshold.cpp [License: GPL (v2+)]
A +71 -0 libs/image/kis_timed_signal_threshold.h [License: GPL (v2+)]
M +3 -15 libs/ui/input/kis_input_manager.cpp
M +39 -5 libs/ui/input/kis_input_manager_p.cpp
M +8 -1 libs/ui/input/kis_input_manager_p.h
M +5 -1 libs/ui/input/kis_shortcut_matcher.cpp
http://commits.kde.org/krita/d64d85fb10a58b6ed3b9451abeb1927576052e4d
|