ShadowBlip / OpenGamepadUI

Open source gamepad-native game launcher and overlay
https://opengamepadui.readthedocs.io
GNU General Public License v3.0
396 stars 16 forks source link

[Feature Request] Allow External controller to Open OGUI-QAM and control it. #229

Closed spikerguy closed 2 months ago

spikerguy commented 1 year ago

Currently OGUI-QAM can only be opened with onboard controller.

Expected Behavior: Guide + B to open QAM no matter which controller is used, if it is from Onboard controller of the device or external controller connected over Bluetooth.

Even when OGUI-QAM is opened from on-board controller, then external controller cannot take over it to access the power-tool menu's.

Thanks for all the work done by the team.

pastaq commented 1 year ago

This should be working currently. Can you provide some additional information?

ShadowApex commented 1 year ago

This issue should now be fixed in v0.20.0. Let us know if you still have issues with external controllers on a handheld.

Thanks!

spikerguy commented 1 year ago

This issue should now be fixed in v0.20.0. Let us know if you still have issues with external controllers on a handheld.

Thanks!

Just pkged 0.20.2 and it does not add this function.

tried it on 2 devices.

  1. WinMax2
  2. GTR7

On Winmax2 I can open OGUI-QAM using Menu + B but cannot control using external control. Only new thing is when I open OGUI-QAM then I am able to navigate it using the keyboard arrow keys.

How can I get logs on Manjaro, Cause the method mentioned above it for chimera only.

pastaq commented 1 year ago

How can I get logs on Manjaro, Cause the method mentioned above it for chimera only.

Are you not using the opengamepadui session? This is built in to the session scripts and isn't chimeraos specific.

spikerguy commented 1 year ago

I am using it with ogui-session.

I have some logs, I will upload it tonight after work.

Thanks.

spikerguy commented 1 year ago

Here I have tried to bring up qam multiple time. ogui-stdout.log

Documenting Multiple Cases below:

  1. OGUI on launch cannot attach keyboard to SteamDeckUI (SDUI) unless I click on any button using the mouse, At this stage I can open ogui-qam using Ctrl + F2. Meaning OGUI have keyboard attached but not SDUI.
  2. Once I click anywhere using mouse, My keyboard gets attached to SDUI, but now I cannot get ogui-qam to launch, while I can launch SDUI-qam.
  3. OGUI does not bring up ogui-qam ever using wireless controller, the same controller can bring ogui-qam when I try to attached it with usb-cable.
  4. [BUG] After sometimes the key press detection becomes so fast that it opens and closes the ogui-qam, sdui-qam at the same time. and B button closes everything and opens Steam menu from the left in lightning speed.
spikerguy commented 1 year ago

Hey,

Did a short video trying to explain the issues. I have faced the following issues with multiple use case.

  1. USB-Wireless Keyboard Use Case: 1a. OGUI-QAM only opens on initial launch where the keyboard is not yet detected as a hid for navigation use or keyboard is detected by OGUI but not steam client. Here I can access OGUI-QAM but cannot nagivate on steam client. I have to click on mousepad or click anywhere to make steam client aware of the hid device. 1b. Once Navigation works on steam client then I cannot launch OGUI-QAM using Ctrl + F2 on keyboard.
  2. External Controller: Guilikit KingKong Pro2 2a. Can never launch OGUI-QAM but can launch steam qam using Menu + A

Video ogui-video-output.txt

ShadowApex commented 1 year ago
  1. USB-Wireless Keyboard Use Case: 1a. OGUI-QAM only opens on initial launch where the keyboard is not yet detected as a hid for navigation use or keyboard is detected by OGUI but not steam client. Here I can access OGUI-QAM but cannot nagivate on steam client. I have to click on mousepad or click anywhere to make steam client aware of the hid device. 1b. Once Navigation works on steam client then I cannot launch OGUI-QAM using Ctrl + F2 on keyboard.

Keyboard support is a different issue than gamepad support. Could you open a separate issue for this case? This has to do with Gamescope's keyboard focus, which is what determines which app will get keyboard input. When first starting up, OGUI has keyboard focus, but when you use the mouse to click anywhere in the Steam window, it will change keyboard focus to the Steam window.

In order to support pressing CTRL+F2 to open the QAM while in-game or in Steam, we'll need to look into a good solution to do so. One option is to intercept keyboard input like we intercept gamepad input, but this can introduce security concerns as OpenGamepadUI would be able to listen to every keystroke you enter.

2. External Controller: Guilikit KingKong Pro2 2a. Can never launch OGUI-QAM but can launch steam qam using Menu + A

Is the log you posted from when you tried opening the QAM with your Guilikit KingKong Pro2 controller? Looking at the end of the log it seems like it is opening the QAM:

2026571 [DEBUG] [ManagedGamepad] :0: Translated event <EvdevEvent: EV_KEY BTN_MODE 1> into <EvdevEvent: EV_KEY BTN_MODE 1>
2026571 [DEBUG] [ManagedGamepad] :0: Mode Pressed!
2026571 [DEBUG] [ManagedGamepad] :0: Mode DOWN (Catch)!
2026623 [DEBUG] [ManagedGamepad] :0: Open dat QAM BB
2026624 [DEBUG] [ManagedGamepad] :0: send_input: InputEventAction: action="ogui_qam", pressed=true
2026637 [DEBUG] [OnlyQAMInputManager] :0: Incoming event: InputEventAction: action="ogui_qam", pressed=true
2026638 [DEBUG] [FocusStack] :0: Pushed focus stack: [FocusGroup:<Node#147421400211>]
2026638 [INFO] [FocusGroup] :0: Viewport grabbing focus on node: PowerToolsCard
2026638 [INFO] [Main-OnlyQAM] :0: _on_qam_open state: home
2026638 [DEBUG] [GamepadManager] :0: Setting gamepad intercept mode: 3
2026638 [DEBUG] [ManagedGamepad] :0: Setting intercept mode to: 3
2026638 [INFO] [GlobalStateMachine] :0: Switched from state home to quick_access_menu
2026638 [INFO] [GlobalStateMachine] :0: Stack: home-> quick_access_menu