Without a keyboard connected, MAME does not start all the games

use retroarch in my two bartop. Everything works perfectly except if I remove the keyboard by disconnecting it from the USB port (a wireless keyboard). If I also remove the USB connector of the keyboard, many MAME games do not start (I use the last core of MAME 0.198, but the same problem was also present with previous versions), Is there a setting to eliminate this problem? To make it work properly I’m forced to leave the USB jack of the keyboard inserted, even if the keyboard is turned off.