1. Let $\kappa$ be an uncountable regular cardinal that is not weakly compact and let $C$ be a $\kappa$-compact subset of ${}^\kappa 2$. Assume, towards a contradiction, that there is a continuous injection of ${}^\kappa 2$ into $C$. Since $C$ is closed in ${}^\kappa\kappa$, Lemma 2.9 of [this paper][1] shows that $C$ contains a closed set homeomorphic to ${}^\kappa 2$. By our assumption, $\kappa$ is not weakly compact and a theorem of Hung and Negrepontis (see Corollary 2.3 of the above paper) implies that the spaces ${}^\kappa 2$ and ${}^\kappa\kappa$ are homeomorphic. This is a contradiction, because an easy argument shows that $\kappa$-compact subsets of ${}^\kappa\kappa$ do not contain closed subsets homeomorphic to ${}^\kappa\kappa$ (see Fact 1.5 of the above paper). 

2. Let $\kappa$ be indestructible supercompact, let $\lambda>\kappa$ be inaccessible and let $G$ be $Col(\kappa,<\lambda)$-generic over $V$. 
In this situation, standard arguments (see, for example, Lemma 7.6 of [this paper][2]) show that, in $V[G]$, all subtrees of ${}^{{<}\kappa}\kappa$ with more than $\kappa$-many $\kappa$-branches contain a subtree isomorphic to ${}^{{<}\kappa}2$. In particular, in $V[G]$, $\kappa$ is weakly compact and every $\kappa$-compact subset of ${}^\kappa 2$ of cardinality greater than $\kappa$ contains a continuous injective image of ${}^\kappa 2$. 

3. Let $\kappa$ be a weakly compact cardinal with the property that there is a subset $A\subseteq\kappa$ with $\kappa^+=(\kappa^+)^{L[A]}$. In this situation, a modification of a classical argument of Solovay shows that there is a weak $\kappa$-Kurepa tree, i.e. a subtree $T$ of ${}^{{<}\kappa}2$ with $\kappa^+$-many $\kappa$-branches and $\vert T(\alpha)\vert=\vert\alpha\vert$ for stationary many $\alpha<\kappa$. Since $\kappa$ is weakly compact, the tree $T$ contains no $\kappa$-Aronszajn subtrees and a theorem of Juhász and Weiss (see Lemma 2.2 of the first paper) shows that the corresponding closed subset $[T]$ of ${}^\kappa 2$ is $\kappa$-compact. By results of Mekler and Väänänen, there is no continuous embedding of ${}^\kappa 2$ into $[T]$. 


  [1]: http://arxiv.org/abs/1506.03364
  [2]: http://projecteuclid.org/euclid.jsl/1344862172