= Design: Sticky Keys (+ Integration Into Pies)
This is the design task for the sticky key implementation. The patch can be found in D840.
== What Are Sticky Keys?
Our definition of a „sticky key“ is a short key, that has two operators assigned to it. The way you press the button decides, which operator is called. We distinguish between clicking (or tabbing) and holding down a key.
**Note: You may know the term “sticky key” from Windows, but we use it differently** (This is important as a lot of people reject sticky keys, because they don't want to have this Windows behavior in Blender)
== Sticky Keys and Pies
The idea for sticky keys came up when @Psy-fi was working on pie menus. He wanted to make it possible to click for example on tab to use the old and trusted Object Mode ↔ Edit Mode toggle behavior, while holding tab would spawn the pie menu for mode selection.
This would fit to other Pies as well, such as the spacebar (click → Search menu; hold → manipulator pie menu)
{F118995} (animated GIF)
== Click Timeout
A new option was added to the user preferences called “Click Timeout”. This value sets the time in milliseconds, under which we interpret a keystroke as click and over which we interpret it as holding.
{F118997}
== How to Create Own Sticky Keys
This is really easy! You just have to change the short key of the desired operators to be the same and set the key value to click on one and hold on the other, via the following menu:
{F118999}
== Call for Testing
To make sure that the new code doesn't break other events/handlers, we want to make sure everything works well, requiring good testing. So, help is really welcome and appreciated. Some testbuilds are below.
You can use this thread for feedback or bug reports (the later only as long as the patch isn't merged with master).
== Testbuilds
The testbuilds I provided previously turned out to be really unstable. Because of that, I've decided to not provide them here for the time being.