Jump to content
Corsair Community

(Unofficial) Linux / OSX Driver


MSC

Recommended Posts

  • Replies 824
  • Created
  • Last Reply

Top Posters In This Topic

Hi,

ckb 0.2.6 is not detecting K65 LUX RGB. Any ideas why?

Thank you

Because it is not supported, not yet at least:

Device Support

 

Keyboards:

 

K65 RGB

K70

K70 RGB

K95*

K95 RGB

Strafe

Strafe RGB

* = hardware playback not supported. Settings will be saved to software only.

 

Mice:

 

M65 RGB

Sabre RGB

Scimitar RGB

Link to comment
Share on other sites

Thank you, do you think it will be supported any time soon?

 

I have no idea honestly, I use windows so I don't follow closely this unofficial driver :D:

 

But supporting the new devices shouldn't be a big change, they are basically the old devices with true 16,8m colors support (no flicker).

Link to comment
Share on other sites

i know the linux driver can't do macros but i was thinking that maybe i can set the key to run a script that execute the macro but i'm really new to linux and i'm kind of lost in the macro department if anyone can point me in the right direction i'll be really thankful
Link to comment
Share on other sites

i know the linux driver can't do macros but i was thinking that maybe i can set the key to run a script that execute the macro but i'm really new to linux and i'm kind of lost in the macro department if anyone can point me in the right direction i'll be really thankful

 

You may have a look here: http://forum.corsair.com/forums/showpost.php?p=830061&postcount=601

Link to comment
Share on other sites

  • 2 weeks later...

Hello!

 

First off I would like to thank MSC for making this driver. Without it, I would not have bought a Corsair keyboard, that is for sure.

 

Now, I have some problems figuring out how to install it correctly. I am using Linux Mint Cinnamon, x64. Using the quickinstall gave this result (and more preceding this, but I do not want to spam the forum. Let me know if it is needed.) and I am not sure how to proceed.

 

make[2]: Leaving the catalogue "/home/nodcom/Dokument/ckb-master/src/ckb"
make[1]: Lämnar katalogen "/home/nodcom/Dokument/ckb-master/src/ckb"
In file included from main.c:1:0:
../ckb/ckb-anim.h: In function ‘ckb_getline’:
../ckb/ckb-anim.h:241:10: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
    fgets(line, sizeof(line), stdin);
         ^

In file included from main.c:1:0:
../ckb/ckb-anim.h: In function ‘ckb_getline’:
../ckb/ckb-anim.h:241:10: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
    fgets(line, sizeof(line), stdin);
         ^
In file included from main.c:1:0:
../ckb/ckb-anim.h: In function ‘ckb_getline’:
../ckb/ckb-anim.h:241:10: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
    fgets(line, sizeof(line), stdin);
         ^
In file included from main.c:1:0:
../ckb/ckb-anim.h: In function ‘ckb_getline’:
../ckb/ckb-anim.h:241:10: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
    fgets(line, sizeof(line), stdin);
         ^
In file included from main.c:1:0:
../ckb/ckb-anim.h: In function ‘ckb_getline’:
../ckb/ckb-anim.h:241:10: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
    fgets(line, sizeof(line), stdin);
         ^
In file included from main.c:1:0:
../ckb/ckb-anim.h: In function ‘ckb_getline’:
../ckb/ckb-anim.h:241:10: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
    fgets(line, sizeof(line), stdin);
         ^
usb_linux.c: In function ‘os_closeusb’:
usb_linux.c:214:9: error: implicit declaration of function ‘udev_device_unref’ [-Werror=implicit-function-declaration]
        udev_device_unref(kb->udev);
        ^
usb_linux.c: In function ‘os_setupusb’:
usb_linux.c:268:5: error: implicit declaration of function ‘udev_device_get_sysattr_value’ [-Werror=implicit-function-declaration]
    const char* name = udev_device_get_sysattr_value(dev, "product");
    ^
usb_linux.c:268:24: warning: initialization makes pointer from integer without a cast [enabled by default]
    const char* name = udev_device_get_sysattr_value(dev, "product");
                       ^
usb_linux.c:272:26: warning: initialization makes pointer from integer without a cast [enabled by default]
    const char* serial = udev_device_get_sysattr_value(dev, "serial");
                         ^
usb_linux.c:277:28: warning: initialization makes pointer from integer without a cast [enabled by default]
    const char* firmware = udev_device_get_sysattr_value(dev, "bcdDevice");
                           ^
usb_linux.c:286:26: warning: initialization makes pointer from integer without a cast [enabled by default]
    const char* ep_str = udev_device_get_sysattr_value(dev, "bNumInterfaces");
                         ^
usb_linux.c: In function ‘usbadd’:
usb_linux.c:303:5: error: implicit declaration of function ‘udev_device_get_devnode’ [-Werror=implicit-function-declaration]
    const char* path = udev_device_get_devnode(dev);
    ^
usb_linux.c:303:24: warning: initialization makes pointer from integer without a cast [enabled by default]
    const char* path = udev_device_get_devnode(dev);
                       ^
usb_linux.c:304:5: error: implicit declaration of function ‘udev_device_get_syspath’ [-Werror=implicit-function-declaration]
    const char* syspath = udev_device_get_syspath(dev);
    ^
usb_linux.c:304:27: warning: initialization makes pointer from integer without a cast [enabled by default]
    const char* syspath = udev_device_get_syspath(dev);
                          ^
usb_linux.c: In function ‘usb_add_device’:
usb_linux.c:372:26: warning: initialization makes pointer from integer without a cast [enabled by default]
    const char* vendor = udev_device_get_sysattr_value(dev, "idVendor");
                         ^
usb_linux.c:374:31: warning: initialization makes pointer from integer without a cast [enabled by default]
        const char* product = udev_device_get_sysattr_value(dev, "idProduct");
                              ^
usb_linux.c: In function ‘usb_rm_device’:
usb_linux.c:389:27: warning: initialization makes pointer from integer without a cast [enabled by default]
    const char* syspath = udev_device_get_syspath(dev);
                          ^
usb_linux.c: In function ‘udev_enum’:
usb_linux.c:401:12: error: implicit declaration of function ‘udev_enumerate_new’ [-Werror=implicit-function-declaration]
    struct udev_enumerate* enumerator = udev_enumerate_new(udev);
           ^
usb_linux.c:401:41: warning: initialization makes pointer from integer without a cast [enabled by default]
    struct udev_enumerate* enumerator = udev_enumerate_new(udev);
                                        ^
usb_linux.c:402:5: error: implicit declaration of function ‘udev_enumerate_add_match_subsystem’ [-Werror=implicit-function-declaration]
    udev_enumerate_add_match_subsystem(enumerator, "usb");
    ^
usb_linux.c:403:5: error: implicit declaration of function ‘udev_enumerate_add_match_sysattr’ [-Werror=implicit-function-declaration]
    udev_enumerate_add_match_sysattr(enumerator, "idVendor", V_CORSAIR_STR);
    ^
usb_linux.c:404:5: error: implicit declaration of function ‘udev_enumerate_scan_devices’ [-Werror=implicit-function-declaration]
    udev_enumerate_scan_devices(enumerator);
    ^
usb_linux.c:406:5: error: implicit declaration of function ‘udev_enumerate_get_list_entry’ [-Werror=implicit-function-declaration]
    devices = udev_enumerate_get_list_entry(enumerator);
    ^
usb_linux.c:406:13: warning: assignment makes pointer from integer without a cast [enabled by default]
    devices = udev_enumerate_get_list_entry(enumerator);
            ^
usb_linux.c:408:5: error: implicit declaration of function ‘udev_list_entry_foreach’ [-Werror=implicit-function-declaration]
    udev_list_entry_foreach(dev_list_entry, devices){
    ^
usb_linux.c:408:53: error: expected ‘;’ before ‘{’ token
    udev_list_entry_foreach(dev_list_entry, devices){
                                                    ^
usb_linux.c: In function ‘usbmain’:
usb_linux.c:429:5: error: implicit declaration of function ‘udev_new’ [-Werror=implicit-function-declaration]
    if(!(udev = udev_new())){
    ^
usb_linux.c:429:15: warning: assignment makes pointer from integer without a cast [enabled by default]
    if(!(udev = udev_new())){
              ^
usb_linux.c:438:12: error: implicit declaration of function ‘udev_monitor_new_from_netlink’ [-Werror=implicit-function-declaration]
    struct udev_monitor* monitor = udev_monitor_new_from_netlink(udev, "udev");
           ^
usb_linux.c:438:36: warning: initialization makes pointer from integer without a cast [enabled by default]
    struct udev_monitor* monitor = udev_monitor_new_from_netlink(udev, "udev");
                                   ^
usb_linux.c:439:5: error: implicit declaration of function ‘udev_monitor_filter_add_match_subsystem_devtype’ [-Werror=implicit-function-declaration]
    udev_monitor_filter_add_match_subsystem_devtype(monitor, "usb", 0);
    ^
usb_linux.c:440:5: error: implicit declaration of function ‘udev_monitor_enable_receiving’ [-Werror=implicit-function-declaration]
    udev_monitor_enable_receiving(monitor);
    ^
usb_linux.c:442:5: error: implicit declaration of function ‘udev_monitor_get_fd’ [-Werror=implicit-function-declaration]
    int fd = udev_monitor_get_fd(monitor);
    ^
usb_linux.c:449:20: error: implicit declaration of function ‘udev_monitor_receive_device’ [-Werror=implicit-function-declaration]
            struct udev_device* dev = udev_monitor_receive_device(monitor);
                   ^
usb_linux.c:449:39: warning: initialization makes pointer from integer without a cast [enabled by default]
            struct udev_device* dev = udev_monitor_receive_device(monitor);
                                      ^
usb_linux.c:452:13: error: implicit declaration of function ‘udev_device_get_action’ [-Werror=implicit-function-declaration]
            const char* action = udev_device_get_action(dev);
            ^
usb_linux.c:452:34: warning: initialization makes pointer from integer without a cast [enabled by default]
            const char* action = udev_device_get_action(dev);
                                 ^
usb_linux.c:470:5: error: implicit declaration of function ‘udev_monitor_unref’ [-Werror=implicit-function-declaration]
    udev_monitor_unref(monitor);
    ^
usb_linux.c: In function ‘usbkill’:
usb_linux.c:475:5: error: implicit declaration of function ‘udev_unref’ [-Werror=implicit-function-declaration]
    udev_unref(udev);
    ^
cc1: some warnings being treated as errors
make[2]: *** [debug/usb_linux.o] Fel 1
make[2]: *** Inväntar oav****ade jobb...
notify.c: In function ‘nprintf’:
notify.c:17:13: error: implicit declaration of function ‘va_start’ [-Werror=implicit-function-declaration]
            va_start(va_args, format);
            ^
cc1: some warnings being treated as errors
kbbindwidget.ui: Warning: Z-order assignment: 'verticalSpacer' is not a valid widget.
make[2]: *** [debug/notify.o] Error 1
make[1]: *** [debug] Error 2
make: *** [sub-src-ckb-daemon-make_first] Error 2
make: *** Awaiting unfinished tasks...

Press enter to exit.

 

I did some minor edits to the output, the original had some lines in Swedish.

Link to comment
Share on other sites

Hi,

ckb 0.2.6 is not detecting K65 LUX RGB. Any ideas why?

Thank you

k65 lux is supported, you need to build it from source found in the newdev branch. I just did this and it works fine on my mac, very pleased so I donated a couple bucks. https://github.com/ccMSC/ckb/issues/386

 

k70lux also seems to be supported in this dev

Edited by retrotransposon
Added info
Link to comment
Share on other sites

Strafe RGB MX Silent.

 

I was unsuccessful at first but having just installed CKB without a hitch I now know it was me not understanding how to run the quick install script. This should work for anyone using the above keyboard. The designer of this program and any contributers are really appreciated as I now enjoy the full beauty of this lovely keyboard.

Edited by John Nimrod
To provide additional information
Link to comment
Share on other sites

Wow this is really impressive! Good work! Will this work for the new K70 RGB LUX thats coming out?

 

The latest Mac binary does not, as of writing. It is apparently in the code though, so you can compile yourself to get support, or wait for the next binary release (hopefully soon!).

 

Edit: though I have not actually been able to get it to detect my K70 non-RGB LUX even when compiling from the newdev branch... KB is running the latest firmware (confirmed by plugging into Cue on Windows)

 

Edit #2: It took some editing of the source files but I was able to get it to work. See comments here: https://github.com/ccMSC/ckb/issues/386#issuecomment-232128936

Edited by bwoodruff
Link to comment
Share on other sites

Killer work MSC & Others!

Really cool to see someone did something about this.

 

Just got the K95 keyboard knowing the OSX driver was in progress.

My main interest is in the binding of the "G" keys.

 

I would like, for example, to have G1 = Ctrl + Shift + Alt + E

 

Does anybody know how to bind such a key combination?

Thanks a lot for the help!!

 

-J

Link to comment
Share on other sites

This worked absolutely brilliantly for me. I just followed the instructions and looked up how to run a script as my knowledge of Linux is still limited to opening the terminal and mostly copying command lines I have Googled.

Thank you for this amazing work.

Link to comment
Share on other sites

Killer work MSC & Others!

Really cool to see someone did something about this.

 

Just got the K95 keyboard knowing the OSX driver was in progress.

My main interest is in the binding of the "G" keys.

 

I would like, for example, to have G1 = Ctrl + Shift + Alt + E

 

 

If you installed the Version containing macro programming (it was in the testing branch), you are able to program each G-Key. You may have a look at this post with a short video tutorial how to use it:

http://forum.corsair.com/forums/showpost.php?p=830061&postcount=601

Link to comment
Share on other sites

Using the great work done on by MSC, Frickler, and others I have created a fork (and a pull request) of the testing branch that allows for key-by-key delay in macro playback as well as a global delay.

 

https://github.com/stephenhouser/ckb/tree/macro-delay

 

Here is an excerpt from the DAEMON.md documentation:

-----------------------

Macro playback delay

 

There are two types of playback delay that can be set with macros; global and local. Setting a global delay value introduces a time delay between events during macro execution or playback. Local delay allows setting the delay after an individual event, overriding the global delay value for that event. Thus global delay can be used to set the overall playback speed of macros and local delays can be used to tune individual events within a macro.

 

All delay values are specified in microseconds (us) and are positive values from 0 to UINT_MAX - 1. This means delays range from 0 to just over 1 hour (4,294,967,294us, 4,294 seconds, 71 minutes, or 1.19 hours). A value of zero (0) represents no delay between actions.

 

Global macro delay (default delay)

 

Global delay allows macro playback speed to be changed. It sets the time between (actually after) each recorded macro event. If global delay is set to 1 microsecond then a 1 ms delay will follow each individual macro event when the macro is triggered.

 

The global delay is set with the ckb-daemon's existing (in testing branch) delay command followed by an unsigned integer representing the number of microseconds to wait after each macro action and before the next.

 

Global delay can also be set to on which maintains backwards compatibility with the current development of ckb-daemon for long macro playback. That is, setting the global delay to on introduces a 30us and a 100us delay based on the macro's length during playback.

 

NOTE: This setting also introduces a delay after the last macro action. This functionality exists in the current testing branch and was left as-is. It is still to be determined if this is a bug or a feature.

 

Examples:

 

delay 1000 sets a 1,000us delay between action playback.

delay on sets long macro delay; 30us for actions between 20 and 200, 100us for actions > 200.

delay off sets no delay (same as 0).

delay 0 sets no delay (same as off).

delay spearmint-potato is invalid input, sets no delay (same as off).

 

Local macro delay (keystroke delay)

 

Local Delay allows each macro action to have a post-action delay associated with it. This allows a macro to vary it's playback speed for each event. If no local delay is specified for a macro action, then the global delay (above) is used. All delay values are in microsecods (us) as with the global delay setting.

 

Examples:

 

macro g5:+d,-d,+e=5000,-e,+l,-l=10000,+a,-a,+y,-y=1000000,+enter,-enter define a macro for g5 with a 5,000us delay between the e down and e up actions. A 1,000us delay between l up and a down, a delay of one second (1,000,000us) after y up and before enter, and the global delay for all other actions.

 

macro g5:+d,-d=0 use default delay between d down and d up and no delay (0us) after d up. This removes the noted feature/bug (above) where the last action has a trailing delay associated with it.

Edited by 0xACE
Link to comment
Share on other sites

Your solution with the delay in the macro definition is a good approach.

 

Thank you.

 

In the GUI you can insert your delays manually - or does one have an other idea to define the delays while typing the macro definition?

 

Yes you can manually enter the local delays in the GUI. In the textbox where the macro gets recorded. My only idea on recording the delay was to track the time between keystrokes when recording. I've not developed in Qt so the GUI is foreign to me at the moment.

 

Also, I have not adapted the GUI for setting the global delay to a value either. I did make the globe delay value accept 'on' so that it would be compatible with the current GUI.

Link to comment
Share on other sites

Yes you can manually enter the local delays in the GUI. In the textbox where the macro gets recorded. My only idea on recording the delay was to track the time between keystrokes when recording. I've not developed in Qt so the GUI is foreign to me at the moment.

 

Today I did some development on the GUI for this. When recording a macro, the delays between the key pressures and releases are noted as you described in your first post.

 

That's really a very early test...

What I'm missing are the following aspects:

- some UI-Elements to select "no delay / standard delay / delays reccorded" and so on. Not a big thing, but there is no space anymore...

- the first delay should be omitted, because it is useless

- maybe there is need for limiting delays (does a delay > 1 or 2 seconds make sense?)

 

If this is what you think about, we should diskuss how to bring the development together. What branch is your Pullrequest based on? If on the testing stage I can merge it easily (my branch is based on the actual testing branch). Otherwise maybe ccMSC is accepting your pullreq.

 

Mid of September I will have some time for this.

967528828_ckbmacroswithdelay.thumb.jpg.2aa1aebf5c905682f807b5eaa3df8645.jpg

Link to comment
Share on other sites

What branch is your Pullrequest based on? If on the testing stage I can merge it easily (my branch is based on the actual testing branch).

 

It is based on the testing branch and shows no merge conflicts with that branch at the moment.

 

I will have to think about you other GUI questions. I'm not sure what the best approach would be for the GUI. But, yes, merging the development would be best.

 

Mid-september is fine. I'm in no rush.

Link to comment
Share on other sites


×
×
  • Create New...