Listen for two separate events, one where the key is pressed down, the other where it is released.
Pressing the key should set a flag, releasing it clear said flag. Then you can check the value of the flag instead of continually trying to pester the keyboard. When you're looking at more than just one key, you'd want to store all of the currently pressed KeyStrokes in a map.