The Corsair User Forums  

Go Back   The Corsair User Forums > Corsair Product Discussion > Keyboards and Mice

Reply
 
Thread Tools Search this Thread Rating: Thread Rating: 130 votes, 5.00 average. Display Modes
  #16  
Old 11-02-2014, 12:30 AM
SpeedFreak01 SpeedFreak01 is offline
Registered User
SpeedFreak01's PC Specs
 
Join Date: Oct 2014
Posts: 17
POST ID # = 739476
SpeedFreak01 Reputation: 10
Default

MSC you're an absolute legend!.

I can now consistently get the keyboard to work using your driver.

Still a bit fiddly given the fact i need to have another keyboard on hand so i can start the driver etc, but its a dam sight better than the out of the box solution from corsair :P

Still a few bugs.. most of them you have listed on git already.

Some key combinations do odd things, for example alt+arrow keys.
Quite often I will use alt+left arrow key to quickly skip words in a terminal. At the moment that key combo produces a capital D.

Been having some fun playing around with lighting combinations.
Any idea if you can set the colour for the G keys?

Also getting way ahead of myself here.. what do you think the chances are of being able to write to the keyboards internal memory to enable profile switching with the M keys?
Reply With Quote


  #17  
Old 11-02-2014, 07:24 AM
MSC's Avatar
MSC MSC is offline
Linux/OSX driver
 
Join Date: Oct 2014
Posts: 246
POST ID # = 739509
MSC Reputation: 10
Default

Nice! I tried pressing Alt+Left in a terminal and I get a capital D as well, but all of my other keyboards do the same thing. Do you have a non-US layout or any alternate key bindings? I'm working on key rebinding now, so once it's done you should be able to solve the problem that way if nothing else. After that I'll get started on a better control utility so that you can edit the colors/bindings easily.

Unfortunately CUE currently won't write hardware profiles (Corsair says they've disabled it due to firmware issues) so I won't be able to do anything with them until that functionality is added back. Once it is I'll certainly try to implement it.
Reply With Quote


  #18  
Old 11-02-2014, 10:49 AM
jacks0_0 jacks0_0 is offline
Registered User
 
Join Date: Oct 2014
Posts: 2
POST ID # = 739541
jacks0_0 Reputation: 10
Default

I'm trying to run make, but there is an error:
src/ckb-daemon/includes.h:8:10: fatal error: 'features.h' file not found

When will you release a MAC version? :)
Reply With Quote


  #19  
Old 11-02-2014, 10:53 AM
BillRathbone BillRathbone is offline
Banned
 
Join Date: Jun 2014
Posts: 210
POST ID # = 739544
BillRathbone Reputation: 60
Default

The latest CUE release re enables saving profiles to the device, btw.
Reply With Quote


  #20  
Old 11-03-2014, 02:19 AM
SpeedFreak01 SpeedFreak01 is offline
Registered User
SpeedFreak01's PC Specs
 
Join Date: Oct 2014
Posts: 17
POST ID # = 739656
SpeedFreak01 Reputation: 10
Default

Quote:
Originally Posted by BillRathbone View Post
The latest CUE release re enables saving profiles to the device, btw.
Do you guys happen to have any documentation on how to push profiles to the device outside the CUE app?
Reply With Quote


  #21  
Old 11-03-2014, 04:11 AM
MSC's Avatar
MSC MSC is offline
Linux/OSX driver
 
Join Date: Oct 2014
Posts: 246
POST ID # = 739662
MSC Reputation: 10
Default

Quote:
Originally Posted by jacks0_0 View Post
I'm trying to run make, but there is an error:
src/ckb-daemon/includes.h:8:10: fatal error: 'features.h' file not found

When will you release a MAC version? :)
That's strange..what distro are you running? Can you post the output of "find /usr -name features.h" ?

I'm going to start working on a mac version soon. No promises yet since I'm not sure how many differences the OS has compared to linux, but I'll give it a shot sometime in the next week or two.

Quote:
Originally Posted by BillRathbone View Post
The latest CUE release re enables saving profiles to the device, btw.
Ah, so it does.

Quote:
Originally Posted by SpeedFreak01 View Post
Do you guys happen to have any documentation on how to push profiles to the device outside the CUE app?
I took a quick look at the hardware save commands and they don't look too complicated (in fact, the RGB commands are exactly the same as the regular ones). I need to code the concept of profiles into the daemon first, but I should be able to implement this soon.
Reply With Quote


  #22  
Old 11-05-2014, 01:35 AM
SpeedFreak01 SpeedFreak01 is offline
Registered User
SpeedFreak01's PC Specs
 
Join Date: Oct 2014
Posts: 17
POST ID # = 740080
SpeedFreak01 Reputation: 10
Default

Quote:
Originally Posted by MSC View Post
I took a quick look at the hardware save commands and they don't look too complicated (in fact, the RGB commands are exactly the same as the regular ones). I need to code the concept of profiles into the daemon first, but I should be able to implement this soon.
Awesome, no rush on that, keyboard is working fine as is.

Haven't had a chance to play with the macro settings, will do that tonight.

Also noticed that the numlock and capslock lights work correctly now. Actually amazed given these lights didn't work correctly on windows for me.

The alt+left arrow combo to skip over words in a terminal seems to be working, not sure if its something you did or maybe i restarted my pc? Either way, no issues there.

One other thing i have noticed, and i really need to get more examples to explain it better, but it seems if i plug the keyboard in, start the driver everything works fine, all key mappings are correct.
However, if i kill the daemon and restart it, the key mappings on the keyboard seem to do some weird things, F keys will often produce odd characters etc.
To fix it i need to unplug the keyboard, plug it in again, and restart the daemon.
I honestly havent checked logs or anything to work out whats going on. So will leave it for now and if i can figure out a way to replicate the issues will post an update.
Reply With Quote


  #23  
Old 11-05-2014, 05:41 AM
swarfega's Avatar
swarfega swarfega is offline
Registered User
swarfega's PC Specs
 
Join Date: Oct 2014
Posts: 105
POST ID # = 740091
swarfega Reputation: 13
Default

Nice job with this. Linux is always being left out.

As one person said, hire this person or at least sponsor the project.
Reply With Quote


  #24  
Old 11-05-2014, 04:34 PM
MSC's Avatar
MSC MSC is offline
Linux/OSX driver
 
Join Date: Oct 2014
Posts: 246
POST ID # = 740203
MSC Reputation: 10
Default

I'd be happy forever if Corsair officially endorsed this (nudge nudge ;). It's still not nearly complete, but I definitely think I'll be able to provide all of the same functionality as the Windows driver once I'm finished.

Quote:
Originally Posted by SpeedFreak01 View Post
One other thing i have noticed, and i really need to get more examples to explain it better, but it seems if i plug the keyboard in, start the driver everything works fine, all key mappings are correct.
However, if i kill the daemon and restart it, the key mappings on the keyboard seem to do some weird things, F keys will often produce odd characters etc.
To fix it i need to unplug the keyboard, plug it in again, and restart the daemon.
I honestly havent checked logs or anything to work out whats going on. So will leave it for now and if i can figure out a way to replicate the issues will post an update.
I've had this issue as well, the daemon doesn't seem to shut down completely cleanly. Not sure yet if it's a hardware problem or if there's something I should be doing differently software-side.

I just spent an entire day hitting my head against the wall trying to figure out why the keyboard was reporting all three hardware profiles as having the same RGB settings, only to import them into CUE again and realize that the Windows driver has the exact same problem. Now I see why this was disabled. The save works fine, though, so there's at least that.

By the way, can anybody with a K70 test this (specifically the hwload and hwsave commands)? I know the K70 lacks the mode buttons, so I assume it's the same thing except with only one hardware mode, but I don't have a K70 so I can't confirm it.

I'm nearly done writing the daemon now, so after a few more revisions I'll move on to writing the user utility and you shouldn't have to recompile/restart it every time I make an update. I'll start testing out an OSX version in the next few days as well.

Last edited by MSC; 11-05-2014 at 04:38 PM.
Reply With Quote


  #25  
Old 11-07-2014, 10:45 PM
MSC's Avatar
MSC MSC is offline
Linux/OSX driver
 
Join Date: Oct 2014
Posts: 246
POST ID # = 740648
MSC Reputation: 10
Default

Hey everyone! Sorry for the double post, but I just added OSX support. You have to install libusb separately since OSX doesn't have it by default, but other than that it's just as easy as building the Linux driver.

Now the not so good news...the RGB controller works on OSX, but key rebinding doesn't. Apple's built-in driver grabs the device and refuses to let go. In order to stop it I would have to create a custom kernel driver, and Apple is now forcing all kernel drivers to be signed with a developer key. I'm not going to pay Apple $100 just so I can make a device ungrabber. It MAY be possible to bypass the driver anyway, but there's a good chance that key rebinding on OSX just isn't going to work.
Reply With Quote


  #26  
Old 11-08-2014, 08:33 PM
merribob merribob is offline
Registered User
 
Join Date: Nov 2014
Posts: 5
POST ID # = 740783
merribob Reputation: 10
Default

This is brilliant, thank you so much MSC for your hard work. I'm using a UK (British) layout K70, and found that there were problems with two of the keys not working: # and \. I believe the former is not a dedicated key on US keyboards, and the latter is in a different place and has a different second symbol.

I've written a patch for this that seems to work well for me (Ubuntu 14.04) and submitted a pull request to merge this into your main branch. Hope it looks OK to you! If anyone's desperate for it, you can get my fork of the code here: https://github.com/bmerrison/ckb. You need to replace -DKEYMAP_DEFAULT with -DKEYMAP_UK on lines 15 and 16 of Makefile and then recompile in order to get the UK key map.

I'm also working on a little utility built on top of this driver to allow lighting patterns to be scripted in Python. It's pretty much just for my personal use, but I'll stick it up on GitHub and post a link here when it's working anyway...
Reply With Quote


  #27  
Old 11-09-2014, 01:37 AM
MSC's Avatar
MSC MSC is offline
Linux/OSX driver
 
Join Date: Oct 2014
Posts: 246
POST ID # = 740812
MSC Reputation: 10
Default

Nice work, the new layout seems to work just fine. I've added it back to the main repository.

I also did a rewrite of the OSX code today so it no longer requires libusb. It's a lot less buggy now and more importantly, key rebinding works. I think I'm going to drop libusb from the Linux version as well, because it seems to be causing some problems and it doesn't play well with mutlithreading.
Reply With Quote


  #28  
Old 11-09-2014, 04:20 AM
lokkenjawnz lokkenjawnz is offline
Registered User
 
Join Date: Nov 2014
Posts: 1
POST ID # = 740823
lokkenjawnz Reputation: 10
Default

Wow this is absolutely amazing! Thanks MSC! I thought this keyboard wouldn't be properly usable on a Mac, I'm glad you stepped in to make it work!

I'm curious how exactly this works, I've perused the code a little bit, but not enough yet to really grasp it. It looks like you're effectively making your own keyboard driver, that handles all the keyboard input? I assume that's why the system's modifier key rebinding doesn't work?

Also I noticed on the earlier version, the one using libusb at least, that my computer's screen would dim, and it would go to sleep, even while I was actively typing on the keyboard. I haven't messed around with the new non-libusb one enough to try to reproduce this, but I'm wondering if you've noticed something similar?

I'm unfortunately not very well versed in c, but if there's anything I can do to help, testing-wise, I'd be glad to!
Reply With Quote


  #29  
Old 11-10-2014, 08:13 AM
MSC's Avatar
MSC MSC is offline
Linux/OSX driver
 
Join Date: Oct 2014
Posts: 246
POST ID # = 741016
MSC Reputation: 10
Default

Correct. The keyboard hardware provides an option to use two different input interfaces, one of which is compatible with the standard input driver (IN_HID in my code) and the other of which is a proprietary input (IN_CORSAIR). The windows driver actually uses both of them if the keys aren't rebound, but I found it worked better to use only the proprietary input and handle all key events within the daemon. But yeah, it means that OSX's built-in modifier remapping doesn't work, since that only serves the system driver.

I didn't notice any issues with screen dimming. But I use my mouse almost constantly, so I imagine that cancels it. Let me know if you run into it again and I'll see if there's anything I can do to stop it. At this point the most helpful thing you can do is just keep testing it; I'm still having some trouble getting the device to behave consistently so feedback about anything that does or doesn't work is extremely helpful. :)

By the way, for Linux users: I did what I mentioned earlier and stopped using libusb, so now it just runs with udev and usbfs. The dependencies are different, so check your package manager for "libudev" or "libudev-dev" if it doesn't compile anymore. The driver seems to be a little bit more stable now, at least on my machine. Hopefully the change doesn't make it blow up for anyone.
Reply With Quote


  #30  
Old 11-11-2014, 02:14 AM
SimpleStreet SimpleStreet is offline
Registered User
 
Join Date: Nov 2014
Posts: 36
POST ID # = 741209
SimpleStreet Reputation: 10
Default

May i ask how the LED commands work ? it just says rgb off will turn the lighting off, no matter what way i try it, it does not work, however the ckb setup works, but not the rgb one
Reply With Quote


Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:31 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.