I was having the same problem and found a solution. Use 1 additional program called "VJoy". It's a free tray app that emulates joystick functions using keyboard keys for inputs. Works with MameUI+MameXT32 v.137. Should work for any other version as you now have a joystick for input.
Here's my...