How can I use one input to modify the function of another input?

How can I use one input to modify the function of another input?

Hi there,

are there anywhere other sites with more examples or tutorials?

I am new to the Z and I find it difficult to assign the buttons if you have special needs :) I am a software developer so I am used to google and find stuff out on my own but this is hard :)

For example I am trying to make something like a shift button. You tilt left and during this state the other buttons have other functions.

Pseudocode:
Press left button
if tilt left then print A
else print B