Trigger a warp when hitting a button while overlapping an object?

So just like in 2-D side scrolling games, you have a doorway and you hit “tab” or whatever key. When you hit that, on top of the doorway, it takes you to another area. I just need to get the gist of how to do that.
I am using the basic 2-D level package.

I don’t know how to get it to work if I press a key, while overlapping the object. I can only get it to work right when I overlap, it ports me to the new level.