An open API service indexing awesome lists of open source software.

https://github.com/mishamyrt/keychron-go

🎹 Library to control Keychron keyboards
https://github.com/mishamyrt/keychron-go

cli-tools keychron rgb-led

Last synced: 7 months ago
JSON representation

🎹 Library to control Keychron keyboards

Awesome Lists containing this project

README

          

# Keychron Protocol Library

Library that implements the Keychron keyboard backlight control protocol.

## Usage

```go
package main

import (
"image/color"

"github.com/mishamyrt/go-keychron"
"github.com/mishamyrt/go-keychron/pkg/effect"
"github.com/mishamyrt/go-keychron/pkg/hid"
)

func main() {
hid.Init()
b, err := keychron.Open(hid.K3V2Optical)
if err != nil {
panic(err)
}
m, _ := effect.Get(effect.RainMode)
m.Color = color.RGBA{0, 255, 255, 0}
b.Set(m)
}
```