I have a touchOSC layout where I am trying to triple my availability of some buttons.

I am wondering if what I am trying to do is even possible the way I have sort of figured it out.

From what I understand the modifiers and etc in mapping is all logic based so:

I want a single push button (PB) to do four separate things (A) (B) (C) and (D) depending on the shift toggles enabled.

I have two toggle shift buttons shift left (SL) and shift right (SR) and one modifier (m1).

If (SL) and (SR) are not toggled then m1=0 => (PB) --> (A)
If (SL) is toggled but not (SR) then m1=1 => (PB) --> (B)
If (SL) is not toggled and (SR) is then m1=2 => (PB) --> (C)
If (SL) and (SR) are toggled then m1=3 => (PB) --> (D)

to do this I think I need to to set the shift button's mapping as follows

if m1=0 then m1=1
if m1=1 then m1=0
if m1=2 then m1=3
if m1=3 then m1=2

if m1=0 then m1=2
if m1=1 then m1=3
if m1=2 then m1=0
if m1=3 then m1=1

(A) if m1=0
(B) if m1=1
(C) if m1=2
(D) if m1=3

Is this correct?

If so I hope this can help other users out there trying to multiply their button's functions.

Thanks in advance! The advice from this forum is amazing!