Don't want to see articles from a certain category? When logged in, go to your User Settings and adjust your feed in the Content Preferences section where you can block tags!
Virpil - Building a Joystick Tool
Kipring Oct 26, 2020
I'm a horrible coder - but I'm not asking for help only guidance.

Ran many searches and have now resorted to posting on a few forums.


Goal - have a Virpil HOTAS and joystick function within SC.

Looking for two items one may negate the ask for the latter.

1. Is it possible to map out keybindings from a joystick and have them pushed to a game running on top of Wine?

2. If so, how does the input get pushed to Wine and then on to the game?


Any help is appreciated.
whizse Oct 26, 2020
Just to make sure I don't misunderstand, you want to add joystick input to a game that doesn't support it?

Essentially pushing button X on the joystick should generate a keyboard event?
Kipring Oct 26, 2020
Quoting: whizseJust to make sure I don't misunderstand, you want to add joystick input to a game that doesn't support it?

Essentially pushing button X on the joystick should generate a keyboard event?


I like where you're going with this.

Yes, in a nutshell. Phrasing it this way illuminated two things.

1. SC doesn't support all the buttons a Virpil HOTAS provides - so keybinding would make more sense and there already are keyboard binders for joysticks available for linux.

2. Why won't SC support the HOTAS from Virpil, is it due to too many input (I've read claims of 50). This might be the other part of the solution - try binding up to 50 buttons and use the remainder for keyboard bindings. I've found that some of the lower number logical buttons DO work. Albeit none of the scroll wheels do and they are numbered under 50 on the logic buttons.
whizse Oct 26, 2020
I'm not sure if AntiMicroX covers this case, or if there's something similar out there. There usually is, and you only find out half way through your own project.

But if you want to write your own driver it's evdev you're after. It's quite easy to use, and for example the Python bindings are excellent:
https://python-evdev.readthedocs.io/en/latest/

You would pretty much create your own userspace driver. Take exclusive control of the HOTAS, pass through the events for the buttons that are supported in the game, capture the rest and create matching keyboard events. Then inject it all back in the input stream.

It should work transparently to Wine, or any other game, but you might end up with two joystick devices and have to disable one of them in the Wine control panel.
Kipring Oct 26, 2020
Thank you whizse and Patola.

- I'll try AntiMicroX and see how far I can get initially.
- I'll think look into evdev and post back here if I make any progress for anyone else to use
beko Aug 27, 2021
Quoting: Kipring- I'll think look into evdev and post back here if I make any progress for anyone else to use
Did you?
Kipring Aug 27, 2021
Quoting: beko
Quoting: Kipring- I'll think look into evdev and post back here if I make any progress for anyone else to use
Did you?

Managed to get some of them mapped - issue I kept running into was mapping the dials and the virtual buttons.

Then my little girl was born so this has taken a back seat to her, work, and building a new house.
beko Aug 28, 2021
Heh, iktf - have quite a full house of my own by now :D

No worries. I was just curious.
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!
Login / Register


Or login with...
Sign in with Steam Sign in with Google
Social logins require cookies to stay logged in.

Buy Games
Buy games with our affiliate / partner links: