I just ran a quick test in my app and it appears that because mame's dos window now has focus, the application does not capture the keypress (ie credit button). The only thing I could think of would be an app running as a service that is listening for certain keystrokes and play a sound based on this. From what I've seen most games do this in Mame already when the coinup is pressed.