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


#1

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 .
thanks

android.webkit.WebView.extend({
onCreateInputConnection:function(){
console.log(“completed keyboard hook”);
var inputConnection = this.super.onCreateInputConnection(outAttrs);
outAttrs.inputType |= android.text.InputType.TYPE_TEXT_FLAG_CAP_CHARACTERS;
return inputConnection;
}
});


#2

@saintush Here is the working example in play.


#3

Thanks a million. Its working.