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

cellOskDialog: Implement keyboard input support #11834

Merged
merged 16 commits into from Apr 25, 2022

Conversation

Megamouse
Copy link
Contributor

@Megamouse Megamouse commented Apr 19, 2022

  • Adds keyboard support to the On-Screen-Keyboard of the native user interface
  • Implements some missing error checks in cellOskDialog
  • Implements a pseudo consumer logic for the pad/keyboard/mouse events during loaded OSK dialogs
  • Adds some more TODOs for cellOskDialog. I'll implement some of them for MGSO later if needed.
  • Some minor keyboard refactoring

Disclaimer:

  • Needs basic keyboard handler.
  • The OSK will only recognize characters that are supported by the current keyboard layout.
    So if you need other characters, you can try to toggle the layouts with L2 and R2, as always.

TODO

  • Enter button
  • Handle keyboard pad handler

@cipherxof
Copy link
Contributor

cipherxof commented Apr 24, 2022

This PR fixes a crash that occurs when inputting text when native interface is disabled. The crash occurs because on_osk_input_entered is called when it doesn't exist. It had been removed in a877140.

Also, I'm sure you are aware, but this PR does not work properly with MGO. It rapidly triggers keys when you press them.

@illusion0001
Copy link
Contributor

Send logs

@cipherxof
Copy link
Contributor

I was mainly reporting that this indeed did fix a crashing issue that is currently present on the master branch. However, I was told by someone else it did not work for him and he had talked megamouse about it privately. I didn't personally test it until now. For me, it actually does work. I'm unsure if something had changed between then and now but here are the logs + proof that it works. The only issue is that hitting enter does not submit the message so I have to press start on the controller.

osk

RPCS3.log.gz

@Megamouse
Copy link
Contributor Author

@cipherxof it's a bit of a dilemma. Enter is used for newline already. So we kinda have to decide on what to do here.

@Megamouse
Copy link
Contributor Author

Megamouse commented Apr 25, 2022

I decided to use enter as "accept" when there is single-line input and keep enter as "newline" if there is multi-line input.
You'll sadly have to accept with the controller in that case.
With this in mind I also decided that the keyboard input is disabled if there is a keyboard already used as pad.

I added the Escape key to cancel the dialog.

Finally I added auto-repeat by default. It won't be used though if the game already decided to disable it.
This might change in the future if I ever decide to detach the current implementation from cellKb.

@Megamouse Megamouse merged commit 8d662e9 into RPCS3:master Apr 25, 2022
@Megamouse Megamouse deleted the reversion branch April 25, 2022 17:46
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.

None yet

3 participants