Skip to content

Instantly share code, notes, and snippets.

@agtbaskara
Last active October 18, 2022 09:20
Show Gist options
  • Save agtbaskara/b6db67a14be208b3474c30ceff36ae39 to your computer and use it in GitHub Desktop.
Save agtbaskara/b6db67a14be208b3474c30ceff36ae39 to your computer and use it in GitHub Desktop.
Run this python script to turn off MSI Mystic 1562 Keyboard RGB (https://gitlab.com/CalcProgrammer1/OpenRGB/-/issues/2289)

Place the python scripts on ~/.custom_scripts/msi-mystic-1562-rgb-off.py then add this to Ubuntu Startup to turnoff keyboard light at boot (change agtbaskara to your username)

Name:

msi-mystic-1562-rgb-off

Command:

python3 /home/agtbaskara/.custom_scripts/msi-mystic-1562-rgb-off.py

Comment:

Turn off keyboard RGB at boot
#!/bin/python3
import hid
MYSTIC_VID = 0x1462
MYSTIC_PID = 0x1562
report = b'\x02\x00\x00\x00\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
with hid.Device(MYSTIC_VID, MYSTIC_PID) as mlight:
mlight.send_feature_report(report)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment