android 打开应用程序的快捷键
我希望当用户按下某个快捷键时打开我的应用程序。说长按键盘上的 9 按钮(这里我指定的键盘是软键盘,当用户单击电话图标时打开)。我可以捕捉到该事件吗?是否有广播接收器,或者请指定任何技术。
I want my application to get opened when user presses some shortcut key. Say long hold of 9 button on the key pad(the key pad here i specified is soft key pad which opens when user clicks on phone icon). can i able to capture that event? is there any broadcast receivers are there or please specify any Technic.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
可以在这里看到
按键事件一般都伴随着一个按键代码( getKeyCode())、扫描码(getScanCode())
关键代码常量在此类中定义。扫描代码常量是从操作系统获取的原始设备特定代码,因此通常对应用程序没有意义,除非使用 KeyCharacterMap 进行解释。
You can see here
Key events are generally accompanied by a key code (getKeyCode()), scan code (getScanCode())
Key code constants are defined in this class. Scan code constants are raw device-specific codes obtained from the OS and so are not generally meaningful to applications unless interpreted using the KeyCharacterMap.