Handle keyboard interrupt.