Help Please

I’m using the on(keyPress “<LEFT>”){}
I need to know how to cancel the action that takes place on the keyPress after the key is released!

Thanks in advance