cat writebug.cn/history

一个开发者的技术博客。

树莓派中开机时检测案件是否按下

# 记录一下此用法。 thd来自 debian 软件包 triggerhappy
if [ -x /usr/sbin/thd ] && timeout 1 thd --dump /dev/input/event* | grep -q "LEFTSHIFT\|RIGHTSHIFT"; then
      printf "xxxxxxxx" 
fi