mono/mono — pull request #595 by UCIS (2013-03-06 16:43:00+00:00)
Title: Fixed handling of modifier keys in KeyEventArgs constructor (bug #6707)

Bug https://bugzilla.xamarin.com/show_bug.cgi?id=6707
The current state of the modifier keys was used added to the given keyData in the KeyEventArgs constructor. This makes the KeyEventArgs class dependent on availability of XplatUI, causing exceptions when the KeyEventArgs class is used in a non-desktop environment.

The Microsoft documentation for the constructor at http://msdn.microsoft.com/en-us/library/system.windows.forms.keyeventargs.keyeventargs.aspx also implies this behaviour is wrong: A Keys representing the key that was pressed, combined with any modifier flags that indicate which CTRL, SHIFT, and ALT keys were pressed at the same time."

The patch moves the code that retrieves the state of the modifier keys from the constructor to the call sites.