Sleeping Wombat GUI  0.100
swGUI
Modules | Classes | Enumerations
Input

Sleeping Wombat input library. More...

Modules

 DirectInput
 
 DebugInput
 Classes created for test purposes. You can use it to load bunch of events from disk, write them from code.
 
 WinAPIInput
 
 WPFInput
 

Classes

class  sw::input::Device
 Interface class for input devices. More...
 
struct  sw::input::InputInitInfo
 Initialization structure for input objects. More...
 
class  sw::input::IInput
 Interface for input classes for capturing user input. More...
 
struct  sw::input::KeyEvent
 Keyboard key change event. More...
 
struct  sw::input::CharacterEvent
 Keyboard event after translation to character. More...
 
struct  sw::input::ButtonEvent
 Mouse button Change event. More...
 
struct  sw::input::AxisEvent
 Mouse or joystick axis value changed event. More...
 
struct  sw::input::CursorEvent
 Cursor position changed event. More...
 
struct  sw::input::DeviceEvent
 KeyStates changed events. More...
 
struct  InputDeviceInfo
 Information about device. For future use. More...
 
class  sw::input::JoystickDevice
 Joystick or other controller state and events. More...
 
class  sw::input::JoystickState
 State of joystick device or other controllers which aren't mouse and keyboard. More...
 
class  sw::input::KeyboardDevice
 Keyboard state and events. More...
 
class  sw::input::KeyboardState
 State of keyboard buttons. More...
 
class  sw::input::KeyState
 Button state structure.. More...
 
class  sw::input::MouseDevice
 Mouse state and events. More...
 
class  sw::input::MouseState
 State of mouse. More...
 

Enumerations

