The Open Toolkit library  1.1
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
Classes | Enumerations
Package OpenTK.Input

Classes

class  GamePad
 Provides access to GamePad devices. A GamePad device offers a well-defined layout with one direction-pad, two thumbsticks, two triggers, four main buttons (A, B, X, Y) and up to seven auxilliary buttons. Use GetCapabilities to retrieve the exact capabilities of a given device. Use GetState to retrieve the current state of a given device. More...
 
struct  GamePadButtons
 Describes the ButtonState of GamePad Buttons. More...
 
struct  GamePadCapabilities
 Describes the capabilities of a GamePad input device. More...
 
struct  GamePadDPad
 Describes the state of a GamePad directional pad. More...
 
struct  GamePadState
 Describes the current state of a GamePad device. More...
 
struct  GamePadThumbSticks
 Describes the current thumb stick state of a GamePad device More...
 
struct  GamePadTriggers
 Describes the state of a GamePad trigger buttons. More...
 
interface  IInputDevice
 Defines a common interface for all input devices. More...
 
interface  IInputDriver
 Defines the interface for an input driver. More...
 
interface  IJoystickDriver
 Defines the interface for JoystickDevice drivers. More...
 
interface  IKeyboardDriver
 Defines the interface for KeyboardDevice drivers. More...
 
interface  IMouseDriver
 Defines the interface for MouseDevice drivers. More...
 
class  Joystick
 Provides access to Joystick devices. Joystick devices provide a varying number of axes and buttons. Use GetCapabilities to retrieve the number of supported axes and buttons on a given device. Use GetState to retrieve the current state of a given device. More...
 
struct  JoystickCapabilities
 Describes the JoystickCapabilities of a JoystickDevice. More...
 
class  JoystickDevice
 Represents a joystick device and provides methods to query its status. More...
 
class  JoystickEventArgs
 The base class for JoystickDevice event arguments. More...
 
class  JoystickButtonEventArgs
 Provides data for the JoystickDevice.ButtonDown and JoystickDevice.ButtonUp events. This class is cached for performance reasons - avoid storing references outside the scope of the event. More...
 
class  JoystickMoveEventArgs
 Provides data for the JoystickDevice.Move event. This class is cached for performance reasons - avoid storing references outside the scope of the event. More...
 
class  JoystickButtonCollection
 Defines a collection of JoystickButtons. More...
 
class  JoystickAxisCollection
 Defines a collection of JoystickAxes. More...
 
struct  JoystickHatState
 Describes the state of a joystick hat. More...
 
struct  JoystickState
 Describes the current state of a JoystickDevice. More...
 
class  KeyboardDevice
 Represents a keyboard device and provides methods to query its status. More...
 
class  KeyboardKeyEventArgs
 Defines the event data for KeyboardDevice events. More...
 
struct  KeyboardState
 Encapsulates the state of a Keyboard device. More...
 
class  MouseDevice
 Represents a mouse device and provides methods to query its status. More...
 
class  MouseEventArgs
 Defines the event data for MouseDevice events. More...
 
class  MouseMoveEventArgs
 Defines the event data for MouseDevice.Move events. More...
 
class  MouseButtonEventArgs
 Defines the event data for MouseDevice.ButtonDown and MouseDevice.ButtonUp events. More...
 
class  MouseWheelEventArgs
 Defines the event data for MouseDevice.WheelChanged events. More...
 
struct  MouseState
 Encapsulates the state of a mouse device. More...
 

Enumerations

enum  Buttons {
  Buttons.DPadUp = 1 << 0, Buttons.DPadDown = 1 << 1, Buttons.DPadLeft = 1 << 2, Buttons.DPadRight = 1 << 3,
  Buttons.Start = 1 << 4, Buttons.Back = 1 << 5, Buttons.LeftStick = 1 << 6, Buttons.RightStick = 1 << 7,
  Buttons.LeftShoulder = 1 << 8, Buttons.RightShoulder = 1 << 9, Buttons.Home = 1 << 11, Buttons.BigButton = Home,
  Buttons.A = 1 << 12, Buttons.B = 1 << 13, Buttons.X = 1 << 14, Buttons.Y = 1 << 15,
  Buttons.LeftThumbstickLeft = 1 << 21, Buttons.RightTrigger = 1 << 22, Buttons.LeftTrigger = 1 << 23, Buttons.RightThumbstickUp = 1 << 24,
  Buttons.RightThumbstickDown = 1 << 25, Buttons.RightThumbstickRight = 1 << 26, Buttons.RightThumbstickLeft = 1 << 27, Buttons.LeftThumbstickUp = 1 << 28,
  Buttons.LeftThumbstickDown = 1 << 29, Buttons.LeftThumbstickRight = 1 << 30
}
 Enumerates available buttons for a GamePad device. More...
 
