From 537a2f7b89abd7b50732d1319c8f3a2e98b85f73 Mon Sep 17 00:00:00 2001 From: Stefanos A Date: Mon, 9 Dec 2013 23:43:36 +0100 Subject: [PATCH] Do not generate KeyPress events for non-printable characters --- Source/OpenTK/Platform/MacOS/CarbonGLNative.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/OpenTK/Platform/MacOS/CarbonGLNative.cs b/Source/OpenTK/Platform/MacOS/CarbonGLNative.cs index ea848c9a..b285473b 100644 --- a/Source/OpenTK/Platform/MacOS/CarbonGLNative.cs +++ b/Source/OpenTK/Platform/MacOS/CarbonGLNative.cs @@ -383,7 +383,10 @@ namespace OpenTK.Platform.MacOS case KeyboardEventKind.RawKeyDown: Keymap.TryGetValue(code, out key); InputDriver.Keyboard[0].SetKey(key, (uint)code, true); - OnKeyPress(mKeyPressArgs); + if (!Char.IsControl(mKeyPressArgs.KeyChar)) + { + OnKeyPress(mKeyPressArgs); + } return OSStatus.NoError; case KeyboardEventKind.RawKeyUp: