Saitek Cyborg Command F1-F4 not working

Asked by James Norton

ok so my buttons for my saitek cyborg command unit aren't working.. all but the f1-f4 buttons are working.

heres my saitek.map file i'm using.

# Saitek Pro Gamer Command pad
[Device:pro]
vendor=0x06a3
product=0x80c1

################################################################################
# Green #
################################################################################
[map:pro]
### F1
BTN_A:KEY_TAB
### F2
BTN_B:KEY_M
### F3
BTN_C:KEY_LEFTSHIFT + KEY_B
### F4
BTN_X:KEY_NUMLOCK

### 1
BTN_TRIGGER:KEY_2
### W
BTN_THUMB:KEY_W
### 3
BTN_THUMB2:KEY_3
### 4
BTN_TOP:KEY_4

### A
BTN_TOP2:KEY_A
### S
BTN_PINKIE:KEY_S
### D
BTN_BASE:KEY_D
### 8
BTN_BASE2:KEY_6

### 9
#BTN_BASE3:
### 10
#BTN_BASE4:
### 11
#BTN_BASE5:

### 12
BTN_BASE6:KEY_5
### 13
BTN_BASE7:KEY_7
### 14
BTN_BASE8:KEY_8

### 15
BTN_DEAD2:KEY_SPACE
### 16
BTN_DEAD:KEY_LEFTCTRL + KEY_2
### 21
#BTN_Y:

### X Axis
#ABS_X:
### Y Axis
#ABS_Y:

now, i know its a modified version of someone elses but i liked it, and used it.. i was getting a weird result with a line about a save file.

this is the part of constants.py that i feel would matter the most. as its BTN_A - X that are in question:

0x12d: 'BTN_BASE8',
0x12e: 'BTN_DEAD2',
0x12f: 'BTN_DEAD',
0x130: 'BTN_A',
0x131: 'BTN_B',
0x132: 'BTN_C',
0x133: 'BTN_X',

i get NOTHING when i go into verbose mode and i press the F1-F4 keys where as on all the other button presses i get one of those BTN_DEAD and BTN_DEAD2 and so on, which leads me to believe that 0x130 - 0x133 isn't the right buttons for my command unit.

in the system settings keyboard and mice settings window, under the joysticks thing it shows the buttons as being pressed when i press them, so i know they work.. and i get output when using cat /dev/input/js0 so its working properly. i'm just confused as to why pystromo isn't reading it.

any help? i've searched high and low and couldnt get a clear answer, my head hurts and i gave up on it for the night, but i figured a post asking the creator would never hurt.

Question information

Language:
English Edit question
Status:
Answered
For:
Pystromo Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

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

It could be that those specific keys aren't in the mapping in constants.py. I /think/ that they get ignored if they aren't defined in that file.

You can find out what codes are being sent by the pad by running `xev` in a terminal session, and watching that's output when you press the relevant keys. You'll see (lots of) output like the following:

KeyPress event, serial 35, synthetic NO, window 0x5000001,
    root 0x15a, subw 0x0, time 5853339, (-230,365), root:(521,810),
    state 0x10, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

The bit we're interested in is the "keycode" (64 in this case). If you subtract 8 from that number (for some reason), the new number is the value that will be looked up in constants.py's mapping.
If it's not in the file (be wary of decimal/hex notation), you can add a line and alias it to a new (unique) string for making mappings. If it *is* in that file then... well, that would be odd.

Revision history for this message
James Norton (norton-james) said :
#3

when i use xev it wont show anything from the gamepad being pressed at all... it does work for my keyboard and mouse though, just not my gamepad. any suggestions ?

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

I used pystromo during 2008 (Same gamepad) and F1-F4 worked perfectly, I had other buttons missing which we added on a post here. Now I have the same problem as James, can't get F1-F4 to work, I do remember F1-F4 where 0x130 to 0x133, but something changed.

I wanna get this working but as James stated xev doesn't show anything if I press buttons on the gamepad, only keyboard and mouse.

I'll be working on this for a while, if any of you figure something let us know.

Revision history for this message
Jeff Licquia (jeff-licquia) said :
#5

At one time, if my memory serves, the Saitek game pads required a patched input module with the keycodes for F1 through F4. Upstream now provides those keys, but with different codes.

I had been using Shane McCormack's saitek branch of pystromo successfully. I've pulled it into Launchpad and updated it with the new keys, and F1-F4 now work for me. You can see my branch by clicking "Code" at the top of the page.

As an aside, button 21 may have had the same problem, but I don't use it, so I haven't noticed. I've made the changes to get button 21 working as well, but I haven't tested it.

Can you help with this problem?

Provide an answer of your own, or ask James Norton for more information if necessary.

To post a message you must log in.