-
Notifications
You must be signed in to change notification settings - Fork 100
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
Controller to Keyboard Delay #848
Comments
Not sure if it is the same issue but I observed the same on Seam Deck. The controller is working normally, then I go and type a chat message using virtual keyboard. After last keyboard input (ENTER) the controller isn't responding for 3-5 seconds. |
The delay should only be 2secs not 5. This was intentional, but maybe this can be improved. So I suggest to allow keyboard input in all input modes (Mouse, Gamepad and Touch) and prefer Gamepad input over Mouse input. You can test the artifacts of https://github.com/minecraft-linux/mcpelauncher-client/pull/74/checks and tell me if it matches your expectations. This input filter exists, because some systems send Mouse events from Touch input sources and the Minecraft Game is confused about this fact. |
Hey I tested this version (x64 AppImage) on Steam Deck. But keyboard input works and also the switch to keyboard and back to gamepad is instant, no delay. |
I have been having the same problem with my 2.4ghz Astro controller on linux on the newest v0.11.2-718 x64 appimage. Its been causing me issues in game especially when trying to go in my inventory around mobs. Is there a current workaround? |
@ChristopherHX perhaps we could have configuration option or command line switch to completely disable this delay in any direction? Default would be turned on as it is "safe" but in some cases it could be disabled by user without consequences. |
Feel free to contribute it. Commandline switches don't have any ui components to configure them. I have only added them to the profile config for users doing edits to the config files directly. Due to the current amount of code required for adding cli options in the mcpelauncher-ui-qt, we would have to look for a declarative way to bring then into the ui. Otherwise I'm against adding more cli options to the settings.
Why does your touch not work it's a priority 0 like in v0.11.2-718 AppImage (latest)? It does work for me without issues via this test build. I could consider to only apply input filter for mouse and touch events and let all other events pass regardless of primary touch or mouse mode. But then we have the problem that there is no way to bring the mouse cursor back........ You know it's not easy to find a solution everyone wants, I'm okey how it is now in the releases and I'm the one who writes most code of the launcher at this time myself. |
BTW To switch between input modes
|
Doesn't need to be in the UI IMO.
Take a look, the first part of the video is using TEST version and the second part is using official release (AppImages both). You can see that the mouse works just fine but the moment it switches to gamepad the mouse doesn't work anymore, no matter how much i move the cursor (same with touch - nothing registers). Hence why the suggestion to remove any delay altogether with command line switch. |
Your second part of the video isn't using touch at all (not even trying to use it), so I don't know if touch ever worked via any appimage. I will add an env variable to pass all input's to the game at the same time (no eta) It's like return true for hasInputMode based on a special env variable, you can also do it yourself and open a PR. I think it's good practice to read the env via getenv("MCPELAUNCHER_RAW_INPUT") in the windowcallbacks constructor and store it inside the object. Then add a if(rawinput) { return true; } If I approve running the workflow, then you automatically get an AppImage for your change. |
Hey @ChristopherHX, thanks for adding the possibility. After launching I first moved the mouse and the buttons on main reacted to mouse over them (switched grey/green colors). I could also click on the buttons. |
The PR minecraft-linux/mcpelauncher-client#76, contains a big bug with reading env variables. Make shure you aren't using builds of the PR and use nightly snapshots instead. (see Branch Sync workflow in mcpelauncher-manifest)
Not under my control, the game make asumptions of your input method itself. The game sees gamepad events => gamepad controls are shown, the game sees mouse events => mouse controls are shown. |
You fixed the bug in next commit and it is also only related to integer values, which RAW_INPUT does not use. I was using mcpelauncher-client builds, will switch to mcpelauncher-manifest. The RAW_INPUT variable was recognized correctly in my test.
I understand that but that's just visual thing. Bigger problem is that the game doesn't switch back to mouse input at least not fully. |
Yeah that's why rawinput has been replaced in 2021, I forget about this mouse locking issue. I assume
However it is not a new bug, it was just impossible to use rawinput between 2021 and 2023 (without modding the code). |
PS Mouse works inside Minecraft worlds, because it always locks the mouse and use relative motion. While Mouse is locked, there are no absolute motion events. The input filter has code to unlock the mouse if it switches from gamepad / touch modes, but it is impossible to implement for raw_input you can use both at the same time and hope noting goes wrong. |
Tested using MCPELAUNCHER_CLIENT_INPUT_SWITCH_DELAY=0 and it works better. At least the input can be switched between the gamepad and mouse/keyboard. When using inputModeSwitchDelay=0 then code is gouing through these lines and The touches at least for me emulate mouse clicks and after using gamepad they are mostly wrong, for example I have PLAY button selected with gamepad and then touch SETTINGS button the play action will be executed. I suppose it is because the game doesn't switch to different mode quickly enough or something. Touches work fine when the game deactivates gamepad input (no extra icons). |
So im on a mac using 10.13 and i play controller but i tried to make a hotkey for obs to save a clip but everytime i click that theres alway a 5 sec delay to be able to play on my controller again is there any fix. im using a wired ps4 controller btw
The text was updated successfully, but these errors were encountered: