Android開發過程可能會遇到Android輸入法異常的問題,可以通過如下命令來查看和修改系統的輸入法。方便調試。
獲取當下系統的所有輸入法
adb shell ime list
獲取當前的可用輸入法
adb shell ime list -s
獲取當前的輸入法
adb shell settings get secure default_input_method
設置當前的輸入法
adb shell settings put secure default_input_method 包名/輸入法
Android檢測到硬件鍵盤連接時會自動隱藏軟鍵盤,此命令可解除該限制
adb shell settings put secure show_ime_with_hard_keyboard 1