Handle keyboard input events.
Handle focus events.