Added one default keyboard to X11Keyboard keyboard list.

This commit is contained in:
the_fiddler 2007-08-05 16:36:33 +00:00
parent 2836dab743
commit 781d2447c3
2 changed files with 5 additions and 16 deletions

View file

@ -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

View file

@ -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)