This is a simple way to get media keys on the Max Keyboard Nighthawk X9 and similar USB keyboards working on FreeBSD. This keyboard reports its media keys as USB consumer control events. In FreeBSD they are available for applications to read on a uhid* device, but not handled by default.
The uhidvkbdd daemon reads them and translates them into conventional media keyboard scancodes, which it feeds back to the kernel via the virtual AT keyboard interface. This makes them work in X11 with little or no additional configuration.
To install, run
make make install
Or use the port.
See the man page for further instructions.