Patch: Sticky Keys
Differential Revision for sticky keys. Design feedback should go into T42339, please, don't add non-code feedback here. You can also find some testbuilds in there.
Note: Currently only backend implementation. I've decided to leave the pie integration out for now (a few things still need to be discussed for it and we better do that separately). If you want to use the Pie integration you need this patch and the updated ui_pie_menus_official.py
I've basically implemented the proposal I made in T41867. Some further comments for review:
- I had to move the KM_CLICK/KM_HOLD logic so that it's called (almost) from the main loop because it needs a time presicion of a few milliseconds. I left the KM_DBL_CLICK logic in wm_event_add_ghostevent though. Not nice but I guess we have to deal with it.
- I moved the Double Click UserPref options to a different place, as it's not mouse-only
- After discussing it with @Antony Riakiotakis (psy-fi), I changed all occurrences of KM_CLICK to KM_PRESS as this seems to not bring any conflicts
- The additional events sent by the clicktest brought up some glitches that I had to fix individually
- Occurrences of event->val != KM_PRESS had to be changed to "event->val == KM_RELEASE" but that should be fine because now the only values that may be sent on a key event are KM_PRESS or KM_RELEASE
- I found a few minor things that could be cleaned up and marked them as XXXs (all off-topic) - will have a look at them after this is committed (to avoid merge conflicts)