Handle key event more utterly.