Scrcpy: Add an option to disable the on-screen keyboard temporarily

Created on 22 Jun 2018  路  5Comments  路  Source: Genymobile/scrcpy

I did a small investigation of how it can be done using ADB with a great success.
First, I installed NULL keyboard. A keyboard that does nothing. Yes, really.
It works great, but once I set IME to Null, I can't switch back easily (only through Android settings menu).

IME switching can be done using ADB:

List all IME:

> adb shell ime list -s -a
com.google.android.inputmethod.latin/com.android.inputmethod.latin.LatinIME
org.pocketworkstation.pckeyboard/.LatinIME
com.wparam.nullkeyboard/.NullKeyboard

Get current IME:

> adb shell settings get secure default_input_method
org.pocketworkstation.pckeyboard/.LatinIME

Set Null IME:

> adb shell ime set com.wparam.nullkeyboard/.NullKeyboard      
Input method com.wparam.nullkeyboard/.NullKeyboard selected

Restore IME:

> adb shell ime set org.pocketworkstation.pckeyboard/.LatinIME 
Input method org.pocketworkstation.pckeyboard/.LatinIME selected
custom actions

Most helpful comment

well yes but i wonder how to combine those custom scripts when needed.
I already created something like:
https://gist.github.com/vshymanskyy/a44ff7af2848653e91f269910cb9d50f

... and it works just f*cking awesome!

All 5 comments

well yes but i wonder how to combine those custom scripts when needed.
I already created something like:
https://gist.github.com/vshymanskyy/a44ff7af2848653e91f269910cb9d50f

... and it works just f*cking awesome!

:+1:

adb shell content insert --uri content://settings/system --bind name:s:show_touches --bind value:i:0

Could be replaced by the higher-level command:

adb shell settings put system show_touches 0

This solution works awesome!

well yes but i wonder how to combine those custom scripts when needed.
I already created something like:
https://gist.github.com/vshymanskyy/a44ff7af2848653e91f269910cb9d50f

... and it works just f*cking awesome!

here's a windows batch script based on your script: https://gist.github.com/sharunkumar/ca2cd57936e4bac974578d1e8a6b3cf6

Was this page helpful?
0 / 5 - 0 ratings

Related issues

BloodPHamtOm picture BloodPHamtOm  路  3Comments

cutoseo picture cutoseo  路  4Comments

YurieCo picture YurieCo  路  4Comments

SuryaElavazhagan picture SuryaElavazhagan  路  4Comments

behzadpooldar picture behzadpooldar  路  4Comments