enum  sw::input::Keyboard::PhysicalKeys : uint8 {
  sw::input::Keyboard::KEY_NONE = 0x00, sw::input::Keyboard::KEY_ESCAPE = 0x01, sw::input::Keyboard::KEY_1 = 0x02, sw::input::Keyboard::KEY_2 = 0x03,
  sw::input::Keyboard::KEY_3 = 0x04, sw::input::Keyboard::KEY_4 = 0x05, sw::input::Keyboard::KEY_5 = 0x06, sw::input::Keyboard::KEY_6 = 0x07,
  sw::input::Keyboard::KEY_7 = 0x08, sw::input::Keyboard::KEY_8 = 0x09, sw::input::Keyboard::KEY_9 = 0x0A, sw::input::Keyboard::KEY_0 = 0x0B,
  sw::input::Keyboard::KEY_MINUS = 0x0C, sw::input::Keyboard::KEY_EQUALS = 0x0D, sw::input::Keyboard::KEY_BACK = 0x0E, sw::input::Keyboard::KEY_TAB = 0x0F,
  sw::input::Keyboard::KEY_Q = 0x10, sw::input::Keyboard::KEY_W = 0x11, sw::input::Keyboard::KEY_E = 0x12, sw::input::Keyboard::KEY_R = 0x13,
  sw::input::Keyboard::KEY_T = 0x14, sw::input::Keyboard::KEY_Y = 0x15, sw::input::Keyboard::KEY_U = 0x16, sw::input::Keyboard::KEY_I = 0x17,
  sw::input::Keyboard::KEY_O = 0x18, sw::input::Keyboard::KEY_P = 0x19, sw::input::Keyboard::KEY_LBRACKET = 0x1A, sw::input::Keyboard::KEY_RBRACKET = 0x1B,
  sw::input::Keyboard::KEY_RETURN = 0x1C, sw::input::Keyboard::KEY_LCONTROL = 0x1D, sw::input::Keyboard::KEY_A = 0x1E, sw::input::Keyboard::KEY_S = 0x1F,
  sw::input::Keyboard::KEY_D = 0x20, sw::input::Keyboard::KEY_F = 0x21, sw::input::Keyboard::KEY_G = 0x22, sw::input::Keyboard::KEY_H = 0x23,
  sw::input::Keyboard::KEY_J = 0x24, sw::input::Keyboard::KEY_K = 0x25, sw::input::Keyboard::KEY_L = 0x26, sw::input::Keyboard::KEY_SEMICOLON = 0x27,
  sw::input::Keyboard::KEY_APOSTROPHE = 0x28, sw::input::Keyboard::KEY_GRAVE = 0x29, sw::input::Keyboard::KEY_LSHIFT = 0x2A, sw::input::Keyboard::KEY_BACKSLASH = 0x2B,
  sw::input::Keyboard::KEY_Z = 0x2C, sw::input::Keyboard::KEY_X = 0x2D, sw::input::Keyboard::KEY_C = 0x2E, sw::input::Keyboard::KEY_V = 0x2F,
  sw::input::Keyboard::KEY_B = 0x30, sw::input::Keyboard::KEY_N = 0x31, sw::input::Keyboard::KEY_M = 0x32, sw::input::Keyboard::KEY_COMMA = 0x33,
  sw::input::Keyboard::KEY_PERIOD = 0x34, sw::input::Keyboard::KEY_SLASH = 0x35, sw::input::Keyboard::KEY_RSHIFT = 0x36, sw::input::Keyboard::KEY_MULTIPLY = 0x37,
  sw::input::Keyboard::KEY_LMENU = 0x38, sw::input::Keyboard::KEY_SPACE = 0x39, sw::input::Keyboard::KEY_CAPITAL = 0x3A, sw::input::Keyboard::KEY_F1 = 0x3B,
  sw::input::Keyboard::KEY_F2 = 0x3C, sw::input::Keyboard::KEY_F3 = 0x3D, sw::input::Keyboard::KEY_F4 = 0x3E, sw::input::Keyboard::KEY_F5 = 0x3F,
  sw::input::Keyboard::KEY_F6 = 0x40, sw::input::Keyboard::KEY_F7 = 0x41, sw::input::Keyboard::KEY_F8 = 0x42, sw::input::Keyboard::KEY_F9 = 0x43,
  sw::input::Keyboard::KEY_F10 = 0x44, sw::input::Keyboard::KEY_NUMLOCK = 0x45, sw::input::Keyboard::KEY_SCROLL = 0x46, sw::input::Keyboard::KEY_NUMPAD7 = 0x47,
  sw::input::Keyboard::KEY_NUMPAD8 = 0x48, sw::input::Keyboard::KEY_NUMPAD9 = 0x49, sw::input::Keyboard::KEY_SUBTRACT = 0x4A, sw::input::Keyboard::KEY_NUMPAD4 = 0x4B,
  sw::input::Keyboard::KEY_NUMPAD5 = 0x4C, sw::input::Keyboard::KEY_NUMPAD6 = 0x4D, sw::input::Keyboard::KEY_ADD = 0x4E, sw::input::Keyboard::KEY_NUMPAD1 = 0x4F,
  sw::input::Keyboard::KEY_NUMPAD2 = 0x50, sw::input::Keyboard::KEY_NUMPAD3 = 0x51, sw::input::Keyboard::KEY_NUMPAD0 = 0x52, sw::input::Keyboard::KEY_DECIMAL = 0x53,
  sw::input::Keyboard::KEY_OEM_102 = 0x56, sw::input::Keyboard::KEY_F11 = 0x57, sw::input::Keyboard::KEY_F12 = 0x58, sw::input::Keyboard::KEY_F13 = 0x64,
  sw::input::Keyboard::KEY_F14 = 0x65, sw::input::Keyboard::KEY_F15 = 0x66, sw::input::Keyboard::KEY_KANA = 0x70, sw::input::Keyboard::KEY_ABNT_C1 = 0x73,
  sw::input::Keyboard::KEY_CONVERT = 0x79, sw::input::Keyboard::KEY_NOCONVERT = 0x7B, sw::input::Keyboard::KEY_YEN = 0x7D, sw::input::Keyboard::KEY_ABNT_C2 = 0x7E,
  sw::input::Keyboard::KEY_NUMPADEQUALS = 0x8D, sw::input::Keyboard::KEY_PREVTRACK = 0x90, sw::input::Keyboard::KEY_AT = 0x91, sw::input::Keyboard::KEY_COLON = 0x92,
  sw::input::Keyboard::KEY_UNDERLINE = 0x93, sw::input::Keyboard::KEY_KANJI = 0x94, sw::input::Keyboard::KEY_STOP = 0x95, sw::input::Keyboard::KEY_AX = 0x96,
  sw::input::Keyboard::KEY_UNLABELED = 0x97, sw::input::Keyboard::KEY_NEXTTRACK = 0x99, sw::input::Keyboard::KEY_NUMPADENTER = 0x9C, sw::input::Keyboard::KEY_RCONTROL = 0x9D,
  sw::input::Keyboard::KEY_MUTE = 0xA0, sw::input::Keyboard::KEY_CALCULATOR = 0xA1, sw::input::Keyboard::KEY_PLAYPAUSE = 0xA2, sw::input::Keyboard::KEY_MEDIASTOP = 0xA4,
  sw::input::Keyboard::KEY_VOLUMEDOWN = 0xAE, sw::input::Keyboard::KEY_VOLUMEUP = 0xB0, sw::input::Keyboard::KEY_WEBHOME = 0xB2, sw::input::Keyboard::KEY_NUMPADCOMMA = 0xB3,
  sw::input::Keyboard::KEY_DIVIDE = 0xB5, sw::input::Keyboard::KEY_SYSRQ = 0xB7, sw::input::Keyboard::KEY_RMENU = 0xB8, sw::input::Keyboard::KEY_PAUSE = 0xC5,
  sw::input::Keyboard::KEY_HOME = 0xC7, sw::input::Keyboard::KEY_UP = 0xC8, sw::input::Keyboard::KEY_PRIOR = 0xC9, sw::input::Keyboard::KEY_LEFT = 0xCB,
  sw::input::Keyboard::KEY_RIGHT = 0xCD, sw::input::Keyboard::KEY_END = 0xCF, sw::input::Keyboard::KEY_DOWN = 0xD0, sw::input::Keyboard::KEY_NEXT = 0xD1,
  sw::input::Keyboard::KEY_INSERT = 0xD2, sw::input::Keyboard::KEY_DELETE = 0xD3, sw::input::Keyboard::KEY_LWIN = 0xDB, sw::input::Keyboard::KEY_RWIN = 0xDC,
  sw::input::Keyboard::KEY_APPS = 0xDD, sw::input::Keyboard::KEY_POWER = 0xDE, sw::input::Keyboard::KEY_SLEEP = 0xDF, sw::input::Keyboard::KEY_WAKE = 0xE3,
  sw::input::Keyboard::KEY_WEBSEARCH = 0xE5, sw::input::Keyboard::KEY_WEBFAVORITES = 0xE6, sw::input::Keyboard::KEY_WEBREFRESH = 0xE7, sw::input::Keyboard::KEY_WEBSTOP = 0xE8,
  sw::input::Keyboard::KEY_WEBFORWARD = 0xE9, sw::input::Keyboard::KEY_WEBBACK = 0xEA, sw::input::Keyboard::KEY_MYCOMPUTER = 0xEB, sw::input::Keyboard::KEY_MAIL = 0xEC,
  sw::input::Keyboard::KEY_MEDIASELECT = 0xED, sw::input::Keyboard::KEY_BACKSPACE = KEY_BACK, sw::input::Keyboard::KEY_NUMPADSTAR = KEY_MULTIPLY, sw::input::Keyboard::KEY_LALT = KEY_LMENU,
  sw::input::Keyboard::KEY_CAPSLOCK = KEY_CAPITAL, sw::input::Keyboard::KEY_NUMPADMINUS = KEY_SUBTRACT, sw::input::Keyboard::KEY_NUMPADPLUS = KEY_ADD, sw::input::Keyboard::KEY_NUMPADPERIOD = KEY_DECIMAL,
  sw::input::Keyboard::KEY_NUMPADSLASH = KEY_DIVIDE, sw::input::Keyboard::KEY_RALT = KEY_RMENU, sw::input::Keyboard::KEY_UPARROW = KEY_UP, sw::input::Keyboard::KEY_PGUP = KEY_PRIOR,
  sw::input::Keyboard::KEY_LEFTARROW = KEY_LEFT, sw::input::Keyboard::KEY_RIGHTARROW = KEY_RIGHT, sw::input::Keyboard::KEY_DOWNARROW = KEY_DOWN, sw::input::Keyboard::KEY_PGDN = KEY_NEXT,
  sw::input::Keyboard::KEY_PAGEUP = KEY_PGUP, sw::input::Keyboard::KEY_PAGEDOWN = KEY_PGDN, sw::input::Keyboard::KEY_PRINTSCREEN = KEY_SYSRQ
}
 Physical keys numbers. Numbers are the same as in DirectInput. More...
 
enum  sw::input::Mouse::PhysicalButtons : int8 {
  sw::input::Mouse::BUTTON0 = 0, sw::input::Mouse::BUTTON1 = 1, sw::input::Mouse::BUTTON2 = 2, sw::input::Mouse::BUTTON3 = 3,
  sw::input::Mouse::BUTTON4 = 4, sw::input::Mouse::BUTTON5 = 5, sw::input::Mouse::BUTTON6 = 6, sw::input::Mouse::BUTTON7 = 7,
  sw::input::Mouse::LEFT_BUTTON = BUTTON0, sw::input::Mouse::RIGHT_BUTTON = BUTTON1, sw::input::Mouse::MIDDLE_BUTTON = BUTTON2, sw::input::Mouse::XBUTTON1 = BUTTON3,
  sw::input::Mouse::XBUTTON2 = BUTTON4, sw::input::Mouse::NONE = 8
}
 Physical buttons. More...
 
enum  sw::input::Mouse::PhysicalAxes : int8 {
  sw::input::Mouse::X_AXIS = 0, sw::input::Mouse::Y_AXIS = 1, sw::input::Mouse::Z_AXIS = 2, sw::input::Mouse::W_AXIS = 3,
  sw::input::Mouse::WHEEL = Z_AXIS
}
 Physical axes of mouse. More...
 
enum  sw::input::DeviceEventType : uint8 {
  sw::input::DeviceEventType::KeyboardEvent, sw::input::DeviceEventType::CharacterEvent, sw::input::DeviceEventType::ButtonEvent, sw::input::DeviceEventType::AxisEvent,
  sw::input::DeviceEventType::CursorEvent, sw::input::DeviceEventType::InvalidEvent
}
 Input device event types. More...
 
enum  sw::input::DeviceType : uint8 { sw::input::DeviceType::Keyboard, sw::input::DeviceType::Mouse, sw::input::DeviceType::Joystick }
 Input device types. More...
 
enum  sw::input::KeyState::KeyStateFlag : int8 { sw::input::KeyState::Pressed = 0x1, sw::input::KeyState::DownEvent = 0x2, sw::input::KeyState::UpEvent = 0x4 }
 

Detailed Description

Sleeping Wombat input library.

This library provides abstraction layer for native OS input like WinAPI, WPF, DirectInput. Library produces input events and state in system independent manner.

Enumeration Type Documentation

Input device event types.

Enumerator
KeyboardEvent 
CharacterEvent 
ButtonEvent 
AxisEvent 
CursorEvent 
InvalidEvent 

Input device types.

Enumerator
Keyboard 
Mouse 
Joystick 
Enumerator
Pressed 
DownEvent 
UpEvent 

Physical axes of mouse.

Enumerator
X_AXIS 
Y_AXIS 
Z_AXIS 
W_AXIS 
WHEEL 

Physical buttons.

Enums form BUTTON0 to BUTTON2 are buttons right, left and modle. There'ra aliases for them: LEFT_BUTTON, RIGHT_BUTTON, MIDDLE_BUTTON, XBUTTON1, XBUTTON2.

Next numbers means rest of buttons which can exist on mouse device.

Enumerator
BUTTON0 
BUTTON1 
BUTTON2 
BUTTON3 
BUTTON4 
BUTTON5 
BUTTON6 
BUTTON7 
LEFT_BUTTON 
RIGHT_BUTTON 
MIDDLE_BUTTON 
XBUTTON1 
XBUTTON2 
NONE 

Physical keys numbers. Numbers are the same as in DirectInput.

Enumerator
KEY_NONE 
KEY_ESCAPE 
KEY_1 
KEY_2 
KEY_3 
KEY_4 
KEY_5 
KEY_6 
KEY_7 
KEY_8 
KEY_9 
KEY_0 
KEY_MINUS 
KEY_EQUALS 
KEY_BACK 
KEY_TAB 
KEY_Q 
KEY_W 
KEY_E 
KEY_R 
KEY_T 
KEY_Y 
KEY_U 
KEY_I 
KEY_O 
KEY_P 
KEY_LBRACKET 
KEY_RBRACKET 
KEY_RETURN 
KEY_LCONTROL 
KEY_A 
KEY_S 
KEY_D 
KEY_F 
KEY_G 
KEY_H 
KEY_J 
KEY_K 
KEY_L 
KEY_SEMICOLON 
KEY_APOSTROPHE 
KEY_GRAVE 
KEY_LSHIFT 
KEY_BACKSLASH 
KEY_Z 
KEY_X 
KEY_C 
KEY_V 
KEY_B 
KEY_N 
KEY_M 
KEY_COMMA 
KEY_PERIOD 
KEY_SLASH 
KEY_RSHIFT 
KEY_MULTIPLY 
KEY_LMENU 
KEY_SPACE 
KEY_CAPITAL 
KEY_F1 
KEY_F2 
KEY_F3 
KEY_F4 
KEY_F5 
KEY_F6 
KEY_F7 
KEY_F8 
KEY_F9 
KEY_F10 
KEY_NUMLOCK 
KEY_SCROLL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