Skip to main content

KD104A keyboard lighting control over HID, with a small, straightforward API for building and applying effects.

Project description

kd104a

Simple HID control for KD104A keyboard lighting.

Install

pip install kd104a

Quick Start

from kd104a import Device, Lighting, Direction, effects

keyboard = Device(product="Gaming Keyboard", interface=2)
lighting = Lighting(keyboard)

lighting.set_mode(
    effects.wave,
    brightness=1,
    speed=20,
    direction=Direction.RIGHT_LEFT,
    color1="red",
    color2="blue",
)

Usage

Power

lighting.off()
lighting.on()

Change mode

lighting.set_mode(effects.static, color="yellow")

Update parameters

lighting.set_brightness(100)
lighting.set_speed(10)
lighting.set_direction(Direction.LEFT_RIGHT)

Parameters

Brightness / Speed

0-100  # percent

Colors

"red"
"#ff0000"
(255, 0, 0)

Direction

Direction.LEFT_RIGHT
Direction.RIGHT_LEFT
Direction.TOP_BOTTOM
Direction.BOTTOM_TOP
Direction.CENTER_OUT
Direction.OUT_CENTER
Direction.CLOCKWISE
Direction.COUNTER_CLOCKWISE

Effects

effects.static
effects.neon
effects.breathing
effects.wave
effects.blink
effects.radar
effects.ripple
effects.marquee
effects.shine
effects.ripple2
effects.interactive
effects.crossing
effects.firework
effects.reactive
effects.equalizer

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kd104a-0.1.0.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kd104a-0.1.0-py3-none-any.whl (2.4 kB view details)

Uploaded Python 3

File details

Details for the file kd104a-0.1.0.tar.gz.

File metadata

  • Download URL: kd104a-0.1.0.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for kd104a-0.1.0.tar.gz
Algorithm Hash digest
SHA256 799ab71ccee131137aa243545ba8d544fc84b2d54d6e7b19ee0f73599e58f975
MD5 7ab63deec9edaa617cf0140c756afad4
BLAKE2b-256 5e580ea908de1b1b5d4066d60ae57014a6f85db3086275904e8eb22c532908b0

See more details on using hashes here.

File details

Details for the file kd104a-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: kd104a-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for kd104a-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 287597cc77321f8ce023acc8e72e91d71b46ba1c0211960dbf13e4a403c4058e
MD5 4930425f12d03816fab0939fadb28a32
BLAKE2b-256 a0ff2b5d8784bfdc0055211bba41f38c6e031583999517ed25bd0d3c256e90cd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page