[OpenTK] Rebased on develop

This commit is contained in:
thefiddler 2014-04-25 13:38:53 +02:00
parent 774ebd1df7
commit e36a0d0fbc
2 changed files with 2 additions and 9 deletions

View file

@ -135,7 +135,6 @@ namespace OpenTK.Platform.MacOS
private Nullable<WindowBorder> deferredWindowBorder;
private Nullable<WindowBorder> previousWindowBorder;
private WindowState windowState = WindowState.Normal;
private MacOSKeyMap keyMap = new MacOSKeyMap();
private OpenTK.Input.KeyboardKeyEventArgs keyArgs = new OpenTK.Input.KeyboardKeyEventArgs();
private KeyPressEventArgs keyPressArgs = new KeyPressEventArgs((char)0);
private string title;
@ -337,13 +336,7 @@ namespace OpenTK.Platform.MacOS
private void GetKey(ushort keyCode, NSEventModifierMask modifierFlags, OpenTK.Input.KeyboardKeyEventArgs args)
{
OpenTK.Input.Key key;
if (!keyMap.TryGetValue((OpenTK.Platform.MacOS.Carbon.MacOSKeyCode)keyCode, out key))
{
key = OpenTK.Input.Key.Unknown;
}
args.Key = key;
args.Key = MacOSKeyMap.GetKey((Carbon.MacOSKeyCode)keyCode);
args.Modifiers = GetModifiers(modifierFlags);
args.ScanCode = (uint)keyCode;
}

View file

@ -36,7 +36,7 @@ namespace OpenTK.Platform.MacOS
using Carbon;
using Input;
class MacOSKeyMap
static class MacOSKeyMap
{
public static Key GetKey(MacOSKeyCode code)
{