enum  ButtonState { ButtonState.Released = 0, ButtonState.Pressed = 1 }
 Enumerates possible mouse button states. More...
 
enum  ConfigurationType { Unmapped = 0, Axis, Button }
 
enum  GamePadType {
  GamePadType.Unknown = 0, GamePadType.ArcadeStick, GamePadType.DancePad, GamePadType.FlightStick,
  GamePadType.Guitar, GamePadType.Wheel, GamePadType.AlternateGuitar, GamePadType.BigButtonPad,
  GamePadType.DrumKit, GamePadType.GamePad, GamePadType.ArcadePad, GamePadType.BassGuitar
}
 Enumerates available GamePad types. More...
 
enum  HatPosition : byte {
  HatPosition.Centered = 0, HatPosition.Up, HatPosition.UpRight, HatPosition.Right,
  HatPosition.DownRight, HatPosition.Down, HatPosition.DownLeft, HatPosition.Left,
  HatPosition.UpLeft
}
 Enumerates discrete positions for a joystick hat. More...
 
enum  InputDeviceType { InputDeviceType.Keyboard, InputDeviceType.Mouse, InputDeviceType.Hid }
 The type of the input device. More...
 
enum  JoystickAxis {
  JoystickAxis.Axis0 = 0, JoystickAxis.Axis1, JoystickAxis.Axis2, JoystickAxis.Axis3,
  JoystickAxis.Axis4, JoystickAxis.Axis5, JoystickAxis.Axis6, JoystickAxis.Axis7,
  JoystickAxis.Axis8, JoystickAxis.Axis9, JoystickAxis.Axis10, JoystickAxis.Last = Axis10
}
 Defines available JoystickDevice axes. More...
 
enum  JoystickButton {
  JoystickButton.Button0 = 0, JoystickButton.Button1, JoystickButton.Button2, JoystickButton.Button3,
  JoystickButton.Button4, JoystickButton.Button5, JoystickButton.Button6, JoystickButton.Button7,
  JoystickButton.Button8, JoystickButton.Button9, JoystickButton.Button10, JoystickButton.Button11,
  JoystickButton.Button12, JoystickButton.Button13, JoystickButton.Button14, JoystickButton.Button15,
  JoystickButton.Button16, JoystickButton.Button17, JoystickButton.Button18, JoystickButton.Button19,
  JoystickButton.Button20, JoystickButton.Button21, JoystickButton.Button22, JoystickButton.Button23,
  JoystickButton.Button24, JoystickButton.Button25, JoystickButton.Button26, JoystickButton.Button27,
  JoystickButton.Button28, JoystickButton.Button29, JoystickButton.Button30, JoystickButton.Button31,
  JoystickButton.Last = Button31
}
 Defines available JoystickDevice buttons. More...
 
enum  JoystickHat {
  JoystickHat.Hat0, JoystickHat.Hat1, JoystickHat.Hat2, JoystickHat.Hat3,
  JoystickHat.Last = Hat3
}
 Defines available Joystick hats. More...
 
