Updated to cope with key down onbutton