Torque2D Reference

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Static Public Member Functions | Static Protected Attributes | List of all members
Input Class Reference

`#include <platformInput.h>`

## Static Public Member Functions
static void | init ()
static void | destroy ()
static bool | enable ()
static void | disable ()
static void | activate ()
static void | deactivate ()
static void | reactivate ()
static void | enableMouse ()
static void | disableMouse ()
static void | enableKeyboard ()
static void | disableKeyboard ()
static bool | activateKeyboard ()
static void | deactivateKeyboard ()
static bool | enableJoystick ()
static void | disableJoystick ()
static void | echoInputState ()
static U16 | getAscii (U16 keyCode, KEY_STATE keyState)
static U16 | getKeyCode (U16 asciiCode)
static bool | isEnabled ()
static bool | isActive ()
static bool | isMouseEnabled ()
static bool | isKeyboardEnabled ()
static void | process ()
static void | setCursorPos (S32 x, S32 y)
static void | setCursorState (bool on)
| If True, turn on the platform's cursor. More...
static void | setCursorShape (U32 cursorID)
static void | pushCursor (S32 cursorID)
| Push a cursor shape using the Cursor Manager. More...
static void | popCursor ()
| Pop the current cursor off of the Cursor Manager stack. More...
static void | refreshCursor ()
| Refresh the current cursor's shape. More...
static U32 | getDoubleClickTime ()
static S32 | getDoubleClickWidth ()
static S32 | getDoubleClickHeight ()
static InputManager * | getManager ()
| Return InputManager Singleton. More...
static CursorManager * | getCursorManager ()
| Return CursorManager Singleton. More...
static U8 | getModifierKeys ()
static void | setModifierKeys (U8 mod)

## Static Protected Attributes
static InputManager * | smManager = NULL
| Input Manager Singleton. More...
static CursorManager * | smCursorManager = 0
| Cursor Manager Singleton. More...
static bool | smActive = false
| Is Input Active. More...
static bool | smLastKeyboardActivated
static U8 | smModifierKeys
| Current Modifier Keys Pressed. More...
static bool | smLastMouseActivated
static bool | smLastJoystickActivated

## Member Function Documentation

void activate | ( |  | ) |
| static

static bool activateKeyboard | ( |  | ) |
| static

void deactivate | ( |  | ) |
| static

static void deactivateKeyboard | ( |  | ) |
| static

void destroy | ( |  | ) |
| static

void disable | ( |  | ) |
| static

static void disableJoystick | ( |  | ) |
| static

void disableKeyboard | ( |  | ) |
| static

void disableMouse | ( |  | ) |
| static

static void echoInputState | ( |  | ) |
| static

bool enable | ( |  | ) |
| static

Initial value:
{
if (gInputEnabled)
Input::disable()
Input::disable
static void disable()
Definition: AndroidInput.cpp:320

static bool enableJoystick | ( |  | ) |
| static

void enableKeyboard | ( |  | ) |
| static

void enableMouse | ( |  | ) |
| static

U16 getAscii | ( | U16 | keyCode,
|  | KEY_STATE | keyState
| ) |  |
| static

CursorManager * getCursorManager | ( |  | ) |
| static

Return CursorManager Singleton.

S32 getDoubleClickHeight | ( |  | ) |
| static

U32 getDoubleClickTime | ( |  | ) |
| static

S32 getDoubleClickWidth | ( |  | ) |
| static

U16 getKeyCode | ( | U16 | asciiCode | ) |
| static

InputManager * getManager | ( |  | ) |
| static

Return InputManager Singleton.

static U8 getModifierKeys | ( |  | ) |
| inline static

void init | ( |  | ) |
| static

bool isActive | ( |  | ) |
| static

bool isEnabled | ( |  | ) |
| static

bool isKeyboardEnabled | ( |  | ) |
| static

bool isMouseEnabled | ( |  | ) |
| static

void popCursor | ( |  | ) |
| static

Pop the current cursor off of the Cursor Manager stack.

void process | ( |  | ) |
| static

void pushCursor | ( | S32 | cursorID | ) |
| static

Push a cursor shape using the Cursor Manager.

void reactivate | ( |  | ) |
| static

void refreshCursor | ( |  | ) |
| static

Refresh the current cursor's shape.

void setCursorPos | ( | S32 | x,
|  | S32 | y
| ) |  |
| static

void setCursorShape | ( | U32 | cursorID | ) |
| static

Initial value:
{
return true

void setCursorState | ( | bool | on | ) |
| static

If True, turn on the platform's cursor.

static void setModifierKeys | ( | U8 | mod | ) |
| inline static

## Member Data Documentation

bool smActive = false
| static protected

Is Input Active.

CursorManager * smCursorManager = 0
| static protected

Cursor Manager Singleton.

bool smLastJoystickActivated
| static protected

bool smLastKeyboardActivated
| static protected

bool smLastMouseActivated
| static protected

InputManager * smManager = NULL
| static protected

Input Manager Singleton.

U8 smModifierKeys
| static protected

Current Modifier Keys Pressed.

The documentation for this class was generated from the following files:

- platform/platformInput.h
- platform/CursorManager.cc
- platformAndroid/AndroidInput.cpp
- platformAndroid/AndroidPlatform.cpp
- platformEmscripten/EmscriptenInput.cpp
- platformEmscripten/EmscriptenPlatform.cpp