对于下面的代码,我希望能够按住一个按钮并按下另一个按钮来执行脚本,例如“Ctrl”+“upArrow”组合键。我猜这是某种“按键”和“关键”功能是我所需要的。任何想法?
#!/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