IInput

Main Input system interface.

C++
struct IInput {
};
File

IInput.h

Description

Interface to the Input system. The input system give access and initialize Keyboard,Mouse and Joystick SubSystems.

IInput::~IInput Destructor
C++
virtual ~IInput();
IInput::AddConsoleEventListener Method
C++
virtual void AddConsoleEventListener(IInputEventListener * pListener) = 0;
Description

Registers new console input event listeners. console input listeners receive all events, no matter what.

IInput::AddEventListener Method

Registers new input events listener.

C++
virtual void AddEventListener(IInputEventListener * pListener) = 0;
IInput::AddInputDevice Method
C++
virtual bool AddInputDevice(IInputDevice* pDevice) = 0;
IInput::AddTouchEventListener Method
C++
virtual bool AddTouchEventListener(ITouchEventListener * pListener, const char* name) = 0;
IInput::ClearAnalogKeyState Method

Clears analog key states of all devices.

C++
virtual void ClearAnalogKeyState() = 0;
IInput::ClearBlockingInputs Method

Clears all the inputs being blocked

C++
virtual void ClearBlockingInputs() = 0;
Returns

None

IInput::ClearKeyState Method

Clears key states of all devices.

C++
virtual void ClearKeyState() = 0;
IInput::EnableDevice Method

Tells devices whether to report input or not.

C++
virtual void EnableDevice(EDeviceId deviceId, bool enable) = 0;
IInput::EnableEventPosting Method
C++
virtual void EnableEventPosting(bool bEnable) = 0;
Description

Registers an exclusive listener which has the ability to filter out events before they arrive at the normal listeners.

IInput::ForceFeedbackEvent Method
C++
virtual void ForceFeedbackEvent(const SFFOutputEvent & event) = 0;
Description

Posts a force feedback / rumble output event.

IInput::ForceFeedbackSetDeviceIndex Method
C++
virtual void ForceFeedbackSetDeviceIndex(int index) = 0;
Description

Sets a filter so that only one device can output force feedback

IInput::GetExclusiveListener Method
C++
virtual IInputEventListener * GetExclusiveListener() = 0;
IInput::GetInputCharAscii Method
C++
virtual char GetInputCharAscii(const SInputEvent& event) = 0;
Parameters
Parameters
Description
const SInputEvent& event
Input event to translate into a name.
Description

Gets an input char translated to ascii from the event. The function should internally dispatch to all managed input devices and return the first recognized event.

IInput::GetKeyName Method (EKeyId)
C++
virtual const char* GetKeyName(EKeyId keyId) const = 0;
Parameters
Parameters
Description
EKeyId keyId
Input keyId to translate into a name.
Returns

Translated key name

Description

Converts an input event to the key name. The function should internally dispatch to all managed input devices and return the first recognized keyId.

IInput::GetKeyName Method (SInputEvent&)
C++
virtual const char* GetKeyName(const SInputEvent& event) const = 0;
Parameters
Parameters
Description
const SInputEvent& event
Input event to translate into a name.
Description

Converts an input event to the key name. The function should internally dispatch to all managed input devices and return the first recognized event.

IInput::GetKinectInput Method
C++
virtual IKinectInput* GetKinectInput() = 0;
Description

KINECT

IInput::GetModifiers Method

Gets the currently pressed modifiers.

C++
virtual int GetModifiers() const = 0;
IInput::GetNaturalPointInput Method
C++
virtual INaturalPointInput* GetNaturalPointInput() = 0;
Description

TrackIR

IInput::GetNumBlockingInputs Method

Gets the number of inputs currently being blocked

C++
virtual int GetNumBlockingInputs() const = 0;
Returns

Number of inputs currently being blocked

IInput::GetOSKeyName Method

Gets OS Keyname.

C++
virtual const wchar_t* GetOSKeyName(const SInputEvent& event) = 0;
Parameters
Parameters
Description
const SInputEvent& event
Input event to translate into a name.
IInput::GetPlatformFlags Method
C++
virtual uint32 GetPlatformFlags() const = 0;
IInput::GetSymbolByName Method

Looks up a symbol for a key name

C++
virtual const SInputSymbol* GetSymbolByName(const char* name) const = 0;
IInput::GrabInput Method
C++
virtual bool GrabInput(bool bGrab) = 0;
Description

