One. (20 points) Given the equation in terms of $x$
$$
k x^{2}-\left(k^{2}+6 k+6\right) x+6 k+36=0
$$

the roots of which are the side lengths of a certain isosceles right triangle. Find the value of $k$.
When $k=0$, the root of the equation is $x=6$, which meets the requirement.
When $k \neq 0$, the equation can be factored as
$(k x-6)(x-6-k)=0$.
Solving gives $x_{1}=\frac{6}{k}, x_{2}=6+k$.
Clearly, $k>0$.
Since $x_{1}$ and $x_{2}$ are the lengths of two sides of an isosceles right triangle, we have
$\frac{x_{2}}{x_{1}}=\frac{k(k+6)}{6}=1$ or $\sqrt{2}$ or $\frac{\sqrt{2}}{2}$.
If $\frac{k(k+6)}{6}=1$, solving gives
$k=-3 \pm \sqrt{15}$ (negative root discarded).
If $\frac{k(k+6)}{6}=\frac{\sqrt{2}}{2}$, solving gives
$k=-3 \pm \sqrt{9+3 \sqrt{2}}$ (negative root discarded).
If $\frac{k(k+6)}{6}=\sqrt{2}$, solving gives
$k=-3 \pm(\sqrt{6}+\sqrt{3})$ (negative root discarded).
In summary, the values of $k$ are
$0, \sqrt{15}-3, \sqrt{9+3 \sqrt{2}}-3$ or $\sqrt{6}+\sqrt{3}-3$.