I wanted to capture whether a modifier key was being pressed during application startup (to determine fullscreen or windowed).
In the main window constructor I tried che
Great summary... the second link has great code to show it in the process... Just add Josh G's code (from the answer in this question to the project in the second link) :
In the Window constructor after InitializeComponent():
this.Loaded += new RoutedEventHandler(Window_Loaded);
And:
void Window_Loaded(object sender, RoutedEventArgs e)
{
// Examine Keyboard.Modifiers and set fullscreen/windowed
if ((Keyboard.Modifiers & ModifierKeys.Shift) > 0)
{
MessageBox.Show("The Window is Shifty...");
}
}