# Question about semidirect product in the moduli space of a $d$-torus $T^d$

The following paragraph appears on page 6 of Morrison's TASI Lectures on Compactification and Duality:

The worldsheet action for strings on a torus depends on a choice of flat metric on the torus, and a choice of NS-NS two-form field (the "B-field"). We can separate out the volume as a separate parameter, and recall that the space of volume-one flat metrics on a torus can be described as $SL(d)/SO(d)$. The entire parameter space is thus

$$\Gamma_0 \backslash \Lambda^2 \mathbb{R}^d \times \mathbb{R}^+ SL(d)/SO(d)$$

with discrete identifications $\Gamma_0$ coming from two sources: diffeomorphisms of $T^d$ (which contribute $SL(d, \mathbb{Z})$) and integral shifts of the B-field (which contribute $\Lambda^2 \mathbb{Z}^d$). The total discrete group coming from this geometrical analysis is $\Gamma_0 = \Lambda^2\mathbb{Z}^d \ltimes SL(d, \mathbb{Z})$).

In general, if you have two factors contributing to a discrete (or continuous) symmetry, the combined action is a direct product of the factors if their actions commute and a semidirect product if their actions do not commute.

The space of all 2 forms in d-dimensions is $\Lambda^2 \mathbb{R}^d$. I see why we have the two factors in $\Gamma_0$ but why do we need a semidirect product? My understanding is that it is just like we have for the Poincare group, which is a semidirect product of translations (here replaced by $SL(d, \mathbb{Z})$) and the Lorentz group (here replaced by diffeomorphisms).

Given two groups $G$ and $H$, you might know that doing a transformation $g\in G$ also acts on the elements of $H$ in some fashion defined by a homomorphism $\phi: G\to \mathrm{Aut}(H)$, and the group operation on the semi-direct product is then given by $(g_1,h_1)(g_2,h_2) = (g_1g_2,h_1\phi(g_1)h_1)$ (the order of the elements and whether the $\phi$ acts on the first or second element depends on the exact definition you're using).
Now, in your case, the diffeomorphisms can act naturally on the differential forms by pullback, but the pullback of a differential form that has been shifted is not necessarily the shift of the pullback by the same $\Lambda^2\mathbb{Z}$, so indeed $\mathrm{Diff}(T^d)$ acts on $\Lambda^2\mathbb{Z}$ in some fashion. This is not exactly analogous to the semi-direct product in the Poincaré group because the $\Lambda^2 \mathbb{Z}$ don't act on the torus itself as "translations" would, but directly shift the 2-form $B$.