Skip to main content

Royal Kludge Config Utility - Manage profiles and per-key RGB lighting

Project description

RKCU - Royal Kludge Config Utility

Python3 based command line utility/API to manage and modify profiles on Royal Kludge keyboards with per-key RGB support.

Features

  • Per-Key RGB Lighting: Set individual colors for each key
  • JSON Configuration: Load complex lighting setups from files
  • Windows Compatible: Updated for Windows HID interface detection
  • RK100 Support: Enhanced for newer Royal Kludge models
  • Rangoli: Based on the rangoli project

Supported Keyboards

  • Royal Kludge RK100 (VID: 0x258a, PID: 0x00e0)
  • Royal Kludge RK61 (original support)
  • Other RK keyboards with compatible HID interfaces

Dependencies

hidapi

Standard Usage

python rkcu.py <arguments>

Arguments :

--speed, --sp [1-5]
# speed of led animation.

--brightness, -br [0-5]
# brightness of led animation

--sleep, -sl [1-5]
# sleep duration for the keyboard led
 - 1: 05 Minutes
 - 2: 10 Minutes
 - 3: 20 Minutes
 - 4: 30 Minutes
 - 5: Never Sleep

--rainbow, -rb
# Set LED color mode to Rainbow

--red, -r 0-255
# Red value of Color

--green, -g 0-255
# Green value of Color

--blue, -b 0-255
# Blue value of Color

--color, -c "#RRGGBB"
# Set color using hex format (e.g., "#ff0000" for red)
# Note: This will override individual --red, --green, --blue values if provided.

--animation, -an "animation_name"
# List of availaible animations:
 - neon_stream
 - ripples_shining
 - sine_wave
 - rainbow_routlette
 - stars_twinkle
 - layer_upon_layer
 - rich_and_honored
 - marquee_effect
 - rotating_storm
 - serpentine_horse
 - retro_snake
 - diagonal_transformer
 - ambilight
 - streamer
 - steady
 - breathing
 - neon
 - shadow_disappear
 - flash_away

--list-animations, -la
# List all supported animation names and exit

Per-Key RGB Arguments

--set-key KEY_INDEX:RRGGBB
# Set color for a specific key (can be used multiple times)
# Example: --set-key 15:ff0000 (sets key 15 to red)

--set-keys-json FILE_PATH
# Load multiple key colors from JSON file

--clear-custom
# Clear all custom per-key colors

Example :

# Standard usage
python rkcu.py --speed 3 --brightness 5 --sleep 5 -r 255 -g 255 -b 255 -an "ripples_shining"
python rkcu.py -sp 5 -an "rotating_storm" -rb

# Per-key RGB examples
python rkcu.py --set-key 15:ff0000 --set-key 29:00ff00 
python rkcu.py --set-keys-json rainbow_config.json      # Load from file
python rkcu.py --set-key 15:ff0000 --brightness 2     # Custom key with brightness

Custom Testing

Readme with some standard tests for keyboard (mainly per-key) RGB functionality can be found in custom_testing/README.md.

Notes

The --rainbow argument will overrule the --red, --green, --blue parameters.

By default the script would require superuser access to run. In order to run this without root, you can plug a udev rule by performing the following steps : Step 1: Find your vendor id and product id. Here it is 258a and 004a respectively, and would most likely be same for you if you are having the same keyboard.

$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 0c45:671e Microdia Integrated_Webcam_HD
Bus 001 Device 002: ID 258a:004a SINO WEALTH RK Bluetooth Keyboard
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Step 2: add a rules file to /etc/udev/rules.d file: 60-rk.rules

SUBSYSTEMS=="usb|hidraw", ATTRS{idVendor}=="258a", ATTRS{idProduct}=="004a", TAG+="uaccess"

replace 258a with your vendor id and 004a with your product id, in case it is different. Step 3: Finally, reload your udev rules by running the following command :

# udevadm control --reload-rules && udevadm trigger

What's working?

Currently the script allows setting and configuring of inbuilt color profiles on the keyboard. Custom customisation such as custom LED colors and macros are still not present but will (hopefully) be soon supported.

Credits

Big credits to this issue thread on the OpenRGB Gitlab Repo that served great reference.

Special thanks to the Rangoli project for the foundational work that made the per-key RGB functionality possible.

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

rkcu-1.1.0.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

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

rkcu-1.1.0-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file rkcu-1.1.0.tar.gz.

File metadata

  • Download URL: rkcu-1.1.0.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rkcu-1.1.0.tar.gz
Algorithm Hash digest
SHA256 a62c1a09e98783f07e25ebe66b4a9a3e9e08f88a50aed04c3d29d5825a7c1bb4
MD5 22971db79f319862d0a15a9055af4e93
BLAKE2b-256 9e7b025489d1bdc22075564f0a1a2ddcfaff142072e191d5eacc5f8a103131c5

See more details on using hashes here.

Provenance

The following attestation bundles were made for rkcu-1.1.0.tar.gz:

Publisher: release.yml on gagan16k/rkcu

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rkcu-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: rkcu-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rkcu-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 33e23ae6a9206cda9a9ebb01262e0914535fe23e58c1ac1de920c14aece26678
MD5 a806b17e48c3a86bf0ffa1441f98a1f9
BLAKE2b-256 7f5534d3905c7999eb1955ce3a227007fe6a11040e5c64a6cf50e29fa080212b

See more details on using hashes here.

Provenance

The following attestation bundles were made for rkcu-1.1.0-py3-none-any.whl:

Publisher: release.yml on gagan16k/rkcu

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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