SDL

IInput::HasBlockingInput Method

Checks if the specified input is currently being blocked

C++
virtual bool HasBlockingInput(const SInputBlockData& inputBlockData) const = 0;
Returns

True if specified input is currently being blocked, false otherwise

IInput::HasInputDeviceOfType Method
C++
virtual bool HasInputDeviceOfType(EInputDeviceType type) = 0;
Description

Queries to see if this machine has some kind of input device connected.

IInput::Init Method

Initializes input system.

C++
virtual bool Init() = 0;
Notes

Required params should be passed through constructor

IInput::InputState Method
C++
virtual bool InputState(const TKeyName& key, EInputState state) = 0;
See Also
IInput::IsEventPostingEnabled Method
C++
virtual bool IsEventPostingEnabled() const = 0;
IInput::LookupSymbol Method

Lookups a symbol for a given symbol and key ids.

C++
virtual SInputSymbol* LookupSymbol(EDeviceId deviceId, int deviceIndex, EKeyId keyId) = 0;
IInput::PostInit Method

Post Initialization called at end of initialization

C++
virtual void PostInit() = 0;
IInput::PostInputEvent Method
C++
virtual void PostInputEvent(const SInputEvent & event, bool bForce = false) = 0;
IInput::PostTouchEvent Method
C++
virtual void PostTouchEvent(const STouchEvent & event, bool bForce = false) = 0;
IInput::ProcessKey Method
C++
virtual void ProcessKey(uint32 key, bool pressed, wchar_t unicode, bool repeat) = 0;
Description

For direct key processing (e.g. win proc functions) currently only used by durango metro launcher

IInput::RemoveBlockingInput Method

Removes blocking input

C++
virtual bool RemoveBlockingInput(const SInputBlockData& inputBlockData) = 0;
Returns

True if found and removed, false otherwise

IInput::RemoveConsoleEventListener Method
C++
virtual void RemoveConsoleEventListener(IInputEventListener * pListener) = 0;
IInput::RemoveEventListener Method
C++
virtual void RemoveEventListener(IInputEventListener * pListener) = 0;
IInput::RemoveTouchEventListener Method
C++
virtual void RemoveTouchEventListener(ITouchEventListener * pListener) = 0;
IInput::RestoreDefaultDeadZone Method
C++
virtual void RestoreDefaultDeadZone() = 0;
IInput::Retriggering Method

Gets if we are currently re-triggering.

C++
virtual bool Retriggering() = 0;
Notes

Needed to filter out actions.

IInput::RetriggerKeyState Method

Re-triggers pressed keys.

C++
virtual void RetriggerKeyState() = 0;
Notes

Used for transitioning action maps.

IInput::SetBlockingInput Method

Adds or updates blocking input if SInputBlockData::fBlockDuration exceeds previously blocking time

C++
virtual bool SetBlockingInput(const SInputBlockData& inputBlockData) = 0;
Returns

True if successfully added inputBlocker or updated existed input blocker's remaining blocking time

IInput::SetDeadZone Method
C++
virtual void SetDeadZone(float fThreshold) = 0;
Description

between 0 and 1

IInput::SetExclusiveListener Method
C++
virtual void SetExclusiveListener(IInputEventListener * pListener) = 0;
Description

Registers an exclusive listener which has the ability to filter out events before they arrive at the normal listeners.

IInput::SetExclusiveMode Method
C++
virtual void SetExclusiveMode(EDeviceId deviceId, bool exclusive, void * hwnd = 0) = 0;
See Also

IInputDevice::SetExclusive

IInput::ShouldBlockInputEventPosting Method

Checks if the input specified should be blocked

C++
virtual bool ShouldBlockInputEventPosting(const EKeyId keyId, const EDeviceId deviceId, const uint8 deviceIndex) const = 0;
Returns

True if input specified should be blocked, false otherwise

IInput::ShutDown Method

Clears all subsystems.

C++
virtual void ShutDown() = 0;
IInput::Update Method
C++
virtual void Update(bool bFocus) = 0;
Description

Updates Keyboard, Mouse and Joystick. Sets bFocus to true if window has focus and input is enabled.