How to make it so when you press a key while touching a certain block, something happens?

I want to make it so that if you press the F key while touching a certain part of the ground, it switches to the next level.

You can use the And logic gate to detect two active inputs and it’ll send an output.

Or you can use a switch where touching the ground will turn it on, and pressing the F key will send an input through.