How do you implement this and save the key press to a variable, every time I do it the thing won't work!