【发布时间】:2016-06-21 15:05:08
【问题描述】:
对于下面的代码,我希望能够按住一个按钮并按下另一个按钮来执行脚本,比如“Ctrl”+“upArrow”组合键。我猜是某种“key-down”和'key-up' 功能是我需要的。有什么想法吗?
#!/bin/bash
read -rsn1 input
while [ "$input" = "a" ]; do
read -rsn1 input2
if [ "$input" = "b" ]; then #spaces are important for control flow in bash-script
echo "Rest in pepperoni memeroni";
fi
done
【问题讨论】:
-
本例中可以使用功能键:
标签: bash