Coder Social home page Coder Social logo

node-gk6x's Introduction

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.

node-gk6x's People

Contributors

konsumer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

bon3less

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.