Hyprland icon indicating copy to clipboard operation
Hyprland copied to clipboard

Gaming controller support

Open ThatOneCalculator opened this issue 2 years ago • 3 comments

Support for binding controller events to actions (and possibly moving the mouse around with sticks) would be very useful for people in long gaming sessions wanting to quickly switch between applications/interfaces, hacked consoles running Linux, etc

ThatOneCalculator avatar Dec 11 '22 21:12 ThatOneCalculator

Nice enhancement.

This is already possible with the software that steamdeck uses. https://github.com/Samsagax/gamescope-session

When you set it up, you are able to open any X11 application as a non-steam shortcut and set controller bindings for each application, with integration with gamescope.

For example, I've got discord and spotube, and I am able to use the guide button to use the steam deck overlay to switch between the two applications seamlessly, whilst still being able to play any game I like.

ghost avatar Dec 11 '22 21:12 ghost

I am unsure how I would distinguish controllers from keyboards / mice. I think they're just plain old keyboards? What does wev say?

vaxerski avatar Dec 11 '22 21:12 vaxerski

https://github.com/AntiMicroX/antimicrox another alternative and research

ghost avatar Dec 11 '22 21:12 ghost

https://github.com/nowrep/wljoywake for research, it implements idle_inhibit_unstable_v1 for gamepads

theRealCarneiro avatar Apr 03 '23 14:04 theRealCarneiro

There is a gist that reads gamepad inputs: https://gist.github.com/jasonwhite/c5b2048c15993d285130

kamack38 avatar Jun 07 '23 19:06 kamack38

It uses #include <linux/joystick.h> library.

kamack38 avatar Jun 07 '23 19:06 kamack38

It seems that Hyprland detects the gamepad as a keyboard:

	Keyboard at 563f7db63840:
		xbox-wireless-controller-keyboard
			rules: r "", m "", l "pl", v "", o ""
			active keymap: Polish
			main: yes

kamack38 avatar Jun 09 '23 11:06 kamack38

it doesn't detect it as a keyboard... if you look at evtest there are 3 devices, hyprland detects 2 of them.

doncollins1985 avatar Aug 27 '23 22:08 doncollins1985

i've been trying to get it to notice it, but so far not having any luck

doncollins1985 avatar Aug 27 '23 22:08 doncollins1985