Well it seems the problem is not with keybd_event at all, but rather with the GetKeyboardState call that is before it. It's not returning the correct state after the previous keybd_event calls toggles the leds -- it's always 0. The net result is that the blinking is twice as slow. Adding these lines after the keybd_event 'for' loop to manually SetKeyboardState saves it correctly for next time:
keyState[VK_NUMLOCK] = (keyState[VK_NUMLOCK] & ~1) | ((state >> 0) & 1);
keyState[VK_CAPITAL] = (keyState[VK_CAPITAL] & ~1) | ((state >> 1) & 1);
keyState[VK_SCROLL] = (keyState[VK_SCROLL] & ~1) | ((state >> 2) & 1);
SetKeyboardState(&keyState[0]);
The blinking works correctly with this change. I'm still having issues with it picking up the correct initial state when MAME starts however, but at least progress has been made. EDIT: Nevermind, the initial state seems to be working too. So it appears those 4 lines fix all the issues. I'll post on mametesters forums.