I am using an application (VMWare Workstation) which hijacks the media keys on my keyboard, so I want to use another input device (Elgato Stream Deck) to send generic media commands like 'volume up' or 'pause'. I am able to use the stream deck to send shell commands like xdotool key XF86AudioLowerVolume
, and this works as long as I'm in the gnome shell, but VMWare still hijacks those messages if I'm in a VM. Lower-level commands using tools like wmctrl
or dbus-send
, on the other hand, work fine. So, what would be the dbus-send
equivalent to xdotool key XF86Audio*
commands?
I can use dbus-monitor
to view events when pressing the media keys and see, for example:
signal time=1599582032.226007 sender=:1.66 -> destination=:1.96 serial=18241 path=/org/gnome/Shell; interface=org.gnome.Shell; member=AcceleratorActivated
uint32 140
array [
dict entry(
string "device-id"
variant uint32 12
)
dict entry(
string "timestamp"
variant uint32 504924437
)
dict entry(
string "action-mode"
variant uint32 1
)
dict entry(
string "device-node"
variant string "/dev/input/event7"
)
]
for volume-up. How can I translate this into a dbus-send
message?
I found this question from long-ago, but it appears to be obsolete. At least, it does not work on my system (Ubuntu 20.04): https://stackoverflow.com/questions/2830858/controlling-gnome-volume-using-dbus