-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Linux] The share button on Xbox Series X|S controller produces "double events" #6296
Comments
There are several issues here. The first is AntiMicroX not recognizing the share button. I haven't looked at the source code, but AntiMicroX may not be looking for the button The final issue, is the kernel driver on your system is translating the share button into a keypress that is being interpreted by X11 as an audio record action. I can fix the error message, but you might want to debug AntiMicroX and see if it's handling the misc1 button. If you find that it isn't, the author is more likely to see what's happening if you file a working patch or a pull request that fixes the issue for you. |
I just checked, seems like you are right about this. I'll message the author about it. Thanks!
Ah, that might be a nuisance at some point… in that case I will have to research if I can somehow easily disable that behavior. |
Hello @slouken The main source of the problem is not the lack of direct handling of While other buttons when pressed launch two events (for example Is it intended behaviour? (for devices that are marked as Example logs
|
Ah, this means it's just not in the mapping. You can use controllermap (that comes in the SDL test directory) to generate a binding and include it here for the next SDL release. |
I actually added the mapping for that controller in the SDL_GameControllerDB repository a few days ago, but I wasn't really familiar with the exact relationship of that project and the main SDL repo. It seems like SDL also has its own set of mappings included with the library? In any case, you can find the mapping from the link. |
The projects are independent. The ones that are included in SDL directly are validated a little more rigorously and so aren't automatically added from SDL_GameControllerDB. I added your mapping, thanks! |
KEY_RECORD is a multi-media keyboard key that starts audio recording. This is not the meaning of the Share button. Having the Share button report KEY_RECORD has side-effects: - software gets confused (see e.g. libsdl-org/SDL#6296) - The Xorg server opens the controller device, keeps it permanently open and reads its buttons and reports share button presses as XF86AudioRecord to applications. Users do not expect this. I grepped the Linux kernel's drivers/input/joystick and there exists NO OTHER joystick type controller that reports a KEY_ type event. They all use BTN_* events. I'm sure the person who added the Share button originally just grabbed some event without giving it much thought.
Description
When pressing the share button on the Xbox Series X|S controller, it seems to be produce "double events". When running the testjoypad program provided with the SDL source, a button press outputs the following:
I originally posted about this erroneously on a different SDL issue. My use case is that I want to map the share button in AntiMicroX, which uses SDL behind the scenes. However, the button press is not recognized by the program, and its developer deemed that the issue might be caused by SDL.
Note that I do not know if this is actually a bug in SDL, or even if it is a bug at all! I was just redirected here by another developer.
I can try to provide more information if needed.
Environment
The text was updated successfully, but these errors were encountered: