Dynamic Key remapping

hello,

whenever I open an app "x".

stage 1:
I want my caps lock key become right shift and right shift becomes caps lock .

stage 2:
whenever I press caps lock ( which has become right shift ), I want my left option to become right option, but as soon as I release caps lock ( right shift)... left option becomes normal and works like left option.

what I have already done and achieved
I made a preset of that app and under " automations & Named & Other triggers"
I used remap keys trigger and remapped caps lock and right shift.
it works flawlessly

the problem
now, I have no idea achieving of stage 2 . could you please help me guys?

I would recommend a dedicated key remapping tool like karabiner elements for complex remappings like this.

You could probably achieve something like it via key sequences, but I have not tried this much:

1 Like

I have zero knowledge of coding ...thats why im not using karabiner

however
I just tried this in btt ...it's working only to make left opt to right opt ...after that when I release caps lock ....it's not working( it's not reseting left opt to left opt)

is there any setting im missing? should I share the preset ?

@Andreas_Hegenberg

I think the problem im having is when im recording sequence its recording modifier down and modifier up ....

and I cannot select only modifier up ....because modifier down is selected by default ...can we change it somehow?

okay ....it worked now ....using key sequences ..
man, it was so easy , I just had to delete the modifier up in first key sequence and modifier down in another key sequence ...

this is the app I can not live without

such an awesome app.