简体   繁体   English

如何使用终端监听音量键事件?

[英]How to listen Volume key events using Terminal?

I created as shell script for Android and I want to use Volume Keys to control or scroll info/selection.我为 Android 创建了 shell 脚本,我想使用音量键来控制或滚动信息/选择。

https://supportcommunity.zebra.com/s/article/Find-out-key-event-via-ADB?language=en_US Like upper link. https://supportcommunity.zebra.com/s/article/Find-out-key-event-via-ADB?language=en_US像上面的链接。 you can use您可以使用

adb getevent 
adb sendevent 

use getevent and then do your action, get the right action code, then, you can use adb sendevent code that you get just now to achieve your goal.使用 getevent 然后做你的动作,得到正确的动作代码,然后,你可以使用你刚才得到的 adb sendevent 代码来实现你的目标。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM