added keydown event handler