Config for Saitek Command (Some doubts)

Asked by Cenzo

Hello, first I want to thank you for making this AWESOME tool, works really nice.

I have some doubts though:

1) Some keys are not showing on the console when I use verbose mode, specifically Keys 13,14 and 15 so I cannot bind them.

Using "cat /dev/input/js0" if I press the keys I get output so they are working for sure. (Of course, the output is ASCII crap xD)

2) The Saitek Command has a stick that works with ABS_X and ABS_Y, I want to set them to LEFTALT but only if the <VALUE=x> is less than 40 (That is, pressed deep), why? If I use ABS_X=LEFTALT the alt key is pressed even if I am not touching the stick so I imagine that setting a 'press value' will make it work (It's how it works in windows, u can set different behaviors depending on how far are u moving the stick.

Everything else works like a charm, but I need key 15 and the stick to work so I can use it under linux.

Thanks for everything! :)

P.S. here is my default.conf, maybe this could hint you on why 13,14 and 15 don't show on console (maybe missing in constants.py?) and the ABS_X/ABS_Y info

# Saitek Cyborg Command
[Device:saitek]
vendor=0x06A3
product=0x80C1

[Map:saitek]

#KEYS F1 TO F4
BTN_A:KEY_1
BTN_B:KEY_3
BTN_C:KEY_4
BTN_X:KEY_2

#KEYS 1 TO 4
BTN_TRIGGER:KEY_Q
BTN_THUMB:KEY_W
BTN_THUMB2:KEY_E
BTN_TOP:KEY_5

#KEYS 5 TO 8
BTN_TOP2:KEY_A
BTN_PINKIE:KEY_S
BTN_BASE:KEY_D
BTN_BASE2:KEY_6

#KEYS 9 TO 11
BTN_BASE3:KEY_B
BTN_BASE4:KEY_X
BTN_BASE5:KEY_C

#KEYS 12 TO 14 (13 AND 14 DONT WORK?)
BTN_BASE6:KEY_7

#STICK (Have to fix <VALUE=X>, with those binds alt is always pressed)
#ABS_X:KEY_LEFTALT
#ABS_Y:KEY_LEFTALT

#STICK BUTTONS (15 DOESNT WORK)
BTN_DEAD:KEY_SPACE

Question information

Language:
English Edit question
Status:
Solved
For:
Pystromo Edit question
Assignee:
No assignee Edit question
Solved by:
Cenzo
Solved:
Last query:
Last reply:
Revision history for this message
Cenzo (vorlando31) said :
#1

I noticed something in constants.py:

In the <codes> section

u have 0x12b: 'BTN_BASE6',
           0x12f: 'BTN_DEAD',

notice that 0x12c,d,e are missing, and it seems those are the keys I need according to my map file (Looks kinda obvious)

I will backup the file and do some tinkering to learn how it works and if I fix it I will post, I am still clueless about the ABS_X - ABS_Y though.

Revision history for this message
Cenzo (vorlando31) said :
#2

Part 1 of post FIXED

modified the constants.py as I said in the post above, added:

0x12b: 'BTN_BASE6',
0x12c: 'BTN_BASE7',
0x12d: 'BTN_BASE8',
0x12e: 'BTN_BASE9',
0x12f: 'BTN_DEAD',

Now the missing keys show in the console.

Now only thing I need to solve is the stick value.

Revision history for this message
Cenzo (vorlando31) said :
#3

Part 2 of post FIXED

ABS_X<150:KEY_LEFTALT
ABS_Y<150:KEY_LEFTALT

To change values.

Ty for allowing me brainstorm alone, if anyone has a Saitek Command Pro or Cyborg Command will find this useful though.

Thanks again for an awesome program

Revision history for this message
Raumkraut (raumkraut) said :
#4

I'm glad to see you managed to answer your questions yourself. :)

It is strange that some of the KEY_ codes seem to be missing. I got the list I use from another input-system fiddling app, so I was just assuming there was a reason they weren't all there.

Nevertheless, I'll see if I can modify Pystromo so that it can output all the incoming events - even ones it doesn't understand.

Revision history for this message
Captain_dan (captaindan22) said :
#5

Thanks to the above information I was able to get this working perfectly for World of Warcraft under Intrepid. I use the stick for movement and have included the keymap that I came up with that works for me. The 1000 figure in the X and Y values was arrived at by trial and error. Note the constants.py file needs to be modified as per the part 1 of Cenzo's FIX in order to get all the buttons working. Hope this saves someone the time it took me to work it out and thanks for a great program!

# Saitek Pro Gamer Command pad
[Device:saitek]
vendor=0x06a3
product=0x80c0

[Map:saitek]

#KEYS 17 to 20 and 21
BTN_A:KEY_F1
BTN_B:KEY_F2
BTN_C:KEY_F3
BTN_X:KEY_F4
BTN_Y:KEY_LEFTSHIFT

#KEYS 1 TO 4
BTN_TRIGGER:KEY_1
BTN_THUMB:KEY_2
BTN_THUMB2:KEY_3
BTN_TOP:KEY_4

#KEYS 5 TO 8
BTN_TOP2:KEY_5
BTN_PINKIE:KEY_SPACE
BTN_BASE:KEY_6
BTN_BASE2:KEY_7

#KEYS 9 TO 11
BTN_BASE3:KEY_8
BTN_BASE4:KEY_9
BTN_BASE5:KEY_0

#KEYS 12 TO 14
BTN_BASE6:KEY_E
BTN_BASE7:KEY_Q
BTN_BASE8:KEY_T

#STICK (Have to fix <VALUE=X> and <VALUE=Y>, dead zone between 150<X<1000 and 150<Y<1000)

ABS_X<150:KEY_A
ABS_X>1000:KEY_D
ABS_Y<150:KEY_W
ABS_Y>1000:KEY_S

#BUTTON 15
BTN_DEAD:KEY_SPACE