add code for handling some special keys