Handle keyboard interrupt