I want to hide soft keyboard using adb shell command. Is there any specific command available to do so or in any ways can I get the current focus window object over adb on which I can hide the keyboard if showing?
you can hide your keyboard with
adb shell input keyevent 111
you can find all keyevents are here: http://developer.android.com/reference/android/view/KeyEvent.html
@Matthias Miro answer is 4.5 years old and it did not work for me with Android 9. Instead I found the following solution in a GitHub issue thread which worked:
adb shell ime set com.wparam.nullkeyboard/.NullKeyboard
to get your original keyboard back:
adb shell ime list -s -a
adb shell ime set [keyboard line from previous command]
I have found a faster and easier solution through adb, by disabling the keyboard entirely.
you can hide your keyboard permament with
adb shell pm disable-user com.android.inputmethod.latin
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With