IInputDevice

Represents an input device instance such as the keyboard, the mouse or a gamepad. More...

#include

Public Member Functions

virtual ~IInputDevice ()
Implements virtual destructor just for safety.
virtual const char * GetDeviceName () const =0
virtual EInputDeviceType GetDeviceType () const =0
virtual TInputDeviceId GetDeviceId () const =0
virtual int GetDeviceIndex () const =0
virtual bool Init ()=0
Initialization.
virtual void PostInit ()=0
virtual void Update (bool bFocus)=0
Update.
virtual bool SetForceFeedback (IFFParams params)=0
virtual bool InputState (const TKeyName &key, EInputState state)=0
Checks for key pressed and held.
virtual bool SetExclusiveMode (bool value)=0
Sets/unsets DirectInput to exclusive mode.
virtual void ClearKeyState ()=0
Clears the key (pressed) state.
virtual void ClearAnalogKeyState (TInputSymbols &clearedSymbols)=0
Clears analog position state.
virtual void SetUniqueId (uint8 const uniqueId)=0
Called upon creation to assign a process wide unique Id.
virtual const char * GetKeyName (const SInputEvent &event) const =0
virtual const char * GetKeyName (const EKeyId keyId) const =0
virtual uint32 GetInputCharUnicode (const SInputEvent &event)=0
virtual const char * GetOSKeyName (const SInputEvent &event)=0
virtual SInputSymbol * LookupSymbol (EKeyId id) const =0
virtual const SInputSymbol * GetSymbolByName (const char *name) const =0
virtual bool IsOfDeviceType (EInputDeviceType type) const =0
virtual void Enable (bool enable)=0
virtual bool IsEnabled () const =0
virtual void OnLanguageChange ()=0
virtual void SetDeadZone (float fThreshold)=0
virtual void RestoreDefaultDeadZone ()=0

Detailed Description

Represents an input device instance such as the keyboard, the mouse or a gamepad.

Member Function Documentation

◆ SetDeadZone()

virtual void IInputDevice::SetDeadZone ( float fThreshold)
pure virtual

Dead zone settings for input devices where this is relevant (i.e. controllers with analog sticks).

Parameters
fThresholdBetween 0 and 1.

◆ SetForceFeedback()

virtual bool IInputDevice::SetForceFeedback ( IFFParams params)
pure virtual

Sets force feedback.

Returns
true if successful.