  We perform a study of the final state interactions of the K^+ \bar{K^0} and
the \bar{K^0}d systems in the reactions pp \to d K^+ \bar{K^0} and pp \to d
\pi^+ \eta. Since the two-meson system couples strongly to the a_0(980)
resonance, these reactions are expected to be an additional source of
information about the controversial scalar sector. We also show that these
reactions present peculiar features which can shed additional light on the much
debated meson-baryon scalar sector with strangeness -1. We deduce the general
structure of the amplitudes close to the d K^+\bar{K}^0 threshold, allowing for
primary K^+ \bar{K^0} as well as \pi^+\eta production with the two mesons in
relative S- or P-wave. The interactions of the mesons are accounted for by
using chiral unitary techniques, which generate dynamically the a_0(980)
resonance, and the \bar{K^0}d interaction is also taken into account. General
formulae are derived that allow to incorporate the final state interactions in
these systems for any model of the production mechanism. We illustrate this
approach by considering two specific production mechanisms based on three
flavor meson-baryon chiral perturbation theory. It is demonstrated that in this
scenario the \bar{K^0}d interactions are very important and can change the
cross section by as much as one order of magnitude. The amount of \pi^+\eta
versus K^+ \bar{K^0} production is shown to depend critically on the primary
mixture of the two mechanisms, with large interference effects due to final
state interactions. These effects are also shown to occur in the event
distributions of invariant masses which are drastically modified by the final
state interactions of the two-meson or the \bar{K}d system.
