  We provide a 0.8\%-accurate determination of $V_{cs}$ from combining
experimental results for the differential rate of $D \rightarrow K$
semileptonic decays with precise form factors that we determine from lattice
QCD. This is the first time that $V_{cs}$ has been determined with an accuracy
that allows its difference from 1 to be seen. Our lattice QCD calculation uses
the Highly Improved Staggered Quark (HISQ) action for all valence quarks on
gluon field configurations generated by the MILC collaboration that include the
effect of $u$, $d$, $s$ and $c$ HISQ quarks in the sea. We use eight gluon
field ensembles with five values of the lattice spacing ranging from 0.15 fm to
0.045 fm and include results with physical $u/d$ quarks for the first time. Our
calculated form factors cover the full $q^2$ range of the physical decay
process and enable a Standard Model test of the shape of the differential decay
rate as well as the determination of $V_{cs}$ from a correlated weighted
average over $q^2$ bins. We obtain $|V_{cs}|=
0.9663(53)_{\text{latt}}(39)_{\text{exp}}(19)_{\eta_{EW}}(40)_{\text{EM}}$,
where the uncertainties come from lattice QCD, experiment, short-distance
electroweak and electromagnetic corrections, respectively. This last
uncertainty, neglected for $D \rightarrow K \ell \nu$ hitherto, now needs
attention if the uncertainty on $V_{cs}$ is to be reduced further. We also
determine $V_{cs}$ values in good agreement using the measured total branching
fraction and the rates extrapolated to $q^2=0$. Our form factors enable tests
of lepton flavour universality violation. We find the ratio of branching
fractions for $D^0 \rightarrow K^-$ with $\mu$ and $e$ in the final state to be
$R_{\mu/e}=0.9779(2)_{\text{latt}}(50)_{\mathrm{EM}}$ in the Standard Model,
with the uncertainty dominated by that from electromagnetic corrections.
