Drag[en]gine Script Module DragonScript  1.21
Dragengine.InputSystem Class Reference

Input system. More...

Inheritance diagram for Dragengine.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 String getParameterValue (String name)
 Parameter value. More...
 
static void setParameterValue (String name, String 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 bool getButtonTouched (int device, int button)
 Button at index on device at index is touched. More...
 
static float getAxisValue (int device, int axis)
 Value of axis at index on device at index. More...
 
static float getFeedbackValue (int device, int feedback)
 Value of feedback at index on device at index. More...
 
static void setFeedbackValue (int device, int feedback, float value)
 Set value of feedback at index on device at index. More...
 
static int buttonMatchingKeyCode (int device, int keyCode)
 Index of button best matching key code or -1 if not found. More...
 
static int buttonMatchingKeyChar (int device, int character)
 Index of button best matching character or -1 if not found. More...
 
int buttonMatchingKeyCode (int device, int keyCode, InputEventKeyLocation location)
 Index of button best matching key code or -1 if not found. More...
 
int buttonMatchingKeyChar (int device, int character, InputEventKeyLocation location)
 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

Member Function Documentation

◆ buttonMatchingKeyChar() [1/2]

static int Dragengine.InputSystem.buttonMatchingKeyChar ( int  device,
int  character 
)
static

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.

◆ buttonMatchingKeyChar() [2/2]

int Dragengine.InputSystem.buttonMatchingKeyChar ( int  device,
int  character,
InputEventKeyLocation  location 
)

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

Version
1.7

Same as buttonMatchingKeyChar(int,int) but allows to distinguish between multiple keys of the same type, for example left and right shift key.

◆ buttonMatchingKeyCode() [1/2]

static int Dragengine.InputSystem.buttonMatchingKeyCode ( int  device,
int  keyCode 
)
static

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.

◆ buttonMatchingKeyCode() [2/2]

int Dragengine.InputSystem.buttonMatchingKeyCode ( int  device,
int  keyCode,
InputEventKeyLocation  location 
)

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

Version
1.7

Same as buttonMatchingKeyChar(int,int) but allows to distinguish between multiple keys of the same type, for example left and right shift key.

◆ getAxisValue()

static float Dragengine.InputSystem.getAxisValue ( int  device,
int  axis 
)
static

Value of axis at index on device at index.

◆ getButtonPressed()

static bool Dragengine.InputSystem.getButtonPressed ( int  device,
int  button 
)
static

Button at index on device at index is pressed down.

◆ getButtonTouched()

static bool Dragengine.InputSystem.getButtonTouched ( int  device,
int  button 
)
static

Button at index on device at index is touched.

◆ getCaptureInputDevices()

static bool Dragengine.InputSystem.getCaptureInputDevices ( )
static

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

◆ getDeviceAt()

static InputDevice Dragengine.InputSystem.getDeviceAt ( int  index)
static

Information for input device at index.

◆ getDeviceCount()

static int Dragengine.InputSystem.getDeviceCount ( )
static

Number of input devices.

◆ getFeedbackValue()

static float Dragengine.InputSystem.getFeedbackValue ( int  device,
int  feedback 
)
static

Value of feedback at index on device at index.

◆ getParameterCount()

static int Dragengine.InputSystem.getParameterCount ( )
static

Number of parameters available.

◆ getParameterInfo() [1/2]

static ModuleParameter Dragengine.InputSystem.getParameterInfo ( int  index)
static

Parameter information.

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

◆ getParameterInfo() [2/2]

static ModuleParameter Dragengine.InputSystem.getParameterInfo ( String  name)
static

Named parameter information or null if not found.

◆ getParameterValue()

static String Dragengine.InputSystem.getParameterValue ( String  name)
static

Parameter value.

Exceptions
EInvalidParamParameter with name not found.

◆ indexOfAxisWithID()

static int Dragengine.InputSystem.indexOfAxisWithID ( int  device,
String  id 
)
static

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

◆ indexOfButtonWithID()

static int Dragengine.InputSystem.indexOfButtonWithID ( int  device,
String  id 
)
static

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

◆ indexOfDeviceWithID()

static int Dragengine.InputSystem.indexOfDeviceWithID ( String  id)
static

Index of device with identifier or -1 if absent.

◆ indexOfFeedbackWithID()

static int Dragengine.InputSystem.indexOfFeedbackWithID ( int  device,
String  id 
)
static

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

◆ sendCommand()

static String Dragengine.InputSystem.sendCommand ( String  command)
static

Send command.

◆ setCaptureInputDevices()

static void Dragengine.InputSystem.setCaptureInputDevices ( bool  captureInputDevices)
static

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

◆ setFeedbackValue()

static void Dragengine.InputSystem.setFeedbackValue ( int  device,
int  feedback,
float  value 
)
static

Set value of feedback at index on device at index.

◆ setParameterValue()

static void Dragengine.InputSystem.setParameterValue ( String  name,
String  value 
)
static

Set named parameter value.

Exceptions
EInvalidParamParameter with name not found.

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