[Input] Update state through HandleKey* events
This commit is contained in:
parent
268e8fccde
commit
2d5afcf0e8
1 changed files with 2 additions and 9 deletions
|
@ -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) =>
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue