I am trying to calculate $\text{Hom}_{\text{cts}}(\hat{\mathbb{Z}},\mathbb{Z})$ (i.e., continuous group homomorphisms from $\hat{\mathbb{Z}}$ to $\mathbb{Z}$, viewed as topological groups in the usual way).
I know that $\hat{\mathbb{Z}} \simeq \prod_p \mathbb{Z}_p$, and I know how to write $\hat{\mathbb{Z}}$ as an inverse limit, but as far as I know $\text{Hom}(-,B)$ preserves neither of these operations in general.
Note $\hat{\mathbb{Z}}$ is profinite and $\mathbb{Z}$ is discrete, so the kernel of any continuous group homomorphism $\hat{\mathbb{Z}} \to \mathbb{Z}$ is an open subgroup of $\hat{\mathbb{Z}}$, which is necessarily of finite index. If you then take the quotient by the kernel, you get a finite group injecting into $\mathbb{Z}$, which is only possible if it's the trivial group. So the map must be $0$. So $\text{Hom}_\text{cts}(\hat{\mathbb{Z}},\mathbb{Z}) = 0$.
The same proof works for any profinite group, e.g. $\mathbb{Z}_p$.