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.2.tar.gz (7.5 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.2-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: kd104a-0.1.2.tar.gz
  • Upload date:
  • Size: 7.5 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.2.tar.gz
Algorithm Hash digest
SHA256 3dc7845c9b0c588477c17ba04d88aee077354678f5156761204575a82867ad3f
MD5 a865708908b70b561ac8ee4c8d0fcc95
BLAKE2b-256 4cb81838244306d14cd131029bed9350013b6062a8f46dba65931fff9b04a361

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kd104a-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.7 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f24f4e7877e941c1d01294ff0c49814014d171ab9e825d92a31d73a20e4af7f7
MD5 36c52dbc78d2ce4c5d31b88b06214a15
BLAKE2b-256 5e1d0d3e0f94d6417f3bd410450c442de9b6aaa686bef6b1bd2d74e95865f529

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