material-code-input icon indicating copy to clipboard operation
material-code-input copied to clipboard

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

Open dmsherazi opened this issue 8 years ago • 4 comments

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 avatar Oct 24 '16 05:10 dmsherazi

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 avatar Oct 24 '16 13:10 dmsherazi

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 avatar Oct 24 '16 15:10 dmsherazi

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

KennyGoers avatar Apr 26 '18 15:04 KennyGoers

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

yuriymyronovych avatar Jun 21 '18 20:06 yuriymyronovych