问题:
从终端运行时,键入:
jstest /dev/input/js1 | grep '^Joystick'
我如何将结果放入shell script?
答案1:
来自jstest手册页:
These program follows the usual GNU command line syntax, with long options
starting with two dashes (`-').
-h, --help
Display help information and exit
-v, --version
Display version information and exit
没有方法可以简单地显示你的操纵杆的名称,并退出,尝试使用:
xinput -list
这显示所有的设备,包括操纵杆,鼠标和键盘,要缩小范围,请使用:
xinput -list | grep -i joystick
相关文章