GitXplorerGitXplorer
m

qmk_rc

public
59 stars
0 forks
5 issues

Commits

List of commits on branch latest.
Unverified
08977af558db82bc9223d70fffe0ac4398af6c19

Link to the commands document

mmmalecki committed 4 years ago
Unverified
23da433194622bd7e9b2da41d79a28c5795f9c8c

Reformat README code example

mmmalecki committed 4 years ago
Unverified
4124ac5def50bebd3384aa0ddc68fe5805494d14

Document commands

mmmalecki committed 4 years ago
Unverified
005a5f59bed83b731223f174a7dd70459891abaa

Implement more commands

mmmalecki committed 4 years ago
Unverified
690aca84b299d7fc2d90dfa53a00ea76e3f77bd2

Note device selector, basic API usage

mmmalecki committed 4 years ago
Unverified
fc54089baaf33f429533227e173ae4b1f417118e

This is a quick start, really

mmmalecki committed 4 years ago

README

The README file for this repository.

QMK RC

QMK RC is a project that aims to bring the same convenience to controlling your QMK keyboard from your computer, as QMK did to programming keyboards.

Quick start

To get started with QMK RC, you need to set up the keyboard and the host. Let's start with the keyboard:

Keyboard firmware

First, fetch the QMK RC source either into your keymap, or user directory:

bash <(wget -qO- https://raw.githubusercontent.com/mmalecki/qmk_rc/latest/bin/qmkrc_fetch)

Next, add these files to the SRC list in your rules.mk and enable the necessary QMK feature:

SRC += qmk_rc.c
RAW_ENABLE = yes

And include the header in your keymap.c:

#include "qmk_rc.h"

From here on, you can start feeding the QMK RC raw HID data:

#ifdef RAW_ENABLE
#define QMK_RC_BUFFER_MAX 64
uint8_t qmk_rc_buffer[QMK_RC_BUFFER_MAX] = {};

void raw_hid_receive(uint8_t *data, uint8_t length) {
  qmk_rc_receive(qmk_rc_buffer, QMK_RC_BUFFER_MAX, data, length);
}
#endif

Flash your keyboard with the modified software, as you usually do.

Host software

The host application is distributed as an npm package. To get it installed, run:

npm -g install qmkrcd

Play time!

Now, to the fun part.

Launch qmkrcd by typing qmkrcd. It will scan the HID devices attached to the host, and attempt to find one that quacks like a QMK-supported keybaord.

Alternatively, you can have qmkrcd connect to a specified device by passing its name as an argument: qmkrcd 'foostan corne'.

If qmkrcd doesn't find your device, please open an issue on its repository.

From now on, you should be able to control your keyboard. For example, to write a string to an OLED attached to your keyboard:

curl 127.0.0.1:9916/command -XPOST \
  -H 'content-type: application/json' \
  -d '{"id":3,"data":"Hello, QMK RC!"}' -v

For a full list of built-in commands, see Commands. You can also implement your own, Custom commands.

Acknowledgments

  • The QMK team for authoring an amazing piece of software
  • libuv team for their test framework