对于下面的代码,我希望能够按住一个按钮,然后按另一个执行脚本,如“Ctrl”+“upArrow”组合键。我猜想某种'按键'和'按键'功能是我所需要的。有任何想法吗 ?阅读与bash脚本的组合键
#!/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
您可以在此示例中使用功能键: – tale852150