After running mame it list the roms I have installed. However the only keys that seem to work is the down array and ESC. Compiling mame from source (non-debian), it doesn't suffer from this issue.
After recompiling the kernel, which stop creating /dev/input/js0 for a MS keyboard, this error doesn't occur any more. Kernel bug reference. https://bugzilla.kernel.org/show_bug.cgi?id=37982