[英]How do I get the Name of Keyboard sending key events?
val imm = context.getSystemService(Context.INPUT_METHOD_SERVICE) as? InputMethodManager
val enabledInputMethodList = imm.enabledInputMethodList
In the above snippet, I'm able to get the enabled Keyboards in my device.在上面的代码段中,我能够在我的设备中获得启用的键盘。 But I would like to know specifically which keyboard( Gboard or Microsoft SwiftKey) is sending the event
但我想具体知道哪个键盘(Gboard 或 Microsoft SwiftKey)正在发送事件
See this answer: https://stackoverflow.com/a/14371088/6591585看到这个答案: https : //stackoverflow.com/a/14371088/6591585
It tells you the default keyboard app.它会告诉您默认的键盘应用程序。 While it doesn't say which keyboard is being used to input the text, chances are it's the same as the default.
虽然它没有说明使用哪个键盘输入文本,但它可能与默认键盘相同。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.