[Input] Update state through HandleKey* events

This commit is contained in:
thefiddler 2014-05-04 17:02:00 +02:00
parent 268e8fccde
commit 2d5afcf0e8

View file

@ -67,15 +67,8 @@ namespace OpenTK.Platform
window.MouseWheel += mouse.HandleMouseWheel;
// Hook keyboard events
window.KeyDown += (sender, e) =>
{
keyboard.SetKey(e.Key, e.ScanCode, e.Modifiers, true);
};
window.KeyUp += (sender, e) =>
{
keyboard.SetKey(e.Key, e.ScanCode, e.Modifiers, false);
};
window.KeyDown += keyboard.HandleKeyDown;
window.KeyUp += keyboard.HandleKeyUp;
window.FocusedChanged += (sender, e) =>
{