Handling of onKeyDown.