Open 3D Engine AzFramework API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AzFramework::InputDeviceKeyboard::Implementation Class Referenceabstract

Base class for platform specific implementations of keyboard input devices. More...

#include <InputDeviceKeyboard.h>

Inherited by AzFramework::XcbInputDeviceKeyboard.

Public Member Functions

 AZ_CLASS_ALLOCATOR (Implementation, AZ::SystemAllocator)
 
 Implementation (InputDeviceKeyboard &inputDevice)
 
 AZ_DISABLE_COPY_MOVE (Implementation)
 
virtual ~Implementation ()
 Destructor.
 
virtual LocalUserId GetAssignedLocalUserId () const
 
virtual bool IsConnected () const =0
 
virtual bool HasTextEntryStarted () const =0
 
virtual void TextEntryStart (const VirtualKeyboardOptions &options)=0
 
virtual void TextEntryStop ()=0
 Inform input device that text input is expected to stop (pair with StartTextInput)
 
virtual void TickInputDevice ()=0
 Tick/update the input device to broadcast all input events since the last frame.
 
virtual void GetPhysicalKeyOrButtonText (const InputChannelId &, AZStd::string &) const
 

Static Public Member Functions

static ImplementationCreate (InputDeviceKeyboard &inputDevice)
 

Protected Types

using RawKeyEventQueueByIdMap = AZStd::unordered_map< InputChannelId, AZStd::vector< bool > >
 Alias for verbose container class.
 

Protected Member Functions

void QueueRawKeyEvent (const InputChannelId &inputChannelId, bool rawKeyState)
 
void QueueRawTextEvent (const AZStd::string &textUTF8)
 
void ProcessRawEventQueues ()
 
void ResetInputChannelStates ()
 Reset the state of all this input device's associated input channels.
 

Protected Attributes

InputDeviceKeyboardm_inputDevice
 Reference to the input device.
 
RawKeyEventQueueByIdMap m_rawKeyEventQueuesById
 Raw key event queues by id.
 
AZStd::vector< AZStd::string > m_rawTextEventQueue
 Raw text event queue.
 

Detailed Description

Base class for platform specific implementations of keyboard input devices.

Constructor & Destructor Documentation

◆ Implementation()

AzFramework::InputDeviceKeyboard::Implementation::Implementation ( InputDeviceKeyboard inputDevice)

Constructor

Parameters
[in]inputDeviceReference to the input device being implemented

Member Function Documentation

◆ Create()

static Implementation * AzFramework::InputDeviceKeyboard::Implementation::Create ( InputDeviceKeyboard inputDevice)
static

Default factory create function

Parameters
[in]inputDeviceReference to the input device being implemented

◆ GetPhysicalKeyOrButtonText()

virtual void AzFramework::InputDeviceKeyboard::Implementation::GetPhysicalKeyOrButtonText ( const InputChannelId ,
AZStd::string &   
) const
inlinevirtual

Get the text displayed on the physical key/button associated with an input channel. In the case of keyboard keys, we must take into account the current keyboard layout.

Parameters
[in]inputChannelIdThe input channel id whose key or button text to return
[out]o_keyOrButtonTextThe text displayed on the physical key/button if found

◆ HasTextEntryStarted()

virtual bool AzFramework::InputDeviceKeyboard::Implementation::HasTextEntryStarted ( ) const
pure virtual

Query whether text entry has already been started

Returns
True if text entry has already been started, false otherwise

Implemented in AzFramework::XcbInputDeviceKeyboard.

◆ IsConnected()

virtual bool AzFramework::InputDeviceKeyboard::Implementation::IsConnected ( ) const
pure virtual

Query the connected state of the input device

Returns
True if the input device is currently connected, false otherwise

Implemented in AzFramework::XcbInputDeviceKeyboard.

◆ ProcessRawEventQueues()

void AzFramework::InputDeviceKeyboard::Implementation::ProcessRawEventQueues ( )
protected

Process raw input events that have been queued since the last call to this function. This function is not thread safe, and so should only be called from the main thread.

◆ QueueRawKeyEvent()

void AzFramework::InputDeviceKeyboard::Implementation::QueueRawKeyEvent ( const InputChannelId inputChannelId,
bool  rawKeyState 
)
protected

Queue raw key events to be processed in the next call to ProcessRawEventQueues. This function is not thread safe and so should only be called from the main thread.

Parameters
[in]inputChannelIdThe input channel id
[in]rawKeyStateThe raw key state

◆ QueueRawTextEvent()

void AzFramework::InputDeviceKeyboard::Implementation::QueueRawTextEvent ( const AZStd::string &  textUTF8)
protected

Queue raw text events to be processed in the next call to ProcessRawEventQueues. This function is not thread safe and so should only be called from the main thread.

Parameters
[in]textUTF8The text to queue (encoded using UTF-8)

◆ TextEntryStart()

virtual void AzFramework::InputDeviceKeyboard::Implementation::TextEntryStart ( const VirtualKeyboardOptions &  options)
pure virtual

Inform input device that text input is expected to start (pair with StopTextInput)

Parameters
[in]optionsUsed to specify the appearance/behavior of any virtual keyboard

◆ TextEntryStop()

virtual void AzFramework::InputDeviceKeyboard::Implementation::TextEntryStop ( )
pure virtual

Inform input device that text input is expected to stop (pair with StartTextInput)

Implemented in AzFramework::XcbInputDeviceKeyboard.

◆ TickInputDevice()

virtual void AzFramework::InputDeviceKeyboard::Implementation::TickInputDevice ( )
pure virtual

Tick/update the input device to broadcast all input events since the last frame.

Implemented in AzFramework::XcbInputDeviceKeyboard.


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