Use set -e in bash and --clearmodifiers in xdotool