# Corsair K90

## tomtomp

Hi, I bought this keyboard and I have some issues with it. I made multimedia buttons work, but the G1-18 buttons are not working

xev:

```

KeyPress event, serial 34, synthetic NO, window 0x1a00002,

    root 0x140, subw 0x0, time 1172041, (15,642), root:(1450,662),

    state 0x10, keycode 248 (keysym 0x0, NoSymbol), same_screen YES,

    XLookupString gives 0 bytes: 

    XmbLookupString gives 0 bytes: 

    XFilterEvent returns: False

KeyRelease event, serial 34, synthetic NO, window 0x1a00002,

    root 0x140, subw 0x0, time 1172127, (15,642), root:(1450,662),

    state 0x10, keycode 248 (keysym 0x0, NoSymbol), same_screen YES,

    XLookupString gives 0 bytes: 

    XFilterEvent returns: False

```

and syslog:

```

Dec 28 15:52:55 moss kernel: [ 1168.925561] keyboard: can't emulate rawmode for keycode 240

Dec 28 15:52:56 moss kernel: [ 1168.997557] keyboard: can't emulate rawmode for keycode 240

Dec 28 15:52:59 moss kernel: [ 1172.041557] keyboard: can't emulate rawmode for keycode 240

Dec 28 15:52:59 moss kernel: [ 1172.127556] keyboard: can't emulate rawmode for keycode 240

```

when pressed...

Also, the LED indicators dont work properly.

Will post more info if needed.

Thanx  :Smile: 

EDIT: the G1-18 buttons have same keycode 248 but in showkey -k it is keycode 240Last edited by tomtomp on Thu Dec 29, 2011 8:29 am; edited 2 times in total

----------

## Telemin

HI,

You need to bind the extra keys with xmodmap, you should find http://en.gentoo-wiki.com/wiki/Multimedia_Keys a good place to start.  If you continue to have problems please post back.  Have you checked google to see if someone already wrote an xmodmap script for this KB?

-Telemin-

----------

## tomtomp

Thats the problem, all of the G buttons have same keycode 248 .

----------

## Telemin

Ah Right that wasn't clear from you initial post.  Have you got the KB working in windows or MacOs correctly?  As I understand it there is (possibly driver based) configuration to be done.

-Telemin-

----------

## tomtomp

Yes, I am sorry I didnt say it in first post. Yes there are drivers for theese buttons, but not for LED indicators and they arent working either...

----------

## tomtomp

Nvm, how can I get all keycodes that are already taken?

----------

## Telemin

Sorry for the slow reply.  I'm struggling to get a handle on how this keyboard is working.  As I'm sure you are aware there are two types of customizable keyboard.  The first has a load of extra keys each with just a standard keymapping, and then a driver hook grabs them and translates them into the macro keypresses that you have defined in the config software.  The second type is the better engineered type where the keyboard itself generates and sends the macro keypresses.

Like I said I con't work out from the internet which type it is.  If you have already assigned working macros to the keys in windows/macos and you are still getting the same scancode for each key in linux, then it looks like an extra driver will be needed which sadly I have no knowledge about and can't help you with.

If it is the other kind, the sort that I am familiar with, then you should be able to test pretty easily by trying to bind the G keys just to single keyboard letters and seeing what xev gives you then, because it should spit out the same scancode as the key you bound it to if that makes sense.

Sorry I can't be more helpful, I have looked around but can't find much info on the K90.  

-Telemin-

----------

## jupiter126

Re,

I might have found a possible way to get our K90 to work with pinguins: this is my path of reflexion, it is based on the

http://www.gentoo-wiki.info/HOWTO_Use_Multimedia_Keys#Determine_the_keycodes

First of all, when I tried to scan the keycodes with xev, I saw that all keys don't seem to have codes.

While all "normal" keys have; only three of the 18 G keys do actually send back codes (G9=107, G17=162 and G18=164)

This is interesting because it spawned the idea that as the device uses 2 USB cables to connect to the computer, it might actually be seen as two devices.

I thus checked it in my /dev/ filesystem :

# ls -al /dev/input/by-id/

lrwxrwxrwx 1 root root  10 Aug 31 08:18 usb-Corsair_Corsair_Vengeance_K90_Keyboard-event-if01 -> ../event14

lrwxrwxrwx 1 root root  10 Aug 31 08:18 usb-Corsair_Corsair_Vengeance_K90_Keyboard-event-kbd -> ../event13

lrwxrwxrwx 1 root root  10 Aug 31 08:18 usb-Corsair_Corsair_Vengeance_K90_Keyboard-if02-event-kbd -> ../event15

Bingo: It seems to be seen as 3 devices (not sure what is what yet.

Now to get some keycodes ^^

I found part of the keytouch utility named getscancodes at http://sourceforge.net/projects/keytouch/files/

uncompressed and compiled, then ran it with root to check some keycodes:

JuPiTeR getscancodes # ./getscancodes /dev/input/event14

didn't give anything interesting

JuPiTeR getscancodes # ./getscancodes /dev/input/event15

Gives me control codes when I type on the regular keys, but nothing when I type on the GXX keys

JuPiTeR getscancodes # ./getscancodes /dev/input/event13

Gives me control codes when I hit the GXX keys and letters and numbers when I hit the keyboard.

Here are the codes I found for the G keys through event13

G01 - 458960

G02 - 458961

G03 - 458962

G04 - 458963

G05 - 458964

G06 - 458965

G07 - 458966

G08 - 458967

G09 - 458968 + Buggy Codes

G10 - 458969

G11 - 458970

G12 - 458971

G13 - 458972

G14 - 458973

G15 - 458974

G16 - 458975

G17 - 458984 + Buggy Codes

G18 - 458985 + Buggy Codes

As you can see, the 3 GXX keys with buggy codes are the ones that worked natively with xev

==> I am quite sure we can use the GXX keys simply by linking those codes to behaviours with lineakd or keytouch.

I don't know what the event14 is used for, maybe for multiplexing entries of event 13 and event 15...

----------

## jupiter126

I did a script to use the keyboard based upon the info in my latest post, it's available on github

https://github.com/jupiter126/k90-test

Cheers   :Cool: 

----------

## yuriambrosio

I have Corsair K90 keyboard and M90 mouse,

Gentoo does not recognize both,

I simply plug in another older keyboard and mouse and it's all right

Any ideas?

----------

