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

Not accepting characters from some keyboard like samsung default keybaord or AI Keyboard etc #26

Open
dmsherazi opened this issue Oct 24, 2016 · 4 comments · Fixed by riclage/material-code-input#1 · May be fixed by #27

Comments

@dmsherazi
Copy link
Contributor

When using key board that comes built in on Samsung mobiles or AI Keyboard the onKeyDown or onKeyUp is not triggered at all specially for the number keys. Although the arrow keys and done button on keyboard do trigger the aforementioned methods.

@dmsherazi
Copy link
Contributor Author

dmsherazi commented Oct 24, 2016

found out that removing the following code will solve the issue to some extent

@Override
    public InputConnection onCreateInputConnection(EditorInfo outAttrs) {
        outAttrs.actionLabel = null;
        outAttrs.inputType = mInputType;
        outAttrs.imeOptions = EditorInfo.IME_ACTION_DONE;
        return new BaseInputConnection(this, true);
    }

@dmsherazi dmsherazi changed the title Not accepting characters from some keyboard like suamsung default keybaord or AI Keyboard etc Not accepting characters from some keyboard like samsung default keybaord or AI Keyboard etc Oct 24, 2016
@dmsherazi
Copy link
Contributor Author

it seems that changing return new BaseInputConnection(this, true); to return new BaseInputConnection(this, false) also will help to some extent but still there is an issue with BACK or DEL button with some keyboards. This happens to be a bug in Google Keyboard and other third-party keyboards. A work around is available in this StackOverflow Answer

dmsherazi added a commit to dmsherazi/material-code-input that referenced this issue Oct 24, 2016
This will fix glomadrian#26 to an extent where some third-party and Google Keyboard were not able to enter characters
@dmsherazi dmsherazi linked a pull request Oct 24, 2016 that will close this issue
riclage added a commit to riclage/material-code-input that referenced this issue Jan 16, 2017
@KennyGoers
Copy link

This DOES NOT work in regards to the Samsung 8 and it's keyboard, maybe the Samsung keyboard in general.

@yuriymyronovych
Copy link

I regret so much I ever used this lib....

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 a pull request may close this issue.

3 participants