While you're here, please consider supporting GamingOnLinux on:
Reward Tiers: Patreon. Plain Donations: PayPal.
This ensures all of our main content remains totally free for everyone! Patreon supporters can also remove all adverts and sponsors! Supporting us helps bring good, fresh content. Without your continued support, we simply could not continue!
You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
Reward Tiers: Patreon. Plain Donations: PayPal.
This ensures all of our main content remains totally free for everyone! Patreon supporters can also remove all adverts and sponsors! Supporting us helps bring good, fresh content. Without your continued support, we simply could not continue!
You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
Login / Register
- Steam Controller 2 is apparently a thing and being 'tooled for a mass production' plus a new VR controller
- Dungeon Clawler will grab hold of your free time now it's in Early Access, plus keys to give away
- Monster catcher Cassette Beasts adds Steam Workshop support and a new battle mode
- Steam getting proper Season Pass support with clearer guidelines and refunds for cancellations
- FromSoftware owner Kadokawa confirms Sony sent an 'initial letter of intent' to acquire them
- > See more over 30 days here
-
2K Launcher is finally no more - that's at least one pu…
- emphy -
Huge new Proton 9.0-4 update for Steam Deck / Linux now…
- Numerfolt -
Star Fox 64 is getting a Native PC port from the devs o…
- Talon1024 -
Action-platformer metroidvania Janosik 2 will be a 'big…
- Phlebiac -
GOG's Black Friday Sale is live now with some big disco…
- chickenb00 - > See more comments
- What have you been listening to?
- Linux_Rocks - More updates - social media related
- Klaas - What do you want to see on GamingOnLinux?
- Linux_Rocks - Our own anti-cheat list
- Liam Dawe - Weekend Players' Club 11/22/2024
- Liam Dawe - See more posts
New to forums but followed the site for a few years now. I have used the Belkin Nostromo n50 and n52 and the Razer Tartarus on both W and Linux for a number of years, but since I upgraded my box from Ubuntu 16.04 to 18.04 my remapping software does not function as its supposed to. I can tell it is doing some kind of mapping because the n52 has LED lights that I can map to any key and they do indeed blink when I use them, but the keys do not function when remapped to standard US keyboard keys.
I have tested this on a fresh Ubuntu MATE 18.04 install and a live USB 16.04 version on a laptop, thus verified its not just my installation.
The Python program is called Pystromo and has been around since about 2008, but the creator of the program no longer wishes to help with troubleshooting or anything. It seems to me that either something in the newer kernel dealing with input has changed or it could be with Python itself (libraries or some such). The original code was for Python 2, and another person on Github has a repo with (supposedly) Python3 compliant code but it does not work for me with either 16.04 or 18.04, returning some error messages in the terminal about unable to find modules.
I am no coder or programmer so I have no idea what might be the cause nor how to apply a fix. I am asking for help or a kind pointing-out where to ask for help getting this program to function correctly. Here is a link to my Github page https://github.com/TherinS/Pystromo where you can find copies of the original programs and a few blank map files you can use to test with. I will upload some simplified instructions soon to help with installing and using Pystromo, as the instructions included in the tar.gz file jump around alot.
Pystromo should work with ANY USB device as long as it is wired or the "lsusb" command recognizes it because Pystromo uses the USB ID to apply the remapped keys. For example, I found I could remap the buttons on my Razer Mamba wireless mouse, but there is no pass-through for the LED so it can only act as keyboard button presses when moving the mouse around. For any other USB device I think it should work great, maybe even for a USB keypad device (imagine one key bound to CTRL-ALT-T and another to type "sudo apt update" and "return" key, or entering alias names).
I eagerly await your replies or questions....
As a first step, you could try installing the missing python 3 module dependencies with apt, or if that fails, pip. You might also want to try running the script as root if you didn't already. This could be an uinput permissions issue.
The 0.6.1 version returns error like the following:
2018-12-26
changes to pystromo files
----- v61
Map picker Zenity script runs fine untill last lines,
where it loads the selected map file using pystromo-remap.py
The following errors occured with these actions:
Run as is, the following error occurs:
** ERROR ONE **
Traceback (most recent call last):
File "./pystromo-remap.py", line 22, in <module>
from lib import mapping
File "/home/steveum-ssd/software/Pystromo-master/pystromo/lib/mapping.py", line 7, in <module>
from config import _BaseConfig
ImportError: cannot import name '_BaseConfig'
** END OF ERROR ONE **
===== STEPS TAKEN =====
1)put "python" at end of file home/steveum-ssd/.config/caja/scripts before ./pystromo-remap.py
Result= error after 'import ioctl' from import devices
about no module named ioctl
** FULL TEXT OF ERROR **
Traceback (most recent call last):
File "./pystromo-remap.py", line 23, in <module>
from lib import devices
File "/home/steveum-ssd/software/Pystromo-master/pystromo/lib/devices.py", line 10, in <module>
import ioctl
ImportError: No module named ioctl
** END**
2)put "#!/usr/bin/env python3" at beginning of
/home/steveum-ssd/software/Pystromo-master/pystromo/lib/devices.py
Result=same as first error
3)-put "#!/usr/bin/env python3" at beginning of
/home/steveum-ssd/software/Pystromo-master/pystromo/lib/ioctl.py
Result=same as first error
Whizse noted above that the python3 version (0.6.1) apparently has some missing/erroneous code in it, so that may explain why that version fails. Perhaps someone would be willing to poke further and make the 0.6.1 (Python3) version work? That would future proof the program, as Python2 is being slowly phased out.
I am unfamiliar enough with Python that I was unaware modules could be installed like normal packages; I thought the entire Python library was installed by default. To back my assumption, I just now opened Synaptic on this Ubuntu 18.04 box and searched for the package "ioctl"; there were no matching results for that name specifically.
Please let me know what other info you might need to help me with this, but running the program and checking the results for yourself might be the best way, as I cannot reply with what error messages it throws when there are none. I do appreciate your replies though and I wish to continue this exchange.
If that's the case, you might be able to solve it by adding an udev rule (like steam controller users had to do at some point I think).
View PC info
Try a more recent keymapper like Antimicro:
https://github.com/AntiMicro/antimicro
no more under development but more recent.
Or if you have a Steam controller, use sc-controller:
https://github.com/kozec/sc-controller
Yes, I tried both apt and pip install ioctl, one of the "cannot find" errors the 0.6.1 version displayed and no such package was found in Ubuntu 18.04.
When you talk about permissions, you may be on to something. Do I need to add the user to a udev rules setting somewhere? As stated in the installation script and the 0.6.0.tar.gz package on installing Pystromo (which are both available in my Github link), there is a step that looks like the following:
echo 'uinput' >> /etc/modules
modprobe uinput
cp $install_path/pystromo/config/52-pystromo-debian.rules /etc/udev/rules.d/
udevadm control --reload-rules
udevadm trigger
If I need to add the user to a group to have udev rules access, what is the command to do that?
When I type $ groups I get this:
adm cdrom sudo dip plugdev games lpadmin sambashare
There is no udev group so what should I add myself to?
@legluondunet:
Yes, I ran
$ sudo ./pystromo-remap.py -m ./custom_maps/n52-KFtest.map
and had no different effect: only the remapping of the keys to light up the LEDs on my Nostromo n52 had any effect. Any other normal keyboard keys resulted in no discernable output.
Antimicro does not support anything but hand held controllers, I have found. No support for Belkin/Razer gameboards.
I do not have a Steam controller, just a Madcatz, XBox 360 and PS4 controllers. Thanks for the suggestion though.
The thing is that I have been using Pystromo to remap the keys on my Nostromo n50, n52, and Razer Tartarus in Ubuntu 12.04, 14.04, and 16.04, plus older versions of PCLinuxOS and Linux Mint and it has worked fine until Ubuntu 18.04 and the latest PCLinuxOS. Again, I verified on my 16.04-to-18.04 upgrade box, a fresh 18.04 Ubuntu MATE install, and a live USB of Ubuntu MATE that the 0.6.0 version does do SOMETHING, but only outputs LED lights changing. I then tried a live USB of Ubuntu MATE 16.04 and it indeed worked exactly like I expected, with all key remapping working just fine. To me that could mean a kernel/Python2 change with the way permissions or input are handled or a location of where the file(s) is supposed to go.
Feel free to visit the Github page I mentioned in my first post and use the easy install script, but check the readme first in case you don't like where I have it install stuff. I will upload some simplified instructions for making .map files for devices in the next couple days.
Thanks and looking forward to replies...
pystromo-remap.py -v -v -v -v -m test.map
Using output: <lib.devices.OutputDevice object at 0x7fa55b4bf050>
Loading mappings
test.map
Using device: <InputDevice "ultraxkeyboard" on 3 device nodes>
Incoming event: <Event timestamp=1558482457.31721, type='EV_KEY', code='KEY_TAB', value=1>
Outgoing event: <Event timestamp=1558482457.32799, type='EV_KEY', code='KEY_1', value=1>
Incoming event: <Event timestamp=1558482457.397204, type='EV_KEY', code='KEY_TAB', value=0>
Outgoing event: <Event timestamp=1558482457.407962, type='EV_KEY', code='KEY_1', value=0>
grep'ing through the source, it doesn't look like it's using UI_SET_KEYBIT, not sure if that's the problem?
(I still need to upload decent instructions for configuring new devices but until then they can be found with a web search.)
An example of something that does not have a driver loaded by the kernel is the Logitech G13 gameboard. You can see it is recognized by doing "$ lsusb" but there is no driver so it does not respond at all in my tests. There are a couple of projects for that and I can link to them if there is interest.
https://github.com/TherinS/Pystromo
If anyone has some suggestions for getting it to work on 18.04, please reply here. You can easily run this in a live session and test it out. The install script I have on my page makes it easy to install and the documentation I added should help alot in getting it set up. I don't want to have to put a bounty on Bountysource .com to get this working but I will if that is the best bet.
View PC info
Edit: sorry I don't think that any of the applications linked to OpenRazer is able to perform key remapping, and I'm under impression that it's not actually possible because of lack of support for such a feature in OpenRazer daemon (I may be wrong). :|
Edit(2): @TherinS, ok just see your comment on Github / Polychromatic... forget my post!