Probably aren't given values in the mapping file. I plan on adding the same hack to sdlmame that i did to PrBoom and UQM. It switches everybody to Qwerty while in the program so we can all have the same keyboard layout. The only downside i see to doing it with mame is that there is a bit of typing for the ROM loader UI, but there are plenty of ways to work around it.