Enum keyset_key::Shape
source · pub enum Shape {
None(Size),
Normal(Size),
Space(Size),
Homing(Option<Homing>),
SteppedCaps,
IsoVertical,
IsoHorizontal,
}Expand description
The shape of a key
Variants§
None(Size)
Not a key per se, but only a legend. This is usually used for labels and is the same as a decal in KLE
Normal(Size)
A regular key of the given size
Space(Size)
A spacebar of the given size
Homing(Option<Homing>)
A homing key with the given homing type. If the homing type is None the profile’s
default homing type is assumed to be used
SteppedCaps
A stepped caps lock key, i.e. a 1.25u key with additional 0.5u step on the right
IsoVertical
A vertically-aligned ISO enter, i.e. an ISO enter where legends are aligned within the vertical 1.25u × 2.0u section of the key
IsoHorizontal
A horizontally-aligned ISO enter, i.e. an ISO enter where legends are aligned within the horizontal 1.5u top section of the key
Implementations§
source§impl Shape
impl Shape
sourcepub fn outer_rect(self) -> Rect
pub fn outer_rect(self) -> Rect
The outer bounding rectangle of the key shape, i.e. the bounding box of the key shape. The inner and outer bounds are the same for regular-shaped keys, but are different for stepped keys, L-shaped keys, etc.
sourcepub fn inner_rect(self) -> Rect
pub fn inner_rect(self) -> Rect
The inner bounding rectangle of the key shape, i.e. the bounds for the part of the key containing the legend. The inner and outer bounds are the same for regular-shaped keys, but are different for stepped keys, L-shaped keys, etc.