damsenviet.kle.key module

class Key

Bases: object

Key information.

property color

Keycap CSS color.

Return type

str

property labels

12 Labels.

Index to position mapping is displayed below.

Label Positions
Return type

List[Label]

property default_text_color

Default CSS text color.

Only used to optimize the KLE JSON size.

Return type

str

property default_text_size

Default text size.

Only used to optimize the KLE JSON size.

Return type

Union[int, float]

property x

X position of raised primary shape in key units.

Return type

float

property y

Y position of raised primary shape in key units.

Return type

float

property width

Width of raised primary shape in key units.

Return type

float

property height

Height of raised primary shape in key units.

Return type

float

property x2

X position offset of the lowered secondary shape in key units.

Return type

float

property y2

Y position offset of lowered secondary shape in key units.

Return type

float

property width2

Width of lowered secondary shape in key units.

Return type

float

property height2

Height of lowered secondary shape in key units.

Return type

float

property rotation_x

X position of rotation origin in key units.

Return type

float

property rotation_y

Y position of rotation origin in key units.

Return type

float

property rotation_angle

Rotation angle in degrees.

Return type

float

property is_ghosted

Whether the key is rendered partially transparent.

Return type

bool

property is_stepped

Whether the key is stepped.

Return type

bool

property is_homing

Whether the key is a homing key.

Return type

bool

property is_decal

Whether the key is purely decorative.

Return type

bool

property profile_and_row

Keycap profile and row.

Return type

str

property switch

Switch information.

Return type

Switch