Coder Social home page Coder Social logo

ch57x-keyboard-tool's Introduction

What is this?

This is an utility for programming small keyboards like this one:

Such keyboards are popular on AliExpress and seller usually sends software for programming, but it:

  • requires Windows,
  • is very ugly and inconvenient,
  • can only program one key at a time
  • don't expose all keyboard features

There are several modifications of such keyboards with different number of buttons and knobs (see some photos) and with/without Bluetooth.

Both wired and wireless keyboards are supported, however programming is possible though wire only in both cases!

Utility was reported to work with:

All these keyboards share same vendor/product IDs: 1189:8890 (hexadecimal). It is possible to override used vendor/product ID, but it is usually not needed. Use it only if you find same-looking keyboard with other vendor/product ID, I haven't seen such.

Ability to override vendor/product ID doesn't mean that you can use this software for programming arbitrary keyboards!

How to get it?

Get prebuilt release

Download latest release from GitHub releases

Build it yourself

Install cargo utility using rustup, then execute cargo install ch57x-keyboard-tool.

How to use?

Note: on Windows you need to install USBDK first.

Now create you own config from provided example-mapping.yaml. Example config has extensive documentation and examples inside.

You can validate config:

./ch57x-keyboard-tool validate < your-config.yaml

Use 'show-keys' command to list all supported modifier and key names.

Finally, upload config to keyboard:

./ch57x-keyboard-tool upload < your-config.yaml

Use 'sudo' if you get 'Access denied (insufficient permissions)':

sudo ./ch57x-keyboard-tool upload < your-config.yaml

You can also change LED configuration, if you keyboard supports it:

./ch57x-keyboard-tool led 1

Windows / PowerShell

Use Get-Content for input redireciton:

Get-Content your-config.yaml | ./ch57x-keyboard-tool validate

Automation

The frequent question is "How to run script / emulate several keys / … on key press?" This tool does just one job — writes your key bindings into keyboard and then exists, it does not listen for pressed key. If you want any automation, use third-party automation tools, like BetterTouchTool or dozens of other.

  1. Choose some chord you don't usually use, like 'alt-ctrl-shift-1' and assign to some key
  2. Use third-party tool to listen for this chord and perform action you want.
  3. Done!

Notes

Number of layers

All keyboards I've seen have three layer (three keys configuration which may be switched). However I've been told there are keyboards without layer switch. If so, just keep single layer in configuration file and you are done.

Custom keyboard layouts

If you use custom keyboard layout, like Dvorak, note that what you write in configuration is in fact scan code of keyboard key and not character that will be produced.

So use QWERTY-letter of keyboard key you want to press.

3x1 keys + 1 knob keyboard limitations

This modification does support key modifiers (like ctrl-, alt-) for the first key in sequence only.

So you can use: ctrl-alt-del,1,2, but not ctrl-alt-del,alt-1,2.

Diagnostics

If you have any troubles using this software, please provide diagnostics.

Getting list of attached USB devices

MacOS

ioreg -w0 -l -p IOUSB

or

system_profiler SPUSBDataType

Linux

lsusb -v

Monitoring generated keyboard and mouse events

Most simple (and cross-platform) way I've found is using keyboard and mouse Python modules.

Monitoring keyboard:

pip3 install keyboard
sudo python3 -m keyboard

Monitoring mouse:

# Latest published 'mouse' module doesn't support MacOS, so use latest version from Git:
git clone https://github.com/boppreh/mouse
cd mouse
python3 -m mouse

Photos

ch57x-keyboard-tool's People

Contributors

43615 avatar kriomant avatar sidevesh avatar thomas-louvigne avatar thomasrinsma avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

damnkrat

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.