Do the red, blue and green shift states work?

Asked by Lighttitan

I have gotten the sourceforge drivers to work with my nostromo and can configure it. The problem is that I macro them to repeat the keypress every 200 ms as long as I have the key held down.

It works ok but since all my keys do this sometimes when I am using the Dpad to move around and I am pressing keys... somewhere along the lines the nostromo gets caught up into some kind of loop. It will continue to spam one of the buttons I was holding down and won't stop till I press that button again.

So point being, I can't use the Nostromo drivers to play with my game effectively. So I am very interested in your software here. I have only one question at this time...

Does your software work with the red, blue and green shift states? Can I get it to shift to these different states and change my key configurations?

Thanks alot!

Question information

English Edit question
Pystromo Edit question
No assignee Edit question
Solved by:
Last query:
Last reply:
Revision history for this message
Lighttitan (dadicus) said :

Expansion on the question!

I just finished looking through the file that comes with Pystromo. It has raised another question.

Can I set Pystromo to continually press and release (spam) a specific key as long as I have the key it is bound to on the Nostromo held down and then stop spamming when I release the key?

This is important for me. I use my Nostromo with World of Warcraft and I like it to spam my abilities as long as I hold the key down. This is the problem I am having with the nostromo drivers, they lock into these spams occasionally.

Thanks for your help again.

Revision history for this message
Raumkraut (raumkraut) said :

Indeed it can handle the coloured shift-states! In case you didn't spot the examples in the, mode triggers start at line 135, and mode-specific mappings start at line 148.
The red, green and blue coloured modes are just the nostromo's equivalents of num-lock, caps-lock and scroll-lock (respectively) on a standard keyboard!

For the second question, I think what you're after is something like the example on line 82, which continually outputs the word "apple" while the A-key (#07) is held down. Combined with a delay (line 93+), this could be used to send a keypress every so often. Eg.:
 KEY_E: KEY_F2, 200
Will make holding the 'e' key (button #04 on the n52) act like you were repeatedly pressing F2 every 200ms.

Revision history for this message
Lighttitan (dadicus) said :

I have solved my original ticket and therefor will be closing it. After looking through your file further, I found that all the shift states, red, blue and green work!

However I still have the question of how to get it to repeat buttons while I have the key held down. I will close this one though and ask that question in a new one so the title fits. Thanks again.

Revision history for this message
Lighttitan (dadicus) said :

Raumkraut, I see what you are saying about the apple part and how it will repeatedly put out the word apple and also I see the delay part.

The problem I see with that is, is the program actually repeating it or is it Linux? If I go into keyboard options in Linux and tell it NOT to repeat any key presses even if I hold down a key, would your Pystromo still repeat the word apple over and over?

The reason I ask this is that in World of Warcraft it differentiates between keys being held down to type messages and keys being held down that are bound to powers. If I hold down the "1" key while typing, it will spam this key in the text I am typing. This is Linux spamming it. However if I hold down the "1" key while not typing, but rather trying to get it to use the power bound to the "1" key, it will not spam it. It won't even cast it until I release the key.

So the problem is that I need Pystromo to press and release the key, pause for about 200 ms and do it again as long as I have the key held down. It can't be the OS doing it.

Ok one other question while I have you here. Does the Pystromo differentiate between the number keys above the letters and the numberpad keys?

For instance KEY_1 is the key above "Q"... if Pystromo can tell that the one on numberpad is different what would it be called?

KEY_NUMPAD1 maybe? I am not sure. Thanks for your fast responses!

Revision history for this message
Raumkraut (raumkraut) said :

Actually, IME, most games (ignoring things like minesweeper or sol, etc.) generally do the key-repeating themselves, based on "events" they receive. WoW will most likely only see "key has been pressed" and "key has been released" events, and will itself work out whether to 'spam' the key in chat, or wait for you to release it to cast your spell. The key-repeat setting for your Linux desktop environment probably won't affect the game at all.
Pystromo does the same kind of thing - it sees the "key has been pressed" and "key has been released" events (plus the ones for mice, joysticks, etc.), and decides what it should do based on those.

But anyway, yes, what Pystromo does is fool Linux, and hence any applications running on top of it, into thinking that actual keys are being individually pressed and released.

As to the numberpad/keypad: You can find all the codes Pystromo understands in The values are usually for the keys on the keyboard, rather than what's written on them (which depends on language anyway), so keypad keys do indeed have different codes to the standard numeric keys. A quick scan through the list tells me that the keypad uses codes which start KEY_KP. A quick grep gives me:
KEY_KP0 through KEY_KP9
And also, if you've got a super-awesome keypad: