Page MenuHome

Experimental preference to support holding keys to transform, tap to activate the tool
Needs ReviewPublic

Authored by Campbell Barton (campbellbarton) on Sat, Mar 7, 8:54 AM.
Tokens
"Love" token, awarded by sakana3."Love" token, awarded by MetinSeven."Like" token, awarded by Schiette."Love" token, awarded by Regnas."Love" token, awarded by Tetone."Love" token, awarded by Debuk.

Details

Reviewers
None
Group Reviewers
User Interface
Summary

This patch adds a keymap preference for transform tools G, R, S in the 3D viewport.

  • Tapping the key activates the tool.
  • Holding the key down and moving the cursor transforms, releasing the key finishes transforming.
  • Pressing space while the key is held allows you to release the key without confirming (needed for entering numbers for e.g).

Notes:

  • Using space-bar in transform is just a way to allow releasing the key and entering in numbers, some other solution could work here too, I just picked this since it's easily accessible without looking at the keyboard.
  • The default drag threshold for the keyboard is 30, which feels too high, try setting it from 5 to 10.
  • This makes it inconvenient to G,G for mesh vertex slide or R,R for trackball rotation. Although R,Space,R & G,Space,G do work.
  • While this is only working for G, R, S in the 3D viewport, there is nothing preventing all other space types from being supported.
  • Currently this depends on key repeat detection which isn't supported on macOS.

Diff Detail

Repository
rB Blender
Branch
TEMP-KEYMAP-XFORM-ON-DRAG (branched from master)
Build Status
Buildable 7011
Build 7011: arc lint + arc unit

Event Timeline

Campbell Barton (campbellbarton) retitled this revision from Experimental preference to support holding keys to transform, tap for tools to Experimental preference to support holding keys to transform, tap to activate the tool.

Hi. This seems to be the very handy "sticky keys" feature some of us have been waiting for, nice.

But is there a special reason why is it limited only to the modal transform tools?
This functionality is really great for temporarily activate almost any type of tool, specially the active tools/sculpt brushes/paint brushes etc.. At least that's how it usually works in other softwares.
So I hope in the future this great functionality can be expanded to support those areas as well. It would be a game changer..

Cheers...

I also hope this will continue to grow. Sticky keys functionality really deserves to be a global feature.

Thanks for the feature :)

With the growing number of brushes in sculpt mode this feature will be really handy. Please Cambo make it happen :)

Campbell Barton (campbellbarton) edited the summary of this revision. (Show Details)

Hi. This seems to be the very handy "sticky keys" feature some of us have been waiting for, nice.
But is there a special reason why is it limited only to the modal transform tools?
This functionality is really great for temporarily activate almost any type of tool, specially the active tools/sculpt brushes/paint brushes etc.. At least that's how it usually works in other softwares.
So I hope in the future this great functionality can be expanded to support those areas as well. It would be a game changer..
Cheers...

This could be used in other areas without much trouble, this is mostly to kick things off, get feedback form users and UI-team members, and see if it's worth making it work across the entire keymap.

This could be used in other areas without much trouble,

Awesome. 🙂

this is mostly to kick things off, get feedback form users and UI-team members, and see if it's worth making it work across the entire keymap.

I see, and I'm pretty sure everyone can see that this is a major improvement to the keymap system.

@Campbell Barton (campbellbarton) You're about to make history here, hehehe, sticky keys is a golden feature.

And yes, like Red Wax said, the real power of it is to use it with the active tools and brushes. I've been modeling using sticky keys for years in other packages, and the difference is like night and day. Even the new "transform objects origin" feature is better and faster if used this way.
So yeah, I also hope this can become a global feature of the entire keymap. 👍

@Campbell Barton (campbellbarton) I do really like the idea behind this feature. But I tested it out a bit and I found that even with the default threshold of 30px, I am constantly accidentally activating the operators with G/R/S since I am moving the mouse often & very quickly when using a pen.
When pressing the keys quickly it also isn't registered some times and the tool won't switch. I don't know what's causing that though.
But yeah, I find the feature extremely hard to use when working fast and not stopping my mouse movement every time I press a key.

On the other hand I am interested in the idea of pressing spacebar to allow better typing of values and shortcuts.
I would like try this for the active tools as well, so if the tool is activated by the user by click & dragging, they can press spacebar to type in some precise numbers with both hands.

@Campbell Barton (campbellbarton) I do really like the idea behind this feature. But I tested it out a bit and I found that even with the default threshold of 30px, I am constantly accidentally activating the operators with G/R/S since I am moving the mouse often & very quickly when using a pen.

In this case: is it possible to configure it so this works? or is this just impractical no matter how it's tweaked?

I've heard that some applications used this functionality (Softimage?), however I don't know if they attempted to distinguish between keyboard-click & drag.

It may be that the key-click events are too unreliable.

Using the speed of key presses instead of mouse-motion could help, although from past experience, these kinds of interactions tend to be something the user needs to *learn* and cause a lot of accidents early on.

When pressing the keys quickly it also isn't registered some times and the tool won't switch. I don't know what's causing that though.

It sounds more like a bug, although I didn't experience this.

But yeah, I find the feature extremely hard to use when working fast and not stopping my mouse movement every time I press a key.

Again, we could detect fast key presses, again though - nearly all previous attempts to be *clever* with event handling, just turn out to be error prone.

On the other hand I am interested in the idea of pressing spacebar to allow better typing of values and shortcuts.
I would like try this for the active tools as well, so if the tool is activated by the user by click & dragging, they can press spacebar to type in some precise numbers with both hands.

Good point, will propose this separately.

Debuk (Debuk) added a comment.EditedMon, Mar 16, 10:24 AM

@Campbell Barton (campbellbarton) I do really like the idea behind this feature. But I tested it out a bit and I found that even with the default threshold of 30px, I am constantly accidentally activating the operators with G/R/S since I am moving the mouse often & very quickly when using a pen.

In this case: is it possible to configure it so this works? or is this just impractical no matter how it's tweaked?
I've heard that some applications used this functionality (Softimage?), however I don't know if they attempted to distinguish between keyboard-click & drag.
It may be that the key-click events are too unreliable.
Using the speed of key presses instead of mouse-motion could help, although from past experience, these kinds of interactions tend to be something the user needs to *learn* and cause a lot of accidents early on.

@Campbell Barton (campbellbarton): I think the functionality should be triggered immediately on press and deciding if it was a tap or a sticky key should be done on key release purely based on the time between press time stamp and release time stamp.

Edit:
If the key was held long enough the tool will have to deactivate after key release.

If the key was held long enough the tool will stay active after key release.

This is not how it should work.
Sticky keys can't be used as a toggle or to permanently activate a tool.
To perm activate a tool you tap the key, but to use the sticky keys feature you need to press and hold, do the action, without releasing the key, bcuz once you release the key it should come back to the previous activated tool. That's how it works.

It's like pressing the shift key to smooth in sculpt mode.

Debuk (Debuk) added a comment.EditedMon, Mar 16, 7:43 PM

If the key was held long enough the tool will stay active after key release.

This is not how it should work.

Oops. Didn't reread what I had written. Yes mixed it up accidently in the last statement. Short taps are obviously meant to permanently activate the tool. (Where you read something about toggling is unclear to me.) But at some point you have to make a decision if it's meant as sticky key or not. And by putting it to the keyrelease timestamp the behaviour will be much more direct.

It's like pressing the shift key to smooth in sculpt mode.

No that's wrong. With the shift key you will never have to decide if it will stay turned on.

@Campbell Barton (campbellbarton) : Any news on this? I am having high hopes for this.