Show HN: Backlit Keyboard API for Python

Python tool makes your keyboard blink; HN asks if every Linux laptop will glow

TLDR: A new Python package lets Linux users control and blink laptop keyboard lights, with a safe practice mode. Early reactions praise the simplicity and ask if all Linux keyboards—and RGB lighting—will work, while noting it’s Linux‑only for now, proving tiny LEDs can spark big curiosity

HN just got a glow‑up. A new Show HN drops: backlit‑kbd, a beginner‑friendly Python tool that lets Linux users turn their laptop keyboard lights up, down, and into tiny notification beacons—complete with a safe “mock mode” so your hardware stays calm while you learn. There’s even a “disco” script, which immediately fueled jokes about turning laptops into mini nightclubs.

But the early plot twist isn’t about party mode—it’s about compatibility. The dev, itsmeadarsh, reports it worked “first try” on a Lenovo gaming laptop running Fedora, and admits they can’t test RGB lighting and don’t have a Mac. That sent the top question—courtesy of invalidSyntax—straight to the point: “Will all keyboards with Linux compatibility work?” Cue the classic Linux chorus about device quirks and permissions (those system rules that can block hardware access), with nods to the docs warning you may need extra privileges.

Fans are hyped about one‑line brightness changes, blink‑for‑notifications, and the mock mode that makes tinkering feel risk‑free. Skeptics gently wonder if there’s a future beyond Linux and whether fancy rainbow keys will ever join the party. Meanwhile, the support links—GitHub Sponsors and Buy Me a Coffee—sparked light‑hearted quips about tipping for blinky keys. Tiny LEDs, big feelings: HN loves a good glow‑up.

Key Points

  • backlit-kbd is a Python package that controls keyboard backlight brightness on Linux via sysfs, with automatic device discovery.
  • A mock backend enables safe, in-memory testing; Python API and CLI provide commands for info, setting percentages or raw levels, inc/dec, on/off, blink, and notify.
  • Installation is via PyPI, with optional editable dev installs and extra dev dependencies; example scripts demonstrate usage.
  • Testing uses pytest; troubleshooting notes that Linux hardware access may require privileges/udev rules and suggests using the mock backend or fallback options.
  • Release pipeline uses GitHub Actions and PyPI Trusted Publishing (OIDC); maintainers publish by updating the version and pushing a tag or creating a GitHub release.

Hottest takes

"worked on first try on a Lenovo Ideapad Gaming Laptop running Fedora" — itsmeadarsh
"I am unable to test if RGB works or not" — itsmeadarsh
"Will all keyboards with linux compatibility work?" — invalidSyntax
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.