You need to go into the ctrlr directory in mame folder. There is a file called std.ini. Underneath the chat the first line should be
UI_CONFIGURE "KEYCODE_TAB"
For your case it probably is something different. This happened to me before but only for a single game and not all. If it happens to all games then you need to make sure that line is in the file. If it's only for one game then go into the cfg folder and delete the config file for that game - this resets back to standard inputs.
Hope this works for you
-cdbrown