Details
-
Suggestion
-
Resolution: Out of scope
-
P2: Important
-
None
-
None
Description
Phone input is often driven by a combination of key clicks (press+release) and holds (press+hold). It's possible to get the proper behavior today, but it means the same logic has to be duplicated in every application that wants it.
If we add QKeyEvent::autoRepeatCount(), the need to keep state in the applications mostly disappears, since key clicks can be detected on KeyRelease w/ autoRepeatCount == 0, and holds can be detected on KeyRelease w/ isAutoRepeat == true && autoRepeatCount == 0 (or 1).
For convenience, we could also have isClick() and isHold() (was*()? was*ed()? is*ed()?)
This is extremely useful for Qtopia and the CE port, for example. This could also be useful for desktop code as well (arrow keys, for example).