I think I have seen this issue discussed before, and the conclusion was that the switch isn't being held closed for a long enough period of time. One of the suggestions was to carefully bend the trip wire so the coin would hit it sooner, but I don't know it that was successful or not.
You might be able to tell if this is the issue by using your finger to hold down the tripwire. If it works then, then that is probably the problem.
I think someone else had a similar problem, and found that they had accidentally wired up the normally closed contacts,
so that the switch was always pressed except when the coin hit the switch. I think this looked fine in notepad, because it would see a key release event when the coin hit, and then a key pressed event after the coin passed, so, as long as key repeat isn't turned on, you see only one press but it is very long.
I haven't put my coin door on my machine yet, but I would be interested to find out what you do to fix your problem.