Skip to content

konsumer/node-gk6x

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node GK6X

This adds support for GK6X keyboards in nodejs.


This will allow you program a ton of custom configs, in Mac, Windows, and Linux.

supported devices

On linux, you can see if your keyboard is supported by typing this:

lsusb

you should see a line that looks like this:

Bus 001 Device 016: ID 1ea7:0907 SHARKOON Technologies GmbH Keyboard

I'm not quite sure how to do this on other OS's (someone that uses them should let me know!) Basically a ton of programmable keyboards by epomaker (and clones) should work.

usage

permissions

On Linux, you will need to run with sudo or add udev rules to give you access to raw HID devices.

I made one that looks like this, in /etc/udev/rules.d/gk6x.rules:

SUBSYSTEM=="input", GROUP="input", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1ea7", ATTRS{idProduct}=="0907", MODE:="666", GROUP="plugdev"
KERNEL=="hidraw*", ATTRS{idVendor}=="1ea7", ATTRS{idProduct}=="0907", MODE="0666", GROUP="plugdev"

I added myself to plugdev (then rebooted):

sudo adduser $(whoami) plugdev

CLI

You can install it globally with npm i -g @gk6x/cli, and it will install gk6x in your path. You can also use it without installing npx @gk6x/cli.

gk6x <command>

Commands:
  gk6x config <file>            Use le or pixeltris config format (easier to u
                                  se) to setup your keyboard
  gk6x convert <fileA> <fileB>  Convert to/from pixeltris and official le
  gk6x apple                    Force your keyboard to pretend it's an officia
                                  l apple keyboard
  gk6x normal                   Remove the weird apple setup

Options:
  --help     Show help                                                 [boolean]
  --version  Show version number                                       [boolean]

Be careful with apple it messes with the keyboard ID to make it seem like an official apple keyboard. You can set it back with normal, but you might need sudo on mac/linux.

library

You can also use this as a library in your own node-based project like this:

npm i @gk6x/core

It's probably only useful for people who want to write their own GUI or CLI utility.

todo

thanks

This is all due to the awesome work of @pixeltris in C#. They, in-turn, used @wgwoods work in python.

About

This adds support for GK6X keyboards in nodejs.

Resources

License

Stars

Watchers

Forks

Packages

No packages published