I want to keep capslock on by default of softkeyboard of android in webview input(html)


i want to have, by default capslock on every time user start typing in webview, after searching i got to know that i will have to extend onCreateInputConnection of webview. but i am stuck can you help me How to extend .

console.log(“completed keyboard hook”);
var inputConnection = this.super.onCreateInputConnection(outAttrs);
outAttrs.inputType |= android.text.InputType.TYPE_TEXT_FLAG_CAP_CHARACTERS;
return inputConnection;


@saintush Here is the working example in play.


Thanks a million. Its working.