Adding modifier keys

How about using variables ?

I want to do the same thing and that is the first that came to my mind. I am really new to KM though.