From e5b5af7b11ac52dcd1dfd5aca5887e2748461697 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Fri, 1 Feb 2008 23:13:50 +0000 Subject: [PATCH] Renamed KeyMap to WinKeyMap. --- Source/OpenTK/Platform/Windows/WMInput.cs | 7 ++++++- Source/OpenTK/Platform/Windows/{KeyMap.cs => WinKeyMap.cs} | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) rename Source/OpenTK/Platform/Windows/{KeyMap.cs => WinKeyMap.cs} (95%) diff --git a/Source/OpenTK/Platform/Windows/WMInput.cs b/Source/OpenTK/Platform/Windows/WMInput.cs index 25b02c26..3695b50a 100644 --- a/Source/OpenTK/Platform/Windows/WMInput.cs +++ b/Source/OpenTK/Platform/Windows/WMInput.cs @@ -24,7 +24,7 @@ namespace OpenTK.Platform.Windows MouseDevice mouse = new MouseDevice(); IList keyboards = new List(1); IList mice = new List(1); - internal static readonly KeyMap KeyMap = new KeyMap(); + internal static readonly WinKeyMap KeyMap = new WinKeyMap(); #region --- Constructor --- @@ -53,6 +53,8 @@ namespace OpenTK.Platform.Windows #endregion + #region protected override void WndProc(ref Message msg) + protected override void WndProc(ref Message msg) { switch ((WindowMessage)msg.Msg) @@ -97,6 +99,7 @@ namespace OpenTK.Platform.Windows return; case WindowMessage.XBUTTONUP: + // TODO: Is this correct? mouse[((msg.WParam.ToInt32() & 0xFFFF0000) >> 16) != (int)MouseKeys.XButton1 ? MouseButton.Button1 : MouseButton.Button2] = false; return; @@ -149,6 +152,8 @@ namespace OpenTK.Platform.Windows base.WndProc(ref msg); } + #endregion + #region IInputDriver Members public void Poll() diff --git a/Source/OpenTK/Platform/Windows/KeyMap.cs b/Source/OpenTK/Platform/Windows/WinKeyMap.cs similarity index 95% rename from Source/OpenTK/Platform/Windows/KeyMap.cs rename to Source/OpenTK/Platform/Windows/WinKeyMap.cs index 1fab4464..1ec230ba 100644 --- a/Source/OpenTK/Platform/Windows/KeyMap.cs +++ b/Source/OpenTK/Platform/Windows/WinKeyMap.cs @@ -13,12 +13,12 @@ using System.Diagnostics; namespace OpenTK.Platform.Windows { - internal class KeyMap : Dictionary + internal class WinKeyMap : Dictionary { /// /// Initializes the map between VirtualKeys and OpenTK.Key /// - internal KeyMap() + internal WinKeyMap() { try {