"Long Press" to Trigger Alternate Function

Can Python or just Blender in general handle long press actions, similar to force touch, to trigger alternate functions for icons?

The reason I ask, is that the new “Camera Lock” icon, which I loved, got removed on count of screen space real-estate; my constructive solution would be to have to original camera icon turn red and lock the camera to view after a 1 second press.
This would allow the viewport to remain clean while allowing that toggle to still be one click away.

If so this could useful for other icons where single quick switches are beneficial.

1 Like

I know that ‘On drag’ actions are possible out of the box, for alternate actions:

1 Like

Cool. I hope something like what I mentioned will be considered.

I think a long press option if able would help add extra features functions to the viewport without cluttering it up.

1 Like

That’d be nice indeed.

For the time being you might want to check out the Pie Menu Editor add-on. If I’m not mistaking, its Sticky Keys option is what you’re looking for.

Long press is another term for press and hold. It’s an input type you’ll see in both Pen and Touch interfaces (typically as the equivalent of a Right Click input) and in videogames (typically as a surety measure for actions that aren’t easily undone). Sticky Keys is an unrelated accessibility feature.

Thanks, then I was mistaking.

The term is used for different things. Windows indeed has an accessibility feature called like this.

However in Blender we also used that term for what you describe. Based on a time threshold, a key could perform alternative operations.
It was introduced with pie menus, so a simple click on Tab would toggle edit mode, holding Tab (for say 400ms) would spawn the pie menu. This worked great in my opinion, but the implementation caused too many bugs so I ended up reverting it and it was never really revived. Still an interesting thing to look at, it was also considered for usage with the tool system (click: active operator; hold: activate tool – or vice versa).

2 Likes