I read that global hotkey is not possible in Wayland. Or, at least, not as easily as with XOrg. Did you achived it ? Can you link to where you are doing it in your code please ? I'm curious, especially since its the first time I heard global hotkeys from a terminal program.
I try not to use global hotkeys myself. Do you have another way of controlling the soundboard ? Either from websocket, DBus, launching a command, ... I like to use streampi^1^ (open source streamdeck clone) for streaming and it may use any of this interraction methods. (Websocket may require to write a plugin for yëur program.)
^1^ Streampi as stopped developpment for now in its v2 snapshots. Still usable. But the dev want to rewrite in C++/Qt for a v3.
Yeah, I'd rather register
cls play <id, name or path>
in streampi or other macro box. Especially if cls let me add new sounds and configure things easily. Like I see having multiples "public laughing", so when starting the sound any can be played. Which provide a bit of variety in the stream. And allow to repeat the sound for a longer effect on the fly without being too repetitive.