mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-24 05:01:11 +00:00
[Input] Update state through HandleKey* events
This commit is contained in:
parent
268e8fccde
commit
2d5afcf0e8
|
@ -67,15 +67,8 @@ namespace OpenTK.Platform
|
||||||
window.MouseWheel += mouse.HandleMouseWheel;
|
window.MouseWheel += mouse.HandleMouseWheel;
|
||||||
|
|
||||||
// Hook keyboard events
|
// Hook keyboard events
|
||||||
window.KeyDown += (sender, e) =>
|
window.KeyDown += keyboard.HandleKeyDown;
|
||||||
{
|
window.KeyUp += keyboard.HandleKeyUp;
|
||||||
keyboard.SetKey(e.Key, e.ScanCode, e.Modifiers, true);
|
|
||||||
};
|
|
||||||
|
|
||||||
window.KeyUp += (sender, e) =>
|
|
||||||
{
|
|
||||||
keyboard.SetKey(e.Key, e.ScanCode, e.Modifiers, false);
|
|
||||||
};
|
|
||||||
|
|
||||||
window.FocusedChanged += (sender, e) =>
|
window.FocusedChanged += (sender, e) =>
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue