ckb_commander

class ckb_commander.device.Device(path: str)[source]

Bases: object

A Corsair device.

property dpi: str
property features: str

Device features.

property fwversion: str

Device firmware version (not present on all devices).

property layout: str

Device layout, if applicable.

property model: str

Device description/model.

property pollrate: str

Poll rate in milliseconds (not present on all devices).

property productid: str

Contains the USB productID of the hardware

property serial: str

Device serial number. model and serial will match the info found in ckb0/connected

property rgb: str

returns an rgb command equivalent to the current RGB state.

property hwrgb: str

Does the same thing, but retrieves the colors currently stored in the hardware profile. The output will say hwrgb instead of rgb.

activate() None[source]

When plugged in, all devices start in hardware-controlled mode (also known as idle mode) and will not respond to commands. Before issuing any other commands, write active to the command node, like echo active > /dev/input/ckb1/cmd

deactivate() None[source]

To put the device back into hardware mode, issue the idle command.

switch_mode(number: int) None[source]
set_color(color: str, keys: Optional[str] = None) None[source]
set_color_by_command_string(cmds: str) None[source]
set_color_by_mapping(color_mapping: dict[str, str]) None[source]
turn_on_indicator(name: Literal['num', 'caps', 'scroll']) None[source]
turn_off_indicator(name: Literal['num', 'caps', 'scroll']) None[source]

Indices and tables