> Use Scroll Lock to switch between the mame UI keyboard and the full emulation.
but note that keys will fall through to the emulation as well, so sometimes mapping the ui control stuff to a gamepad that isn't otherwise being used can be a good idea.
personally I think MAME should have some kind of dedicated "2nd Keyboard" mode for this kind of case, where one KB is internal MAME stuff and the other is the emulated system.