I bet Keyboard.Modifiers is using GetKeyState under the covers, which probably doesn't work until your message loop has dispatched its first message. GetAsyncKeyState would work for you (via P/Invoke I guess, unless there's a .net way of calling it that I don't know about).