From 2d5afcf0e85447a4cf68102cef603e8174f7b1cd Mon Sep 17 00:00:00 2001 From: thefiddler Date: Sun, 4 May 2014 17:02:00 +0200 Subject: [PATCH] [Input] Update state through HandleKey* events --- Source/OpenTK/Platform/LegacyInputDriver.cs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/Source/OpenTK/Platform/LegacyInputDriver.cs b/Source/OpenTK/Platform/LegacyInputDriver.cs index 50d00deb..2378b91b 100644 --- a/Source/OpenTK/Platform/LegacyInputDriver.cs +++ b/Source/OpenTK/Platform/LegacyInputDriver.cs @@ -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) => {