Skip to content

Added open and close functionality of Soft keyboard #305

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

Merged
merged 1 commit into from
Mar 12, 2017

Conversation

gunkiratk
Copy link

Closed #297

@omerjerk
Copy link
Contributor

omerjerk commented Mar 3, 2017

Looks good to me.

@codeanticode
Copy link
Contributor

codeanticode commented Mar 8, 2017

@gunkiratk @omerjerk

openKeyboard() and closeKeyboard() are already included in PApplet. In what way are the ones proposed in this PR different and/or better?

@gunkiratk
Copy link
Author

@codeanticode When we cloned the repo ,both the functions were not included.
So we implemented them.

@codeanticode
Copy link
Contributor

Ok, got it. Looks like the only difference is that in the current code I'm using the InputMethodManager .showSoftInput/hideSoftInputFromWindow methods, which require an additional reference to the root view, whereas in your PR you call InputMethodManager.toggleSoftInput(), which does not need the view. Any advantage of one over the other?

@gunkiratk
Copy link
Author

@codeanticode The only one advantage I found is showSoftInput() does not work when device has a hard (slide-out) keyboard whereas toggleSoftInput() works for every device.

@codeanticode codeanticode changed the base branch from multitouch to wearapi March 12, 2017 17:21
@codeanticode codeanticode merged commit 8be54d3 into processing:wearapi Mar 12, 2017
@codeanticode
Copy link
Contributor

codeanticode commented Mar 12, 2017

@gunkiratk Great observation, removed old code and merged your PR. Thank you!

(please note that the current development branch is https://github.com/processing/processing-android/tree/wearapi, merged there)

@codeanticode
Copy link
Contributor

@gunkiratk Actually, I just thought that if you have a hardware keyboard, you might not want the soft keyboard to open up, since you will be receiving the key events from hard keyboard anyways, wouldn't you agree?

@gunkiratk
Copy link
Author

But I think we should give an option of softKeyboard to users with hardware keyboard ,just like laptops and PCs with hard keyboard have, because there can be possibility the hardware keyboard is not working or some keys are not functional then the user can use softKeyboard.So it is better to use toggleSoftInput() as it works with all devices.

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.

3 participants