Do not raise KeyPress for control characters

This commit is contained in:
thefiddler 2013-12-25 11:14:30 +01:00
parent 83039f8740
commit ffdf881cea

View file

@ -804,11 +804,14 @@ namespace OpenTK.Platform.X11
if (key_press != null) if (key_press != null)
{ {
for (int i = 0; i < status; i++) for (int i = 0; i < status; i++)
{
if (!Char.IsControl(chars[i]))
{ {
KPEventArgs.KeyChar = chars[i]; KPEventArgs.KeyChar = chars[i];
key_press(this, KPEventArgs); key_press(this, KPEventArgs);
} }
} }
}
break; break;
case XEventName.KeyRelease: case XEventName.KeyRelease: