1: \begin{abstract}
2: This paper has three main goals.
3:
4: First, we study fixed subgroups of automorphisms of right-angled Artin and Coxeter groups. If $\varphi$ is an untwisted automorphism of a RAAG, or an arbitrary automorphism of a RACG, we prove that $\Fix\varphi$ is finitely generated and undistorted. Up to replacing $\varphi$ with a power, we show that $\Fix\varphi$ is quasi-convex with respect to the standard word metric. This implies that $\Fix\varphi$ is separable and a special group in the sense of Haglund--Wise.
5:
6: By contrast, there exist ``twisted'' automorphisms of RAAGs for which $\Fix\varphi$ is undistorted but not of type $F$ (hence not special), of type $F$ but distorted, or even infinitely generated.
7:
8: Secondly, we introduce the notion of ``coarse-median preserving'' automorphism of a coarse median group, which plays a key role in the above results. We show that automorphisms of RAAGs are coarse-median preserving if and only if they are untwisted. On the other hand, all automorphisms of Gromov-hyperbolic groups and right-angled Coxeter groups are coarse-median preserving. These facts also yield new or more elementary proofs of Nielsen realisation for RAAGs and RACGs.
9:
10: Finally, we show that, for every special group $G$ (in the sense of Haglund--Wise), every infinite-order, coarse-median preserving outer automorphism of $G$ can be realised as a homothety of a finite-rank median space $X$ equipped with a ``moderate'' isometric $G$--action. This generalises the classical result, due to Paulin, that every infinite-order outer automorphism of a hyperbolic group $H$ projectively stabilises a small $H$--tree.
11: \end{abstract}
12: