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
  #61  
Old 12-03-2014, 03:36 PM
MSC's Avatar
MSC MSC is offline
Linux/OSX driver
 
Join Date: Oct 2014
Posts: 246
POST ID # = 744915
MSC Reputation: 10
Default

Good idea, I left a comment there explaining what I know about the device. Hopefully that can be helpful in some way.
Reply With Quote


  #62  
Old 12-10-2014, 08:39 AM
Criticalstone Criticalstone is offline
Registered User
Criticalstone's PC Specs
 
Join Date: Oct 2014
Posts: 6
POST ID # = 746088
Criticalstone Reputation: 10
Default

Hello MSC! Thank you for a nice driver!
I have k70 rgb with swedish kb layout and the only keys not working are the one to the left of the enter key and the key to the right of lshift. Those keys are quite important egen programming and i would like to hqve them work properly. I suppose it has to do with the keyboard_us.c and the hexcodes represented there. Do you have any idea how I can extract the hexcodes from those keys and make them work in a custom c file?
Thank you in advance and sorry if this has already been answered :)

Last edited by Criticalstone; 12-10-2014 at 10:22 AM.
Reply With Quote


  #63  
Old 12-10-2014, 02:21 PM
alexises alexises is offline
Registered User
 
Join Date: Dec 2014
Posts: 2
POST ID # = 746143
alexises Reputation: 10
Default

I have two key don't reconized : near to the tab key (*) on french AZERTY and < near to maj. peraps you need the code the theses key
Reply With Quote


  #64  
Old 12-11-2014, 01:56 AM
MSC's Avatar
MSC MSC is offline
Linux/OSX driver
 
Join Date: Oct 2014
Posts: 246
POST ID # = 746242
MSC Reputation: 10
Default

Quote:
Originally Posted by Criticalstone View Post
Hello MSC! Thank you for a nice driver!
I have k70 rgb with swedish kb layout and the only keys not working are the one to the left of the enter key and the key to the right of lshift. Those keys are quite important egen programming and i would like to hqve them work properly. I suppose it has to do with the keyboard_us.c and the hexcodes represented there. Do you have any idea how I can extract the hexcodes from those keys and make them work in a custom c file?
Thank you in advance and sorry if this has already been answered :)
Quote:
Originally Posted by alexises View Post
I have two key don't reconized : near to the tab key (*) on french AZERTY and < near to maj. peraps you need the code the theses key
Would I be correct in assuming that you're unable to change the color of the keys, as well as them not generating any key input? Or is there some other key on the keyboard that allows you to set their colors? (Try the UK layout as well as the US layout, since there are some slight differences)

I don't have a good way to test LED codes at the moment, but here's how to test the input codes. With the daemon running, open a new terminal window and run the following two commands:
Code:
echo notify all > /dev/input/ckb1/cmd
cat /dev/input/ckb1/notify0
(If you're on a Mac, replace "/dev/input/ckb1" with "/tmp/ckb1")

You should see some lines of text, ending with "key -enter". Now if you press the unrecognized keys you should see "key +#xx" "key -#xx", where xx are some numbers. Paste those numbers here (or if you see a name instead, paste that) and tell me which keys they correspond to and I'll get new layouts set up for them.

EDIT: Also, if you could provide me with screenshots of what your keyboards look like in CUE, so that I can see the physical layout, that'd be great. Thanks :)

Last edited by MSC; 12-11-2014 at 02:02 AM.
Reply With Quote


  #65  
Old 12-12-2014, 07:36 AM
Criticalstone Criticalstone is offline
Registered User
Criticalstone's PC Specs
 
Join Date: Oct 2014
Posts: 6
POST ID # = 746411
Criticalstone Reputation: 10
Default

Quote:
Originally Posted by MSC View Post
Would I be correct in assuming that you're unable to change the color of the keys, as well as them not generating any key input? Or is there some other key on the keyboard that allows you to set their colors? (Try the UK layout as well as the US layout, since there are some slight differences)
Correct, I can't set colors of the keys and they are not generating any input.
There are some other keys that are not represented in the layout but can be changed looking at the us layout and try to see what key it represents. Those two keys that don't work doesn't exist on the us layout. The enter key covers one and the shift key covers the other :)

I also believe that both alexises and I are having problem with the same physical keys

Quote:
Originally Posted by MSC View Post
EDIT: Also, if you could provide me with screenshots of what your keyboards look like in CUE, so that I can see the physical layout, that'd be great. Thanks :)
Ill give you this when I come home :)

Edit:
Here is a picture of the swedish kb layout



Thanks for a fast reply!

Last edited by Criticalstone; 12-12-2014 at 12:09 PM.
Reply With Quote


  #66  
Old 12-12-2014, 11:58 AM
Criticalstone Criticalstone is offline
Registered User
Criticalstone's PC Specs
 
Join Date: Oct 2014
Posts: 6
POST ID # = 746467
Criticalstone Reputation: 10
Default

Btw, what are you using to make animations with the daemon?
Reply With Quote


  #67  
Old 12-12-2014, 05:08 PM
Criticalstone Criticalstone is offline
Registered User
Criticalstone's PC Specs
 
Join Date: Oct 2014
Posts: 6
POST ID # = 746502
Criticalstone Reputation: 10
Default

Hi again the key input generated by the "*" is #81 and the input generated by the ">" is #49
Reply With Quote


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

Ok, as I suspected those are the same numbers as the extra keys from the UK layout. I *think* they're the same keys, so I just changed the names and copied everything else. Hopefully the new Swedish option works for you; let me know if the LEDs still don't work or if they keys generate the wrong characters.

Btw, I also made the UK layout the default for countries that the software doesn't recognize. If my assumption is correct that the European keyboards are using the same input codes, this should cause them to work correctly now (even if the keys are mis-labeled). Maybe Alexises can confirm this?


As for your question about the animations, the daemon itself doesn't handle animation; the UI program does that. The daemon just reads color codes and sends that information out to the keyboard. Additionally, the animations are now their own programs, and ckb simply layers them together. So the basic process is like this:

1. ckb stores a list of "background" colors. Those are the ones that you pick from the keyboard control on the app.
2. You can add animations on top of that using the "New animation" button. Each animation is its own program and is given a group of keys to it operate on.
3. ckb runs all of the animation programs in the active lighting mode. The animation programs write some output like "set <key name> to alpha A, red R, green G, blue B".
4. ckb reads the output of the programs and layers them together, in order, on top of the background colors (taking into account the overall opacity and blending mode set by the user). When it's done, it has computed the actual color to send to the keyboard.
5. ckb sends a list of keys/colors to the daemon, which in turn collects them together and sends those colors to the keyboard.

Then steps 3 through 5 repeat for every frame, at about 60FPS. Since the animation programs all run independently they're very lightweight and can be combined in any possible way without interfering with each other.
Reply With Quote


  #69  
Old 12-13-2014, 08:25 AM
Hironimus Hironimus is offline
Registered User
 
Join Date: Dec 2014
Posts: 1
POST ID # = 746621
Hironimus Reputation: 10
Default German K95 RGB

Hi,

with the german keyboard also two keys (I think the very same as with the swedish version) were missing and couldn't be controlled by ckb:

Code:
key +hash
key -hash
key +bslash
key -bslash
I just tried your new code with a german K95 RGB and now all keys can be controlled. Cool! Thanks for the software!

In the beginning I had a problem with timeouts reported by the kernel (from Ubuntu 14.04) and the keyboard stopped responding. Only a usb reconnect enabled the keyboard again:

Code:
hid-generic 0003:1B1C:1B11.0022: timeout initializing reports
hid-generic 0003:1B1C:1B11.0022: hiddev0,hidraw4: USB HID v1.11 Device [Corsair Corsair K95 RGB Gaming Keyboard] on usb-0000:00:1a.0-1.5.4/input3
After some googling I found, that adding this to the grub cmdline:
Code:
usbhid.quirks=0x1B1C:0x1B11:0x20000000
resolved the timeouts, the keyboard then worked well for hours.

