6. Given that the set $M$ consists of all functions $f(x)$ satisfying the following property:

There exists a non-zero constant $T$, for any $x \in \mathbf{R}$, such that $f(x+T)=T f(x)$ holds.

If the function $f(x)=\sin k x \in M$, then the range of the real number $k$ is . $\qquad$
6. $\{k \mid k=m \pi, m \in \mathbf{Z}\}$.

When $k=0$, $f(x)=0 \in M$.
When $k \neq 0$, since $f(x)=\sin k x \in M$, there exists a non-zero constant $T$, for any $x \in \mathbf{R}$, such that
$$
\sin (k x+k T)=T \sin k x,
$$

i.e., $\sin k x \cdot \cos k T+\cos k x \cdot \sin k T=T \sin k x$.
Substituting $x=0$ into equation (1) yields
$\sin k T=0$.
Thus, for any $x \in \mathbf{R}$, we have
$\cos k T \cdot \sin k x=T \sin k x$.
Hence, $T=\cos k T= \pm 1$.
Substituting $T= \pm 1$ into equation (2) gives $k=m \pi, m \in \mathbf{Z}$.