enum  Key : int {
  Key.Unknown = 0, Key.ShiftLeft, Key.LShift = ShiftLeft, Key.ShiftRight,
  Key.RShift = ShiftRight, Key.ControlLeft, Key.LControl = ControlLeft, Key.ControlRight,
  Key.RControl = ControlRight, Key.AltLeft, Key.LAlt = AltLeft, Key.AltRight,
  Key.RAlt = AltRight, Key.WinLeft, Key.LWin = WinLeft, Key.WinRight,
  Key.RWin = WinRight, Key.Menu, Key.F1, Key.F2,
  Key.F3, Key.F4, Key.F5, Key.F6,
  Key.F7, Key.F8, Key.F9, Key.F10,
  Key.F11, Key.F12, Key.F13, Key.F14,
  Key.F15, Key.F16, Key.F17, Key.F18,
  Key.F19, Key.F20, Key.F21, Key.F22,
  Key.F23, Key.F24, Key.F25, Key.F26,
  Key.F27, Key.F28, Key.F29, Key.F30,
  Key.F31, Key.F32, Key.F33, Key.F34,
  Key.F35, Key.Up, Key.Down, Key.Left,
  Key.Right, Key.Enter, Key.Escape, Key.Space,
  Key.Tab, Key.BackSpace, Key.Back = BackSpace, Key.Insert,
  Key.Delete, Key.PageUp, Key.PageDown, Key.Home,
  Key.End, Key.CapsLock, Key.ScrollLock, Key.PrintScreen,
  Key.Pause, Key.NumLock, Key.Clear, Key.Sleep,
  Key.Keypad0, Key.Keypad1, Key.Keypad2, Key.Keypad3,
  Key.Keypad4, Key.Keypad5, Key.Keypad6, Key.Keypad7,
  Key.Keypad8, Key.Keypad9, Key.KeypadDivide, Key.KeypadMultiply,
  Key.KeypadSubtract, Key.KeypadMinus = KeypadSubtract, Key.KeypadAdd, Key.KeypadPlus = KeypadAdd,
  Key.KeypadDecimal, Key.KeypadPeriod = KeypadDecimal, Key.KeypadEnter, Key.A,
  Key.B, Key.C, Key.D, Key.E,
  Key.F, Key.G, Key.H, Key.I,
  Key.J, Key.K, Key.L, Key.M,
  Key.N, Key.O, Key.P, Key.Q,
  Key.R, Key.S, Key.T, Key.U,
  Key.V, Key.W, Key.X, Key.Y,
  Key.Z, Key.Number0, Key.Number1, Key.Number2,
  Key.Number3, Key.Number4, Key.Number5, Key.Number6,
  Key.Number7, Key.Number8, Key.Number9, Key.Tilde,
  Key.Grave = Tilde, Key.Minus, Key.Plus, Key.BracketLeft,
  Key.LBracket = BracketLeft, Key.BracketRight, Key.RBracket = BracketRight, Key.Semicolon,
  Key.Quote, Key.Comma, Key.Period, Key.Slash,
  Key.BackSlash, Key.NonUSBackSlash, Key.LastKey
}
 The available keyboard keys. More...
 
enum  MouseButton {
  MouseButton.Left = 0, MouseButton.Middle, MouseButton.Right, MouseButton.Button1,
  MouseButton.Button2, MouseButton.Button3, MouseButton.Button4, MouseButton.Button5,
  MouseButton.Button6, MouseButton.Button7, MouseButton.Button8, MouseButton.Button9,
  MouseButton.LastButton
}
 Enumerates all possible mouse buttons. More...
 

Enumeration Type Documentation

Enumerates available buttons for a GamePad device.

Enumerator
DPadUp 

DPad up direction button

DPadDown 

DPad down direction button

DPadLeft 

DPad left direction button

DPadRight 

DPad right direction button

Start 

Start button

Back 

Back button

LeftStick 

Left stick button

RightStick 

Right stick button

LeftShoulder 

Left shoulder button

RightShoulder 

Right shoulder button

Home 

Home button

BigButton 

Home button

A 

A button

B 

B button

X 

X button

Y 

Y button

LeftThumbstickLeft 

Left thumbstick left direction button

RightTrigger 

Right trigger button

LeftTrigger 

Left trigger button

RightThumbstickUp 

Right thumbstick up direction button

RightThumbstickDown 

Right thumbstick down direction button

RightThumbstickRight 

Right stick right direction button

RightThumbstickLeft 

Right stick left direction button

LeftThumbstickUp 

Left stick up direction button

LeftThumbstickDown 

Left stick down direction button

LeftThumbstickRight 

Left stick right direction button

Enumerates possible mouse button states.

Enumerator
Released 

Indicates that a mouse button is released.

Pressed 

Indicates that a mouse button is pressed.

Enumerates available GamePad types.

Enumerator
Unknown 

The GamePad is of an unknown type.

ArcadeStick 

The GamePad is an arcade stick.

DancePad 

The GamePad is a dance pad.

FlightStick 

The GamePad is a flight stick.

Guitar 

The GamePad is a guitar.

Wheel 

The GamePad is a driving wheel.

AlternateGuitar 

The GamePad is an alternate guitar.

BigButtonPad 

The GamePad is a big button pad.

DrumKit 

The GamePad is a drum kit.

GamePad 

The GamePad is a game pad.

ArcadePad 

The GamePad is an arcade pad.

BassGuitar 

The GamePad is a bass guitar.

Enumerates discrete positions for a joystick hat.

Enumerator
Centered 

The hat is in its centered (neutral) position

Up 

The hat is in its top position.

UpRight 

The hat is in its top-right position.

Right 

The hat is in its right position.

DownRight 

