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

web: mobile: browser virtual keyboard support #2287

Merged
merged 1 commit into from
Jul 20, 2020

Conversation

Beuc
Copy link
Contributor

@Beuc Beuc commented Jul 18, 2020

Currently players on mobile web are stuck whenever the game asks text input (typically "what's your name").

As usual web support is tricky, and there's no API for the mobile browser virtual keyboard. My leads are:

(1) Map a HTML text input with SDL2 (character-based): cf. emscripten-ports/SDL2#80 -- APIs/events don't match, security policies are in the way, little external interest, probably not feasible

(2) Implement a virtual keyboard within Ren'Py: sounds OK; it won't support many characters or input methods but integration would be best

(3) Map a HTML text input with Ren'Py (line-based): sounds OK; supports the characters / input methods that the browser supports, integration is a bit rough (translucent text input at the top) but works

(4) Give up and tell devs/porters to do their own keyboard in Screen Language: hopefully not, I think we can provide a default something that works in the common case

This PR is a working attempt at (3).

I just see now that there's some issue with Firefox who simulates some keys events (space, /... but not letters) and messes things up, so this isn't ready yet, but I thought I'd be good to start the conversation.

virtual-keyboard

Beuc added a commit to renpy/renpyweb that referenced this pull request Jul 18, 2020
@renpytom
Copy link
Member

It's no worse that what I've seen in billion dollar android games. Merging.

@renpytom renpytom merged commit c655a6d into renpy:master Jul 20, 2020
@Beuc
Copy link
Contributor Author

Beuc commented Jul 21, 2020

I just see now that there's some issue with Firefox who simulates some keys events (space, /... but not letters) and messes things up, so this isn't ready yet, but I thought I'd be good to start the conversation.

Merging.

Thanks, but as I explained I didn't intend for this to be merged as-is right away :/

I was about to revert the merge but it seems this is a tricky case.
It's probably best to revert the merge commit and recreate this branch from scratch (and a new issue/non-PR for continuing the conversation). What do you think?

renpytom added a commit that referenced this pull request Jul 23, 2020
This reverts commit c655a6d, reversing
changes made to ee21bfa.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants