libcmmk icon indicating copy to clipboard operation
libcmmk copied to clipboard

Support SK650

Open lbl42 opened this issue 4 years ago • 6 comments

Got me a new CoolerMaster Keyboard and I would really like some kind of software integration on Linux. And I'm willing to help. But I would like help on where to start, what needs to be done and if my keyboard can be supported with this library.

So how do I find out if my keyboard can be supported?

I hackishly added my keyboard to the library already so that I can run the test and debug commands. The first part of the test did not work, the second part lit up some keys which looked not intended. But I just added everywhere an SK650 entry.

Bus 001 Device 031: ID 2516:008d Cooler Master Co., Ltd.

lbl42 avatar Jan 19 '20 22:01 lbl42

Just saw the Pull request for the sk630. Checking that one out :-)

lbl42 avatar Jan 19 '20 22:01 lbl42

If some keys light up, that's a good sign which means it still speaks the same protocol.

That it lights up random keys is expected because the button layouts for MasterKeys devices tend to be all over the place, which means for every model we have to manually map out which key has which internal ID and build a lookup map for it.

I might have such a mapper program lying around somewhere still that one can use to generate a layout without needing to drop into the code.

chmod222 avatar Jul 01 '20 08:07 chmod222

I'm also very interested in 650 support. I tried to replace every 630 reference with 650, and changed the usb-id to 0x008d. Running ./test/cmmk-test didnt do anything on first, but hitting ^c made every button flash one by one top left to bottom right (except the keys on the num-pad).

Here is the output of cmmk-debug as well:

Attaching to 2516:008d alias "Cooler Master Masterkeys SK650"...
Layout detected as: 7 alias "EU"
Firmware version:
Hexdump of handshake #1:
        0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
000000: ff aa 00 00 01 02 00 00 00 00 00 00 00 00 00 00  ................
000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
        0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F

Hexdump of handshake #2:
        0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
000000: ff aa 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
        0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
Effect enabled: 1
Effect enabled: 2
Effect enabled: 0
Effect enabled: 0
Effect enabled: 0
Effect enabled: 0
Effect enabled: 0
Effect enabled: 0
Effect enabled: 0
Effect enabled: 0

xeor avatar Aug 17 '20 08:08 xeor

I did fix that

lbl42 avatar Aug 19 '20 20:08 lbl42

My pull request was to the original implementer of the SK630 who's inactive. Sorry @xeor , for the duplicate work.

Now somebody needs to do US layout... And @chmod222 needs to choose...

lbl42 avatar Aug 19 '20 20:08 lbl42

@lbl42 cool, no worries :) I learned something new! You got the keymap mapped as well I see. Do you mind share how you got the key-codes?

xeor avatar Aug 19 '20 21:08 xeor