How to make spacebar = play/pause in Sonos for Mac

Add the following to Karabiner’s private.xml. Since Karabiner can only refer to the hardware key-code, I don’t know how to make this keyboard shortcut work in both qwerty and dvorak without mapping it twice.

This message group post implies that there’s no way to do this in a way that doesn’t depend on the keyboard layout.

Turns out this is a bad idea though, since if you try to search for something with a space in it, you’ll wind up pause/playing your music. Oops.