Show HN: Pianoterm – 从你的钢琴运行 shell 命令。Linux CLI 工具
发布: (2026年3月3日 GMT+8 04:50)
1 分钟阅读
原文: Hacker News
Source: Hacker News
pianoterm
从你的钢琴上运行 shell 命令
Description
Linux CLI 工具,用于将 shell 命令分配给 USB MIDI 键盘上的按键。
Usage
pianoterm
Note: 假设使用 ALSA 作为声卡驱动。使用 acconnect -i 查找所需的 MIDI 端口。
Configuration
Configuration file: $HOME/.config/pianoterm/config
# this is a comment
#
# trigger can be on_release or on_press
on_press
# syntax: port = command
# use aseqdump -p to find specific keycodes
21 = playerctl previous # first key on an 88-key keyboard
22 = playerctl play-pause
23 = playerctl next
# ...
108 = /home/me/my_script.sh
Building
git clone https://github.com/vustagc/pianoterm.git
cd pianoterm && make
Dependencies
- C 编译器
alsactl(1.2.15.2)make(可选)