【问题标题】:How do I get the Name of Keyboard sending key events?如何获取发送按键事件的键盘名称?
【发布时间】:2021-01-20 16:33:59
【问题描述】:
val imm = context.getSystemService(Context.INPUT_METHOD_SERVICE) as? InputMethodManager
val enabledInputMethodList = imm.enabledInputMethodList

在上面的 sn-p 中,我可以在我的设备中获得启用的键盘。但我想具体知道哪个键盘(Gboard 或 Microsoft SwiftKey)正在发送事件

【问题讨论】:

    标签: android android-edittext android-softkeyboard android-input-method


    【解决方案1】:

    看到这个答案:https://stackoverflow.com/a/14371088/6591585

    它会告诉您默认的键盘应用程序。虽然它没有说明使用哪个键盘输入文本,但很可能与默认键盘相同。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-03-12
      • 2012-03-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-04-15
      相关资源
      最近更新 更多