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

Add support for on-screen keyboard on mobile devices #266

Merged
merged 1 commit into from
Sep 23, 2020
Merged

Conversation

mtlynch
Copy link
Contributor

@mtlynch mtlynch commented Sep 22, 2020

Fixes #46
Re-do of #223, which had to be rolled back due to a regression

@djclueless
Copy link
Contributor

Do you really need all this? Can't you just do sendTextInput(evt.data); ?

  if (
              evt.inputType === "insertText" ||
              evt.inputType === "insertCompositionText"
            ) {
              sendTextInput(evt.data);
            }

@mtlynch
Copy link
Contributor Author

mtlynch commented Sep 23, 2020

I'd rather start conservatively and expand if we need to. One in particular that I think will misbehave if we send everything is backspace because it's inputType='deleteContentBackward' and its evt.data is null.

Have you seen this? It's a good tool for exploring input events:

https://w3c.github.io/uievents/tools/key-event-viewer.html

@djclueless
Copy link
Contributor

That is a nice tool, I was just using alert with json.stringify on my phone to check the event.

@mtlynch mtlynch merged commit a9e45aa into master Sep 23, 2020
@mtlynch mtlynch deleted the redo-mobile branch March 6, 2022 21:30
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.

Support typing into TinyPilot from a mobile device
2 participants