Are you sure your 'd' key is working ?
All the other times I hit the 'd' key, I get 'd'. It's only in MAME running on my MAC that there's issues.... My Mac has a US qwerty keyboard, but the caps-lock is mapped to control. Maybe it's Karabiner, I'll check that out next... (exiting Karabiner fixes the problem)