Main Input system interface.
struct IInput { };
IInput.h
Interface to the Input system. The input system give access and initialize Keyboard,Mouse and Joystick SubSystems.
virtual ~IInput();
virtual void AddConsoleEventListener(IInputEventListener * pListener) = 0;
Registers new console input event listeners. console input listeners receive all events, no matter what.
Registers new input events listener.
virtual void AddEventListener(IInputEventListener * pListener) = 0;
virtual bool AddInputDevice(IInputDevice* pDevice) = 0;
virtual bool AddTouchEventListener(ITouchEventListener * pListener, const char* name) = 0;
Clears analog key states of all devices.
virtual void ClearAnalogKeyState() = 0;
Clears all the inputs being blocked
virtual void ClearBlockingInputs() = 0;
None
Clears key states of all devices.
virtual void ClearKeyState() = 0;
Tells devices whether to report input or not.
virtual void EnableDevice(EDeviceId deviceId, bool enable) = 0;
virtual void EnableEventPosting(bool bEnable) = 0;
Registers an exclusive listener which has the ability to filter out events before they arrive at the normal listeners.
virtual void ForceFeedbackEvent(const SFFOutputEvent & event) = 0;
Posts a force feedback / rumble output event.
virtual void ForceFeedbackSetDeviceIndex(int index) = 0;
Sets a filter so that only one device can output force feedback
virtual IInputEventListener * GetExclusiveListener() = 0;
virtual char GetInputCharAscii(const SInputEvent& event) = 0;
Parameters |
Description |
const SInputEvent& event |
Input event to translate into a name. |
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.
virtual const char* GetKeyName(EKeyId keyId) const = 0;
Parameters |
Description |
EKeyId keyId |
Input keyId to translate into a name. |
Translated key name
Converts an input event to the key name. The function should internally dispatch to all managed input devices and return the first recognized keyId.
virtual const char* GetKeyName(const SInputEvent& event) const = 0;
Parameters |
Description |
const SInputEvent& event |
Input event to translate into a name. |
Converts an input event to the key name. The function should internally dispatch to all managed input devices and return the first recognized event.
virtual IKinectInput* GetKinectInput() = 0;
KINECT
Gets the currently pressed modifiers.
virtual int GetModifiers() const = 0;
virtual INaturalPointInput* GetNaturalPointInput() = 0;
TrackIR
Gets the number of inputs currently being blocked
virtual int GetNumBlockingInputs() const = 0;
Number of inputs currently being blocked
Gets OS Keyname.
virtual const wchar_t* GetOSKeyName(const SInputEvent& event) = 0;
Parameters |
Description |
const SInputEvent& event |
Input event to translate into a name. |
Returns EInputPlatformFlags
virtual uint32 GetPlatformFlags() const = 0;
Looks up a symbol for a key name
virtual const SInputSymbol* GetSymbolByName(const char* name) const = 0;
virtual bool GrabInput(bool bGrab) = 0;
SDL
Checks if the specified input is currently being blocked
virtual bool HasBlockingInput(const SInputBlockData& inputBlockData) const = 0;
True if specified input is currently being blocked, false otherwise
virtual bool HasInputDeviceOfType(EInputDeviceType type) = 0;
Queries to see if this machine has some kind of input device connected.
Initializes input system.
virtual bool Init() = 0;
Required params should be passed through constructor
virtual bool InputState(const TKeyName& key, EInputState state) = 0;
virtual bool IsEventPostingEnabled() const = 0;
Lookups a symbol for a given symbol and key ids.
virtual SInputSymbol* LookupSymbol(EDeviceId deviceId, int deviceIndex, EKeyId keyId) = 0;
Post Initialization called at end of initialization
virtual void PostInit() = 0;
virtual void PostInputEvent(const SInputEvent & event, bool bForce = false) = 0;
virtual void PostTouchEvent(const STouchEvent & event, bool bForce = false) = 0;
virtual void ProcessKey(uint32 key, bool pressed, wchar_t unicode, bool repeat) = 0;
For direct key processing (e.g. win proc functions) currently only used by durango metro launcher
Removes blocking input
virtual bool RemoveBlockingInput(const SInputBlockData& inputBlockData) = 0;
True if found and removed, false otherwise
virtual void RemoveConsoleEventListener(IInputEventListener * pListener) = 0;
virtual void RemoveEventListener(IInputEventListener * pListener) = 0;
virtual void RemoveTouchEventListener(ITouchEventListener * pListener) = 0;
virtual void RestoreDefaultDeadZone() = 0;
Gets if we are currently re-triggering.
virtual bool Retriggering() = 0;
Needed to filter out actions.
Re-triggers pressed keys.
virtual void RetriggerKeyState() = 0;
Used for transitioning action maps.
Adds or updates blocking input if SInputBlockData::fBlockDuration exceeds previously blocking time
virtual bool SetBlockingInput(const SInputBlockData& inputBlockData) = 0;
True if successfully added inputBlocker or updated existed input blocker's remaining blocking time
virtual void SetDeadZone(float fThreshold) = 0;
between 0 and 1
virtual void SetExclusiveListener(IInputEventListener * pListener) = 0;
Registers an exclusive listener which has the ability to filter out events before they arrive at the normal listeners.
virtual void SetExclusiveMode(EDeviceId deviceId, bool exclusive, void * hwnd = 0) = 0;
IInputDevice::SetExclusive
Checks if the input specified should be blocked
True if input specified should be blocked, false otherwise
Clears all subsystems.
virtual void ShutDown() = 0;
virtual void Update(bool bFocus) = 0;
Updates Keyboard, Mouse and Joystick. Sets bFocus to true if window has focus and input is enabled.