Create a toggle action in Shapr3d

Hi,

This topic is probably there but I have not found what I am looking for.
I created 2 shortcuts (A and K).
One to isolate the selection.
The other for Exit isolation mode.
Everything works well and very useful.
Now I would like a single shortcut with a Toggle.
I attach the BBT files for clarity.

My second problem is that now the keys A and K do not work in other text applications

Thank you.

default.bttpreset (22.4 KB)
exported_triggers.bttpreset (4.4 KB)

Try a cycle action.

If you do not need eg the letter "a" in this app, then set up the trigger app specifically.

Otherwise, set up two actions, eg
"a" short press = a (letter)
"a" long press = your (toggle) action

However, such single key triggers have disadvantages if you can write quickly.

Thanks Frank1
But I don't understand how to formulate the code.
Above I uploaded my 2 files which both work, but I would like to make only one.
I read a lot of things but not simple ones about Cycle action.
Thanks again.

It's much less complicated than you think :slightly_smiling_face:

TR1.bttpreset (1.5 KB)
TR2.bttpreset (6.3 KB)

TR1: a = a. This just types the letter when you tap the key briefly.

TR2: triggers your toggle action when you hold down "a" for for at least 1 second. First action 1, then action 2. You will see a hud that shows you what is being executed.

Simply replace the hud with the actions you want.

Frank1,
Thanks again but I can't configure your 2 files.
I'm too new, I can't make the link between my 2 files and yours
For info, the actions are destined for a context menu in Shapr3d.
to be continued... :wink:

Hi Frank1,
I think it's OK now.
Toggle shortcut to Isolation Mode run very well.
Thanks again.