Let $\kappa$ be a cardinal such that $cf(\kappa)=\omega$, and consider $(\kappa)^\omega$ and $(\kappa)^\kappa$ with the discrete topology. I want to define a continuous surjective map from $(\kappa)^\omega \to (\kappa)^\kappa$, but I faced a problem with surjectivity. For instance, the following map $\theta$ is continuous but not surjective: let $< x_n>$ be a cofinal set in $\kappa$, so for every $\beta \in \kappa$ there exist $x_n$ such that $\beta \leq x_n$. Consider the set $A=\{\beta: \beta \leq x_n\}$ and let $\sup A=\beta(n)$. Define $\theta:~(\alpha \kappa)^\omega \to (\alpha \kappa)^\omega$ as
$\theta(f)_\beta = f_n \mbox{ if } \beta= \beta(n)\\ 0 \mbox{ otherwise.}$
Is that correct? and how I can make it surjective?