This post is related to http://www.raspberrypi.org/forums/viewt ... &start=125. As that thread has gotten very long 120+ replies, I want to followup on the original post. User mmoller2k created pikeyd (https://github.com/mmoller2k/pikeyd) which maps GPIO pins to key presses. My self and some others in the thread had issues with advmame not liking a keyboard connected while pikeyd was running. At the time, the work-a-round was to simply unplug the keyboard and advmame would work with pikeyed. After a lot of trial and error, while writing a detailed tutorial on building a Raspberry Pi Arcade, I found that setting the 'device_keyboard raw' in advmame.rc fixed the issue. As this may be trivial to many, it haunted me for months. I hope this helps someone.
Note the advmame creates two .rc files
the former is used when running as user Pi and the later when running as root (sudo)