On Thu, 26 Sep 2024 19:54:39 +0300 Aleksas Tunikas <[email protected]> wrote:
> hi, having a bluetooth media control thing and it picks up everything > (even mpv in non emms env), wonder if I can make my emacs understand it > as well. currently it is just extended commands binded as global > shorctcuts in sway that play/pause it. wonder what i need to redesign in > order to it to understand media controls. thanks for reading. I think these remotes usually get "plugged in" as evdev keyboard devices, and send regular media key presses, so "extended commands binded as global shorctcuts in sway that play/pause it" might work as well. E.g. one BT remote I've seen worked like that, sending X86Audio<something> keys, which you can bind to something like "emacsclient -e '(emms-pause)'" in sway same as any other keyboard shortcuts, just need to run some "print all inputs" tool (evtest might work, but something sway/wayland-specific might be better) and check what these keys are called to configure them, probably. Emacs might also have some hooks for global keybindings, but I've also usually used WM as one place for those. -- Mike Kazantsev // fraggod.net
