It can be done with variables, by assigning a variable to a player (let's call the player Hero, and the variable myLayer).
System -> every tick: Hero.myLayer = Hero.LayerNumber
Keyboard -> onKeyPress(1): Send Hero to layer 1
...
Keyboard -> onKeyPress(7): Send Hero to layer 7
IF Hero.myLayer == 2, do.this
So it's possible, but just a little roundabout.