Added events for when the keyboard and mouse get and lose focus.