From b526c077d580ad72aaf8280a010212496ecd6cf8 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Sun, 5 Aug 2007 16:36:33 +0000 Subject: [PATCH] Added one default keyboard to X11Keyboard keyboard list. --- Source/OpenTK/Input/Keyboard.cs | 16 ---------------- Source/OpenTK/Platform/X11/X11Keyboard.cs | 5 +++++ 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/Source/OpenTK/Input/Keyboard.cs b/Source/OpenTK/Input/Keyboard.cs index e03d8293..8b9c26b2 100644 --- a/Source/OpenTK/Input/Keyboard.cs +++ b/Source/OpenTK/Input/Keyboard.cs @@ -27,22 +27,6 @@ namespace OpenTK.Input public Keyboard() { - if (Environment.OSVersion.Platform == PlatformID.Win32NT || - Environment.OSVersion.Platform == PlatformID.Win32Windows) - { - //keyboard = new OpenTK.Platform.Windows.WinRawKeyboard(); - } - else if (Environment.OSVersion.Platform == PlatformID.Unix || - Environment.OSVersion.Platform == (PlatformID)128) // some older versions of Mono reported 128. - { - throw new NotImplementedException(); - } - else - { - throw new PlatformNotSupportedException( - "Your operating system is not currently supported. We are sorry for the inconvenience." - ); - } } #endregion diff --git a/Source/OpenTK/Platform/X11/X11Keyboard.cs b/Source/OpenTK/Platform/X11/X11Keyboard.cs index 514b98f9..585ffa50 100644 --- a/Source/OpenTK/Platform/X11/X11Keyboard.cs +++ b/Source/OpenTK/Platform/X11/X11Keyboard.cs @@ -112,6 +112,11 @@ namespace OpenTK.Platform.X11 //keysyms = (IntPtr[])Marshal.PtrToStructure(keysym_ptr, typeof(IntPtr[])); API.Free(keysym_ptr); + + Keyboard kb = new Keyboard(); + kb.Description = "Default X11 keyboard"; + kb.NumberOfKeys = lastKeyCode - firstKeyCode + 1; + keyboards.Add(kb); } #region internal bool ProcessKeyboardEvent(API.RawInput rin)