best regards
Hironimus

Last edited by Hironimus; 12-13-2014 at 08:28 AM.
Reply With Quote


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

Glad to hear it :D
I went ahead and added Germany and France as recognized keyboard layouts. So if you hover your mouse over the keys in ckb, it should display the correct names now. (It might also mix up a few keys on your color/animations settings the first time you run it...sorry! it won't happen in future versions.) Let me know if I got anything wrong.

Quote:
Originally Posted by Hironimus View Post
In the beginning I had a problem with timeouts reported by the kernel (from Ubuntu 14.04) and the keyboard stopped responding. Only a usb reconnect enabled the keyboard again:

Code:
hid-generic 0003:1B1C:1B11.0022: timeout initializing reports
hid-generic 0003:1B1C:1B11.0022: hiddev0,hidraw4: USB HID v1.11 Device [Corsair Corsair K95 RGB Gaming Keyboard] on usb-0000:00:1a.0-1.5.4/input3
After some googling I found, that adding this to the grub cmdline:
Code:
usbhid.quirks=0x1B1C:0x1B11:0x20000000
resolved the timeouts, the keyboard then worked well for hours.
That's interesting, I've had that problem myself sometimes. I'll try that out and see if it helps.

EDIT: sure enough, that solved a problem I had where the keyboard would be unresponsive for several seconds after plugging it in. Thanks for sharing.

Last edited by MSC; 12-14-2014 at 05:35 AM.
Reply With Quote


  #71  
Old 12-19-2014, 06:04 AM
SimpleStreet SimpleStreet is offline
Registered User
 
Join Date: Nov 2014
Posts: 36
POST ID # = 747798
SimpleStreet Reputation: 10
Default

Hey MSC

i decided to grab the updates you done to the program, however when i compiled it and tried to run ckb nothing happends.

connecting the keyboard with ckb-daemon works, however trying to run ckb nothing happends, first run it looks like it tries to open but closes straight away, every try after that nothing seems to happen at all.

any ideas of what i might be doing wrong ?

Cheers

the commands

Quote:
echo rgb off > /dev/input/ckb1/cmd
echo rgb on > /dev/input/ckb1/cmd
echo rgb D2691E > /dev/input/ckb1/cmd
still work, just nothing using the ckb works.

just noticed, it sets my layout to the gb version when it should be the us version

Last edited by SimpleStreet; 12-19-2014 at 06:19 AM.
Reply With Quote


  #72  
Old 12-20-2014, 12:19 AM
MSC's Avatar
MSC MSC is offline
Linux/OSX driver
 
Join Date: Oct 2014
Posts: 246
POST ID # = 748011
MSC Reputation: 10
Default

It should be setting the layout from your system locale. Can you run the "locale" command in a terminal and post the output for me?

It sounds like ckb is crashing when you try to run it. Are you using a K70 or K95, and which distro are you running? It might be something that I forgot to test. I'll include an option to generate a debug build in my next commit if I can't find the problem.
Reply With Quote


  #73  
Old 12-20-2014, 11:14 AM
SimpleStreet SimpleStreet is offline
Registered User
 
Join Date: Nov 2014
Posts: 36
POST ID # = 748058
SimpleStreet Reputation: 10
Default

Quote:
Originally Posted by MSC View Post
It should be setting the layout from your system locale. Can you run the "locale" command in a terminal and post the output for me?

It sounds like ckb is crashing when you try to run it. Are you using a K70 or K95, and which distro are you running? It might be something that I forgot to test. I'll include an option to generate a debug build in my next commit if I can't find the problem.

Quote:
LANG=en_AU.UTF-8
LANGUAGE=en_AU:en
LC_CTYPE="en_AU.UTF-8"
LC_NUMERIC="en_AU.UTF-8"
LC_TIME="en_AU.UTF-8"
LC_COLLATE="en_AU.UTF-8"
LC_MONETARY="en_AU.UTF-8"
LC_MESSAGES="en_AU.UTF-8"
LC_PAPER="en_AU.UTF-8"
LC_NAME="en_AU.UTF-8"
LC_ADDRESS="en_AU.UTF-8"
LC_TELEPHONE="en_AU.UTF-8"
LC_MEASUREMENT="en_AU.UTF-8"
LC_IDENTIFICATION="en_AU.UTF-8"
LC_ALL=
K70
Ubuntu 14.10
Reply With Quote


  #74  
Old 12-20-2014, 01:49 PM
UbuntuNoob UbuntuNoob is offline
Registered User
 
Join Date: Dec 2014
Posts: 6
POST ID # = 748085
UbuntuNoob Reputation: 10
Default Im quite new to ubuntu and linux

I have little to none experience about programming and writing code so I have some difficulties installing this. Could you give me a quick guide on installing this so I can get my K95 running. Thank you in advance!

Edit: I cloned it to a dir I created and now I just have to compile it. Can't find any good instructions on how-to in google. Any help beyond the point of creating a directory for gits would be greatly appriciated!

Last edited by UbuntuNoob; 12-20-2014 at 08:31 PM.
Reply With Quote


  #75  
Old 12-22-2014, 06:19 AM
MSC's Avatar
MSC MSC is offline
Linux/OSX driver
 
Join Date: Oct 2014
Posts: 246
POST ID # = 748381
MSC Reputation: 10
Default

Quote:
Originally Posted by SimpleStreet View Post
K70
Ubuntu 14.10
Ah, didn't realize AU used the US layout as well. I've added that to the list of US locales (as well as some others that Wikipedia says use the same layout), so the new daemon should detect it correctly.

It turns out your crash was caused by the K70 keyboard, after an update where I added support for more layouts. Sorry about that, it should be fixed in the latest commit.

Quote:
Originally Posted by UbuntuNoob View Post
I have little to none experience about programming and writing code so I have some difficulties installing this. Could you give me a quick guide on installing this so I can get my K95 running. Thank you in advance!

Edit: I cloned it to a dir I created and now I just have to compile it. Can't find any good instructions on how-to in google. Any help beyond the point of creating a directory for gits would be greatly appriciated!
If you're not familiar with terminal commands, the easiest way to get the source is to use the "Download Zip" button on the right side of the GitHub page and extract it from there. Delete your previous download first (if any).

Either way, here's how to compile it:
1. Open the "ckb-master" directory in your file browser. You should see "src", "ckb.pro", "DAEMON.md", etc.
2. Right-click on the folder background and select "Open in Terminal". Most file browsers should have an option like that. On the off chance that yours doesn't, open a new terminal, type "cd <ckb-master path>" and hit enter. For instance, if yours is in "Dowloads/ckb-master" type "cd Downloads/ckb-master".
3. Now that you have a terminal in this directory, type "qmake && make" and hit enter. It will take a few seconds to compile so wait until it stops spewing output. The last line should say "Leaving directory <some path>".
4. Type "sudo bin/ckb-daemon" into the terminal and hit enter. It will ask you for your password (needed to access superuser privileges), so type that in and hit enter again.
5. Watch the terminal output and you should eventually see "Device ready at /dev/input/ckb1". This indicates that the daemon launched successfully and has connected your keyboard.
6. Leave that terminal running. You can minimize it to the background, but don't close it. I'll have a better solution for this in a future version, but for now, you need to run the daemon manually and keep it open.
7. Back in your file browser, open the newly-created "bin" directory, and run the "ckb" app. This is the actual user interface for the keyboard and it should be fairly self-explanatory. You can close the window when you're done with it; the app will keep running until you click the "Quit ckb" button from the settings screen.

Hopefully that covers it. Let me know if you have trouble or if you're still confused about anything :)
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:07 AM.


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