The hat is in its bottom-right position.

Down 

The hat is in its bottom position.

DownLeft 

The hat is in its bottom-left position.

Left 

The hat is in its left position.

UpLeft 

The hat is in its top-left position.

The type of the input device.

Enumerator
Keyboard 

Device is a keyboard.

Mouse 

Device is a mouse.

Hid 

Device is a Human Interface Device. Joysticks, joypads, pens and some specific usb keyboards/mice fall into this category.

Defines available JoystickDevice axes.

Enumerator
Axis0 

The first axis of the JoystickDevice.

Axis1 

The second axis of the JoystickDevice.

Axis2 

The third axis of the JoystickDevice.

Axis3 

The fourth axis of the JoystickDevice.

Axis4 

The fifth axis of the JoystickDevice.

Axis5 

The sixth axis of the JoystickDevice.

Axis6 

The seventh axis of the JoystickDevice.

Axis7 

The eighth axis of the JoystickDevice.

Axis8 

The ninth axis of the JoystickDevice.

Axis9 

The tenth axis of the JoystickDevice.

Axis10 

The eleventh axis of the JoystickDevice.

Last 

The highest supported axis of the JoystickDevice.

Defines available JoystickDevice buttons.

Enumerator
Button0 

The first button of the JoystickDevice.

Button1 

The second button of the JoystickDevice.

Button2 

The third button of the JoystickDevice.

Button3 

The fourth button of the JoystickDevice.

Button4 

The fifth button of the JoystickDevice.

Button5 

The sixth button of the JoystickDevice.

Button6 

The seventh button of the JoystickDevice.

Button7 

The eighth button of the JoystickDevice.

Button8 

The ninth button of the JoystickDevice.

Button9 

The tenth button of the JoystickDevice.

Button10 

The eleventh button of the JoystickDevice.

Button11 

The twelfth button of the JoystickDevice.

Button12 

The thirteenth button of the JoystickDevice.

Button13 

The fourteenth button of the JoystickDevice.

Button14 

The fifteenth button of the JoystickDevice.

Button15 

The sixteenth button of the JoystickDevice.

Button16 

The seventeenth button of the JoystickDevice.

Button17 

The eighteenth button of the JoystickDevice.

Button18 

The nineteenth button of the JoystickDevice.

Button19 

The twentieth button of the JoystickDevice.

Button20 

The twentyfirst button of the JoystickDevice.

Button21 

The twentysecond button of the JoystickDevice.

Button22 

The twentythird button of the JoystickDevice.

Button23 

The twentyfourth button of the JoystickDevice.

Button24 

The twentyfifth button of the JoystickDevice.

Button25 

The twentysixth button of the JoystickDevice.

Button26 

The twentyseventh button of the JoystickDevice.

Button27 

The twentyeighth button of the JoystickDevice.

Button28 

The twentynineth button of the JoystickDevice.

Button29 

The thirtieth button of the JoystickDevice.

Button30 

The thirtyfirst button of the JoystickDevice.

Button31 

The thirtysecond button of the JoystickDevice.

Last 

The last supported button of the JoystickDevice.

Defines available Joystick hats.

Enumerator
Hat0 

The first hat of the Joystick device.

Hat1 

The second hat of the Joystick device.

Hat2 

The third hat of the Joystick device.

Hat3 

The fourth hat of the Joystick device.

Last 

The last hat of the Joystick device.

enum OpenTK.Input.Key : int

The available keyboard keys.

Enumerator
Unknown 

A key outside the known keys.

ShiftLeft 

The left shift key.

LShift 

The left shift key (equivalent to ShiftLeft).

ShiftRight 

The right shift key.

RShift 

The right shift key (equivalent to ShiftRight).

ControlLeft 

The left control key.

LControl 

The left control key (equivalent to ControlLeft).

ControlRight 

The right control key.

RControl 

The right control key (equivalent to ControlRight).

AltLeft 

The left alt key.

LAlt 

