added shell code for key presses