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
- Unofficial PC port of Zelda: Majora's Mask, 2 Ship 2 Harkinian has a big new release out
- Steam Controller 2 is apparently a thing and being 'tooled for a mass production' plus a new VR controller
- Half-Life: Blue Shift remake mod Black Mesa: Blue Shift - Chapter 5: Focal Point released
- Linux kernel 6.12 is out now with real-time capabilities, more gaming handheld support
- Steam Deck OLED: Limited Edition White and Steam Deck Australia have launched
- > See more over 30 days here
-
The Sci-Fi Shooters Humble Bundle is a top deal with Sy…
- tuubi -
The Sci-Fi Shooters Humble Bundle is a top deal with Sy…
- ElectricPrism -
S.T.A.L.K.E.R. 2: Heart of Chornobyl review - works on …
- Shmerl -
S.T.A.L.K.E.R. 2: Heart of Chornobyl review - works on …
- Xpander -
The Sci-Fi Shooters Humble Bundle is a top deal with Sy…
- Technopeasant - > See more comments
- What do you want to see on GamingOnLinux?
- Linux_Rocks - Weekend Players' Club 11/22/2024
- Xpander - Types of programs that are irritating
- Cyril - Our own anti-cheat list
- Liam Dawe - Spare gog keys
- on_en_a_gros - See more posts
is this possible? and what is the best solution a gui would be nice.
the i-pac is before 2015 so dont think i can install the new firmware, i also like it to work with default mame layout.
thanks.
View PC info
What do you actually want to do? It's not recognized properly in games?
I was thinking about AntiMicroX but I'm not sure if it fits for your issue.
For MoltenGamepad it's available in the AUR (so available on Manjaro), did you tried to install it that way?
Thanks for the AUR info is it possible to only install selected things from AUR, i have some mixed experince with ubuntu and bleeding edge ppa's
Very (very!) basic example below:
#!/usr/bin/python3
# Very simple keyboard (WASD) to 4-button gamepad example,
# Requires the python-evdev package.
# Run as root!
#
# Use evtest as root to find keyboard path
from evdev import InputDevice, UInput, ecodes as e
dev = InputDevice('/dev/input/event3') # <- Needs to be changed to your keyboard!
wasd_keys = [e.KEY_W, e.KEY_A, e.KEY_S, e.KEY_D]
controller_keys = [e.BTN_X, e.BTN_Y, e.BTN_B, e.BTN_A]
cap = {
e.EV_KEY : controller_keys,
}
ui = UInput(cap, name='Totally an Xbox controller', version=0x3)
for event in dev.read_loop():
if event.type == e.EV_KEY:
if event.code in wasd_keys:
index = wasd_keys.index(event.code)
ui.write(e.EV_KEY, controller_keys[index], event.value)
ui.syn()
is it possible to start this when i launch a steam game and kill it when the game quits.
i could be cool if i could control gnome dash 2 dock whit controller stick and a emulated mouse left click button and when i launch a steam game the script takes over the controller and when i launch the qmc2 frontend (M.A.M.E) it uses default keyboard settings, if steam windows is in focus (xdotool) use xbox script
View PC info
As long as the package you are building from AUR compiles, links and works with existing dependencies on your system, yes.
For this one here:
https://aur.archlinux.org/packages/moltengamepad
You're going to need some additional dependencies not provided by the distro, but installing these will not affect anything else if you don't have them. (They are libraries for interfacing with the Steam Controller)
scraw (scraw-git)
scrawpp (scrawpp-git)
When you see it given like that, it means you can use either scraw or scraw-git (from AUR in this case)
This doc building tool is available in the distro, but it's also a dependency for the build (only)
go-md2man (make)
Last edited by Grogan on 21 June 2023 at 12:39 am UTC
i also tried a git clone and adding the memory fix but this also fails
this is a little over my compile skills
/usr/include/c++/13.1.1/bits/hashtable_policy.h:1304:23: fejl: static assertion failed: hash function must be invocable with an argument of key type
1304 | static_assert(__is_invocable<const _Hash&, const _Key&>{}
not shure i understand, i replaced keys from evtest
!/usr/bin/python3
# Very simple keyboard (WASD) to 4-button gamepad example,
# Requires the python-evdev package.
# Run as root!
#
# Use evtest as root to find keyboard path
from evdev import InputDevice, UInput, ecodes as e
dev = InputDevice('/dev/input/event13') # <- Needs to be changed to your keyboard!
wasd_keys = [e.KEY_UP, e.KEY_LEFT, e.KEY_DOWN, e.KEY_RIGHT]
controller_keys = [e.KEY_LEFTALT, e.KEY_1, e.KEY_SPACE, e.KEY_LEFTCTRL]
cap = {
e.EV_KEY : controller_keys,
}
ui = UInput(cap, name='I-Pac controller 01', version=0x3)
for event in dev.read_loop():
if event.type == e.EV_KEY:
if event.code in wasd_keys:
index = wasd_keys.index(event.code)
ui.write(e.EV_KEY, controller_keys[index], event.value)
ui.syn()
it does nothing and when i Ctrl+c it print this
./xbox-controller01 INT ✘ 5s c00kie55@c0-gamebox
^CTraceback (most recent call last):
File "/home/C00kie55/./xbox-controller01", line 21, in <module>
for event in dev.read_loop():
File "/usr/lib/python3.11/site-packages/evdev/eventio.py", line 45, in read_loop
r, w, x = select.select([self.fd], [], [])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyboardInterrupt
can you point me to some documentation :)
Last edited by c00kie55 on 21 June 2023 at 4:14 pm UTC
View PC info
Last Updated: 2022-02-18 17:57 (UTC)
It's likely that the last time the PKGBUILD maintainer built this was with gcc 11.2 and its libstdc++
Even the moltengamepad-git build is using code that is 3 to 7 years old. (last commit on Oct 22, 2020)
It looks like a dead project. I don't know if coding around this one error would be the only land mine in the build, stuff like this can really get me chasing my tail (especially since my programming knowledge consists of needing examples to fix things if it's not obvious)
Last edited by Grogan on 21 June 2023 at 5:55 pm UTC
Apologies for the confusion!
You need to switch them around and find suitable gamepad events to emit. I used the XYAB button events in my example, but there's a long list of event codes here:
https://github.com/torvalds/linux/blob/master/include/uapi/linux/input-event-codes.h
There's good documentation and a quite thorough tutorial for python-evdev here:
https://python-evdev.readthedocs.io/en/latest/tutorial.html
this looks good i will just have to dig into the documentation.