Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for other CoolerMaster CK5xx keyboards #2

Open
cscheib opened this issue May 2, 2019 · 6 comments
Open

Support for other CoolerMaster CK5xx keyboards #2

cscheib opened this issue May 2, 2019 · 6 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@cscheib
Copy link

cscheib commented May 2, 2019

These keyboards all use the same SDK, so you'd only need to listen for more USB IDs. I'm not a Swift developer, otherwise I'd submit a PR.

I cracked open the code, changed the product_id (pid) to 0x009f:

func startHIDMonitoring() -> Bool { return hid.monitorEnumeration(vid: 0x2516, pid: 0x009f, usagePage: 0xFF00, usage: 0x00) }

and was able to get my CK530 working with this... so it's definitely possible. I just don't know how to monitor more than one USB ID!

@cscheib
Copy link
Author

cscheib commented May 2, 2019

Forked and showed my work in #3

@vookimedlo
Copy link
Owner

Perfect! I will find some time to refactor the code to include your changes.
The code is based on the sniffed USB communication, so I'm glad to hear that it works also for 530 series.
Thanks!

@vookimedlo vookimedlo self-assigned this May 8, 2019
@vookimedlo vookimedlo added the enhancement New feature or request label May 8, 2019
vookimedlo added a commit that referenced this issue May 8, 2019
- reported & suggested by @cscheib
- additional keyboard models can be added by extending the KeyboardPIDs enum
@vookimedlo
Copy link
Owner

vookimedlo commented May 8, 2019

  • modified code to support multiple USB PIDs and enabled CK530 model.
  • updated the root readme.md
    -- CK530 is enabled
    -- how to enable other models
  • the intention is not to enable other CK models until there is a positive feedback from the given keyboard owner
    -- this application is based on the USB sniffed communication and does not do the same operations which the official Windows SDK does
    -- in other words, even the single SDK is officially provided for multiple CK models, there is no guarantee that it produces the same USB HID commands for all those CK models

@cscheib Thanks for letting me know that CK530 is compatible.
The new release was created.

@cscheib
Copy link
Author

cscheib commented May 9, 2019

@vookimedlo awesome, thanks!

@wenbert
Copy link

wenbert commented Aug 26, 2019

Note that although it works not all keys light up.

  • ESC, F2, F3, F11, F12, PRT SC,
  • ~, 2, 0, =, INS
  • TAB, Q, P, ], , PGDN
  • H ;
  • B . /
  • Left CTL, Right Alt, Left arrow key

@vookimedlo
Copy link
Owner

I don't have a CK530 keyboard, so I cannot do USB communication sniffs and see where those mentioned keys are encoded.

However, you can debug it without a USB sniffer on your side, by changing offsets in map below (by 3 - // R,G,B -> three bytes).

https://github.com/vookimedlo/ck550-macos/blob/master/src/CK550OffEffectCustomizationLayoutUS.swift

required init() {
        mapping[Key.escape.rawValue] = KeyData(packet: 0, offset: 0x18)
        mapping[Key.backQuote.rawValue] = KeyData(packet: 0, offset: 0x1B)
        mapping[Key.tab.rawValue] = KeyData(packet: 0, offset: 0x1E)
        mapping[Key.capslock.rawValue] = KeyData(packet: 0, offset: 0x21)
        mapping[Key.leftShift.rawValue] = KeyData(packet: 0, offset: 0x24)
        mapping[Key.leftCtrl.rawValue] = KeyData(packet: 0, offset: 0x27)
        mapping[Key.leftWin.rawValue] = KeyData(packet: 0, offset: 0x39)

@vookimedlo vookimedlo reopened this Oct 19, 2019
@vookimedlo vookimedlo added the help wanted Extra attention is needed label Oct 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants