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

Disable OnScreenKeyboardOverlapsGameWindow on iOS when hardware keyboard is attached #6407

Merged
merged 2 commits into from
Nov 14, 2024

Conversation

frenzibyte
Copy link
Member

@frenzibyte frenzibyte commented Nov 4, 2024

Noticed while working on fixing iOS hardware keyboard issues. When a hardware keyboard is attached, the software keyboard no longer shows and "overlaps with the game window", so it's more ideal for the OnScreenKeyboardOverlapsGameWindow flag to remain false in that case, so that search text boxes on osu! still gain focus when they are present (i.e. when opening song select or opening settings overlay).

An Android companion to this should be in place if this change can be agreed upon.

Also note that this implementation can be simply replaced with !SDL_HasKeyboard(), and we can also just replace these overrides with a single override at SDLGameHost that returns !SDL_HasKeyboard() (usually always false on desktop platforms, and true on mobile platforms if there are no hardware keyboards attached). I can go with that approach if it makes more sense (although I would have to test if it actually works as expected).

@smoogipoo
Copy link
Contributor

can be simply replaced with !SDL_HasKeyboard()

I think this makes sense.

@frenzibyte
Copy link
Member Author

frenzibyte commented Nov 9, 2024

I've went the full route by moving this to SDLGameHost and use SDL_HasKeyboard(), might be good for users on Windows without a keyboard (assuming it works). Tested to show correct behaviour (SDL_HasKeyboard() returns true) on Windows and macOS.

@peppy
Copy link
Member

peppy commented Nov 14, 2024

Let's get this in the next(next) release and see how it fares.

@peppy peppy merged commit d733029 into ppy:master Nov 14, 2024
12 of 13 checks passed
@frenzibyte frenzibyte deleted the fix-focus-with-hardware-keyboard branch November 14, 2024 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants