【问题标题】:How to turn off physical keyboard through adb command?如何通过 adb 命令关闭物理键盘?
【发布时间】:2016-05-18 15:01:27
【问题描述】:

我想通过 android 中的 adb 关闭它。但我找不到正确的命令。 我试图在 providers.settings 中搜索 sqlite 但一无所获。 有谁知道正确的命令吗?

【问题讨论】:

  • 你的问题解决了吗?
  • 抱歉,什么也没找到……

标签: android adb


【解决方案1】:

您可以使用InputMethodManager.setInputMethodEnabled(String id, boolean enabled) 做您想做的事。首先,您需要为您的键盘找到完整的输入法 ID - 您很可能能够在 dumpsys input_method 输出中找到它。 然后你可以使用service call input_method 28 s16 'input.method.name' i32 0做禁用和service call input_method 28 s16 'input.method.name' i32 1重新启用输入法。

以下命令在 Android 5.1 手机上添加了Google Hindi Input

adb shell su 0 service call input_method 28 s16 'com.google.android.apps.inputmethod.hindi/.HindiInputMethodService' i32 1`

并且该命令已将其从启用的输入法列表中删除:

adb shell su 0 service call input_method 28 s16 'com.google.android.apps.inputmethod.hindi/.HindiInputMethodService' i32 0`

【讨论】:

  • 感谢您的回复。但它不能关闭物理键盘。
猜你喜欢
  • 2012-04-19
  • 1970-01-01
  • 1970-01-01
  • 2020-10-02
  • 2017-01-15
  • 2013-03-18
  • 2016-12-13
相关资源
最近更新 更多