The left alt key (equivalent to AltLeft.

AltRight 

The right alt key.

RAlt 

The right alt key (equivalent to AltRight).

WinLeft 

The left win key.

LWin 

The left win key (equivalent to WinLeft).

WinRight 

The right win key.

RWin 

The right win key (equivalent to WinRight).

Menu 

The menu key.

F1 

The F1 key.

F2 

The F2 key.

F3 

The F3 key.

F4 

The F4 key.

F5 

The F5 key.

F6 

The F6 key.

F7 

The F7 key.

F8 

The F8 key.

F9 

The F9 key.

F10 

The F10 key.

F11 

The F11 key.

F12 

The F12 key.

F13 

The F13 key.

F14 

The F14 key.

F15 

The F15 key.

F16 

The F16 key.

F17 

The F17 key.

F18 

The F18 key.

F19 

The F19 key.

F20 

The F20 key.

F21 

The F21 key.

F22 

The F22 key.

F23 

The F23 key.

F24 

The F24 key.

F25 

The F25 key.

F26 

The F26 key.

F27 

The F27 key.

F28 

The F28 key.

F29 

The F29 key.

F30 

The F30 key.

F31 

The F31 key.

F32 

The F32 key.

F33 

The F33 key.

F34 

The F34 key.

F35 

The F35 key.

Up 

The up arrow key.

Down 

The down arrow key.

Left 

The left arrow key.

Right 

The right arrow key.

Enter 

The enter key.

Escape 

The escape key.

Space 

The space key.

Tab 

The tab key.

BackSpace 

The backspace key.

Back 

The backspace key (equivalent to BackSpace).

Insert 

The insert key.

Delete 

The delete key.

PageUp 

The page up key.

PageDown 

The page down key.

Home 

The home key.

End 

The end key.

CapsLock 

The caps lock key.

ScrollLock 

The scroll lock key.

PrintScreen 

The print screen key.

Pause 

The pause key.

NumLock 

The num lock key.

Clear 

The clear key (Keypad5 with NumLock disabled, on typical keyboards).

Sleep 

The sleep key.

Keypad0 

The keypad 0 key.

Keypad1 

The keypad 1 key.

Keypad2 

The keypad 2 key.

Keypad3 

The keypad 3 key.

Keypad4 

The keypad 4 key.

Keypad5 

The keypad 5 key.

Keypad6 

The keypad 6 key.

Keypad7 

The keypad 7 key.

Keypad8 

The keypad 8 key.

Keypad9 

The keypad 9 key.

KeypadDivide 

The keypad divide key.

KeypadMultiply 

The keypad multiply key.

KeypadSubtract 

The keypad subtract key.

KeypadMinus 

The keypad minus key (equivalent to KeypadSubtract).

KeypadAdd 

The keypad add key.

KeypadPlus 

The keypad plus key (equivalent to KeypadAdd).

KeypadDecimal 

The keypad decimal key.

KeypadPeriod 

The keypad period key (equivalent to KeypadDecimal).

KeypadEnter 

The keypad enter key.

A 

The A key.

B 

The B key.

C 

The C key.

D 

The D key.

E 

The E key.

F 

The F key.

G 

The G key.

H 

The H key.

I 

The I key.

J 

The J key.

K 

The K key.

L 

The L key.

M 

The M key.

N 

The N key.

O 

The O key.

P 

The P key.

Q 

The Q key.

R 

The R key.

S 

The S key.

T 

The T key.

U 

The U key.

V 

The V key.

W 

The W key.

X 

The X key.

Y 

The Y key.

Z 

The Z key.

Number0 

The number 0 key.

Number1 

The number 1 key.

Number2 

The number 2 key.

Number3 

The number 3 key.

Number4 

The number 4 key.

Number5 

The number 5 key.

Number6 

The number 6 key.

Number7 

The number 7 key.

Number8 

The number 8 key.

Number9 

The number 9 key.

Tilde 

The tilde key.

Grave 

The grave key (equivaent to Tilde).

Minus 

The minus key.

Plus 

The plus key.

BracketLeft 

The left bracket key.

LBracket 

The left bracket key (equivalent to BracketLeft).

BracketRight 

The right bracket key.

RBracket 

The right bracket key (equivalent to BracketRight).

Semicolon 

The semicolon key.

Quote 

The quote key.

Comma 

The comma key.

Period 

The period key.

Slash 

The slash key.

BackSlash 

The backslash key.

NonUSBackSlash 

The secondary backslash key.

LastKey 

Indicates the last available keyboard key.

Enumerates all possible mouse buttons.

Enumerator
Left 

The left mouse button.

Middle 

The middle mouse button.

Right 

The right mouse button.

Button1 

The first extra mouse button.

Button2 

The second extra mouse button.

Button3 

The third extra mouse button.

Button4 

The fourth extra mouse button.

Button5 

The fifth extra mouse button.

Button6 

The sixth extra mouse button.

Button7 

The seventh extra mouse button.

Button8 

The eigth extra mouse button.

Button9 

The ninth extra mouse button.

LastButton 

Indicates the last available mouse button.