Avoiding loops in win32 plugin key handling