Skip to content
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

Holding keys before gameplay starts can result in incorrect input handling #23555

Closed
ekamtaneja opened this issue May 15, 2023 · 4 comments · Fixed by ppy/osu-framework#6101
Closed
Assignees
Labels
osu!framework issue Can't resolve this without changes to osu!framework. priority:1 Very important. Feels bad without fix. Affects the majority of users. type:input

Comments

@ekamtaneja
Copy link

Type

Game behaviour

Bug description

I'm an alt player, as in I always try to alternate my fingers when tapping. I have a habit of holding down 'z' when beginning a map and the first note I always tap is with 'c' as I play index-ring. Due to me holding down 'z' as the map is starting, I encountered a bug where when I click on the first circle with 'c', it does a double tap rather than a single tap. I can sort of tell what is going on, I watch the key counter on my screen, and from what I can tell, the game doesn't realize I have 'z' pressed when the level is starting/initializing. Rather, the game only realizes I have 'z' pressed after I tap 'c' which then registers both key presses simultaneously resulting in a double tap. This is obviously bad for gameplay, but also easily avoidable by just making sure to not hold down before starting a map (or what I like to do is just spam 'z' and 'c' until I see the map has finished loading and by that point, I've already gotten a few key presses on both keys, so that way I don't get a double tap).

Below I have shared a video of this issue. In the video is also a key overlay so that it is clear which key is being pressed as the one in-game is faulty due to this issue. The video first shows me holding 'z' as the level initializes and then clicking 'c' for the first circle, producing a double tap. Second, I prove that it works with either key being held first by holding 'c' first and then pressing 'z' for the first circle. I then redundantly produce the bug again by first holding 'z'. Finally, the video shows me not holding either button initially and tapping the two circles into a slider almost perfectly to prove it is not a skill issue.

Screenshots or videos

2023-05-15_00-27-56_Trim.mp4

Version

2023.513.0-lazer

Logs

runtime.log
updater.log
database.log
input.log
legacy-ipc.log
network.log
performance.log

@monochrome22
Copy link

A more sane bug description:

  1. Hold K1 during PlayerLoader.
  2. When the gameplay starts, while still holding K1, press K2.

Expected behavior: K2 keycount increases, K1 keycount does not increase.
Actual behavior: Both K1 and K2 keycounts increase.

@peppy
Copy link
Sponsor Member

peppy commented May 17, 2023

This is very likely going to be due to the state synchronisation logic in PassThroughInputManager.

I'm going to make this a priority 1 because I know for a fact this isn't the first time it's come up, and it's pretty detrimental to gameplay when it occurs.

@peppy peppy added osu!framework issue Can't resolve this without changes to osu!framework. type:input priority:1 Very important. Feels bad without fix. Affects the majority of users. labels May 17, 2023
@peppy peppy changed the title Double tap when holding either button while map initializes Holding keys before gameplay starts can result in incorrect input handling May 17, 2023
@frenzibyte frenzibyte self-assigned this Dec 30, 2023
@frenzibyte
Copy link
Member

The expected behaviour does not look to be stated here, so I checked osu!(stable) and it looks to consider the held key as pressed as soon as gameplay starts, rather than ignoring it entirely:

CleanShot.2023-12-31.at.01.33.27.mp4

Interestingly, PassThroughInputManager already works similarly, so the issue likely resides within KeyBindingContainer instead:

CleanShot.2023-12-31.at.01.35.38.mp4

@frenzibyte
Copy link
Member

On second thought, KeyBindingContainer is designed to ignore already-held keys entirely, so unless the above behaviour is wanted, it's easier to just ignore the held key and fix the double-press issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
osu!framework issue Can't resolve this without changes to osu!framework. priority:1 Very important. Feels bad without fix. Affects the majority of users. type:input
Projects
None yet
4 participants