mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-07-03 10:58:19 +00:00
[Win] Do not raise KeyPress for control chars
This matches the documented behavior of the GameWindow.KeyPress event.
This commit is contained in:
parent
1c1607da56
commit
0052ff435e
|
@ -389,13 +389,18 @@ namespace OpenTK.Platform.Windows
|
||||||
|
|
||||||
void HandleChar(IntPtr handle, WindowMessage message, IntPtr wParam, IntPtr lParam)
|
void HandleChar(IntPtr handle, WindowMessage message, IntPtr wParam, IntPtr lParam)
|
||||||
{
|
{
|
||||||
|
char c;
|
||||||
if (IntPtr.Size == 4)
|
if (IntPtr.Size == 4)
|
||||||
key_press.KeyChar = (char)wParam.ToInt32();
|
c = (char)wParam.ToInt32();
|
||||||
else
|
else
|
||||||
key_press.KeyChar = (char)wParam.ToInt64();
|
c = (char)wParam.ToInt64();
|
||||||
|
|
||||||
|
if (!Char.IsControl(c))
|
||||||
|
{
|
||||||
|
key_press.KeyChar = c;
|
||||||
KeyPress(this, key_press);
|
KeyPress(this, key_press);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void HandleMouseMove(IntPtr handle, WindowMessage message, IntPtr wParam, IntPtr lParam)
|
void HandleMouseMove(IntPtr handle, WindowMessage message, IntPtr wParam, IntPtr lParam)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue