update to key event handling