Well, as far as I know, the only key events that are registered are Esc (Player - Cinematic Skipped event) and arrow keys (Player - Keyboard Event). You could have a trigger for these events and then turn a boolean variable on, when they are pressed. Then you can check in another trigger if the variable is true or false.
Alternatively you could have a unit with a custom ability with a certain hotkey, but that will require the unit to be selected by the player.