使用侧边键控制网易云音乐

Catalogue
  1. 1. 添加配置
  2. 2. 查看按键编号
1
2
3
4
5
sudo apt install xbindkeys xautomation


# 生成默认配置
xbindkeys --defaults > $HOME/.xbindkeysrc

添加配置

.xbindkeysrc
1
2
3
4
5
6
#KeyboardPre
"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.netease-cloud-music /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous"
b:9 + Release
#KeyboardNext
"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.netease-cloud-music /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next"
b:8 + Release

查看按键编号

1
xev | grep button