  We consider the location and order of capillary condensation transitions
occurring in deep grooves of width $L$ and depth $D$. For walls that are
completely wet by liquid (contact angle $\theta=0$) the transition is
continuous and its location is not sensitive to the depth of the groove.
However for walls which are partially wet by liquid, where the transition is
first-order, we show that the pressure at which it occurs is determined by a
modified Kelvin equation characterized by an edge contact angle $\theta_E$
describing the shape of the meniscus formed at the top of the groove. The
dependence of $\theta_E$ on the groove depth $D$ relies, in turn, on whether
corner menisci are formed at the bottom of the groove in the low density
gas-like phase. While for macroscopically wide grooves these are always present
when $\theta<45\degree$ we argue that their formation is inhibited in narrow
grooves. This has a number of implications including that the local pining of
the meniscus and location of the condensation transition is different depending
on whether the contact angle is greater or less than a universal value
$\theta^*\approx 31\degree$. Our arguments are supported by detailed
microscopic density functional theory calculations which show that the modified
Kelvin equation remains highly accurate even when $L$ and $D$ are of the order
of tens of molecular diameters.
