Drag[en]gine Script Module DragonScript Script API  1.0
InputSystem Class Reference

Input system. More...

Inheritance diagram for InputSystem:

Static Public Member Functions

Management
static bool getCaptureInputDevices ()
 Input devices are captured by the active input module if supported. More...
 
static void setCaptureInputDevices (bool captureInputDevices)
 Set if input devices are captured by the active input module if supported. More...
 
Parameters
static int getParameterCount ()
 Number of parameters available. More...
 
static ModuleParameter getParameterInfo (int index)
 Parameter information. More...
 
static ModuleParameter getParameterInfo (String name)
 Named parameter information or null if not found. More...
 
static float getParameterValue (String name)
 Parameter value. More...
 
static void setParameterValue (String name, float value)
 Set named parameter value. More...
 
static String sendCommand (String command)
 Send command. More...
 

Input devices

static int getDeviceCount ()
 Number of input devices. More...
 
static InputDevice getDeviceAt (int index)
 Information for input device at index. More...
 
static int indexOfDeviceWithID (String id)
 Index of device with identifier or -1 if absent. More...
 
static int indexOfButtonWithID (int device, String id)
 Index of button with identifier on device at index or -1 if absent. More...
 
static int indexOfAxisWithID (int device, String id)
 Index of axis with identifier on device at index or -1 if absent. More...
 
static int indexOfFeedbackWithID (int device, String id)
 Index of feedback with identifier on device at index or -1 if absent. More...
 
static bool getButtonPressed (int device, int button)
 Button at index on device at index is pressed down. More...
 
static int getAxisValue (int device, int axis)
 Value of axis at index on device at index. More...
 
static int getFeedbackValue (int device, int feedback)
 Value of feedback at index on device at index. More...
 
static void setFeedbackValue (int device, int feedback, int value)
 Set value of feedback at index on device at index. More...
 
int buttonMatchingKeyCode (int device, int keyCode)
 Index of button best matching key code or -1 if not found. More...
 
int buttonMatchingKeyChar (int device, int character)
 Index of button best matching character or -1 if not found. More...
 

Detailed Description

Input system.

This is a native class. This is a pure static class. The class can not be instantiated

Author
Roland Pl├╝ss
Version
1.0
Date
2015

Member Function Documentation

◆ buttonMatchingKeyChar()

int buttonMatchingKeyChar ( int  device,
int  character 
)

Index of button best matching character or -1 if not found.

If more than one button matches the character the input module decides which button is the more likely choice. Once decided the input module is required to return the same button for the same character in subsequent queries unless a deInputEvent::eeDeviceParamsChanged event is issued.

Keys usually have different characters depending on the state of modifier keys. The input module matches character case insensitive to increase the chance to find a match. If mutliple keys match the character but under different modifier states the input module has to first select the key matching case sensitive then the key requiring less modifiers.

Can be used for example to locate keyboard keys to create default binding layouts without the user pressing input keys.

◆ buttonMatchingKeyCode()

int buttonMatchingKeyCode ( int  device,
int  keyCode 
)

Index of button best matching key code or -1 if not found.

If more than one button matches the key code the input module decides which button is the more likely choice. Once decided the input module is required to return the same button for the same key code in subsequent queries unless a deInputEvent::eeDeviceParamsChanged event is issued.

Can be used for example to locate keyboard keys to create default binding layouts without the user pressing input keys.

◆ getAxisValue()

static int getAxisValue ( int  device,
int  axis 
)
static

Value of axis at index on device at index.

◆ getButtonPressed()

static bool getButtonPressed ( int  device,
int  button 
)
static

Button at index on device at index is pressed down.

◆ getCaptureInputDevices()

static bool getCaptureInputDevices ( )
static

Input devices are captured by the active input module if supported.

◆ getDeviceAt()

static InputDevice getDeviceAt ( int  index)
static

Information for input device at index.

◆ getDeviceCount()

static int getDeviceCount ( )
static

Number of input devices.

◆ getFeedbackValue()

static int getFeedbackValue ( int  device,
int  feedback 
)
static

Value of feedback at index on device at index.

◆ getParameterCount()

static int getParameterCount ( )
static

Number of parameters available.

◆ getParameterInfo() [1/2]

static ModuleParameter getParameterInfo ( int  index)
static

Parameter information.

Exceptions
EOutOfBoundaryindex less than 0 or greater than or equal to getParameterCount().

◆ getParameterInfo() [2/2]

static ModuleParameter getParameterInfo ( String  name)
static

Named parameter information or null if not found.

◆ getParameterValue()

static float getParameterValue ( String  name)
static

Parameter value.

Exceptions
EInvalidParamParameter with name not found.

◆ indexOfAxisWithID()

static int indexOfAxisWithID ( int  device,
String  id 
)
static

Index of axis with identifier on device at index or -1 if absent.

◆ indexOfButtonWithID()

static int indexOfButtonWithID ( int  device,
String  id 
)
static

Index of button with identifier on device at index or -1 if absent.

◆ indexOfDeviceWithID()

static int indexOfDeviceWithID ( String  id)
static

Index of device with identifier or -1 if absent.

◆ indexOfFeedbackWithID()

static int indexOfFeedbackWithID ( int  device,
String  id 
)
static

Index of feedback with identifier on device at index or -1 if absent.

◆ sendCommand()

static String sendCommand ( String  command)
static

Send command.

◆ setCaptureInputDevices()

static void setCaptureInputDevices ( bool  captureInputDevices)
static

Set if input devices are captured by the active input module if supported.

◆ setFeedbackValue()

static void setFeedbackValue ( int  device,
int  feedback,
int  value 
)
static

Set value of feedback at index on device at index.

◆ setParameterValue()

static void setParameterValue ( String  name,
float  value 
)
static

Set named parameter value.

Exceptions
EInvalidParamParameter with name not found.

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