#include <InputDeviceKeyboard.h>
Inherits AzFramework::InputDevice, and InputTextEntryRequestBus::Handler.
Classes | |
class | Implementation |
Base class for platform specific implementations of keyboard input devices. More... | |
struct | Key |
Public Types | |
using | ImplementationFactory = Implementation *(InputDeviceKeyboard &) |
Alias for the function type used to create a custom implementation for this input device. | |
Public Member Functions | |
AZ_CLASS_ALLOCATOR (InputDeviceKeyboard, AZ::SystemAllocator) | |
AZ_RTTI (InputDeviceKeyboard, "{CFD40F74-81DF-40B1-995B-F7142E6B1259}", InputDevice) | |
InputDeviceKeyboard (const InputDeviceId &inputDeviceId=Id, ImplementationFactory implementationFactory=&Implementation::Create) | |
AZ_DISABLE_COPY_MOVE (InputDeviceKeyboard) | |
~InputDeviceKeyboard () override | |
Destructor. | |
LocalUserId | GetAssignedLocalUserId () const override |
const InputChannelByIdMap & | GetInputChannelsById () const override |
AzFramework::InputDevice::GetInputChannelsById | |
bool | IsSupported () const override |
AzFramework::InputDevice::IsSupported | |
bool | IsConnected () const override |
AzFramework::InputDevice::IsConnected | |
bool | HasTextEntryStarted () const override |
AzFramework::InputTextEntryRequests::HasTextEntryStarted | |
void | TextEntryStart (const VirtualKeyboardOptions &options) override |
AzFramework::InputTextEntryRequests::TextEntryStart | |
void | TextEntryStop () override |
AzFramework::InputTextEntryRequests::TextEntryStop | |
void | TickInputDevice () override |
AzFramework::InputDeviceRequests::TickInputDevice | |
void | GetPhysicalKeyOrButtonText (const InputChannelId &inputChannelId, AZStd::string &o_keyOrButtonText) const override |
AzFramework::InputDeviceRequests::GetPhysicalKeyOrButtonText | |
void | SetImplementation (AZStd::unique_ptr< Implementation > impl) |
Public Member Functions inherited from AzFramework::InputDevice | |
AZ_CLASS_ALLOCATOR (InputDevice, AZ::SystemAllocator) | |
AZ_RTTI (InputDevice, "{29F9FB6B-15CB-4DB4-9F36-DE7396B82F3D}") | |
InputDevice (const InputDeviceId &inputDeviceId) | |
AZ_DISABLE_COPY_MOVE (InputDevice) | |
~InputDevice () override | |
Destructor. | |
const InputDevice * | GetInputDevice () const final |
AzFramework::InputDeviceRequests::GetInputDevice | |
const InputDeviceId & | GetInputDeviceId () const |
virtual LocalUserId | GetAssignedLocalUserId () const |
virtual void | PromptLocalUserSignIn () const |
virtual const InputChannelByIdMap & | GetInputChannelsById () const =0 |
virtual bool | IsSupported () const =0 |
virtual bool | IsConnected () const =0 |
Static Public Member Functions | |
static bool | IsKeyboardDevice (const InputDeviceId &inputDeviceId) |
static void | Reflect (AZ::ReflectContext *context) |
Static Public Member Functions inherited from AzFramework::InputDevice | |
static void | Reflect (AZ::ReflectContext *context) |
Static Public Attributes | |
static constexpr InputDeviceId | Id {"keyboard"} |
The id used to identify the primary physical keyboard input device. | |
Protected Types | |
using | KeyChannelByIdMap = AZStd::unordered_map< InputChannelId, InputChannelDigitalWithSharedModifierKeyStates * > |
Alias for verbose container class. | |
Protected Attributes | |
SharedModifierKeyStates | m_modifierKeyStates |
Shared modifier key states. | |
InputChannelByIdMap | m_allChannelsById |
All keyboard channels by id. | |
KeyChannelByIdMap | m_keyChannelsById |
All keyboard key channels by id. | |
Additional Inherited Members | |
Protected Member Functions inherited from AzFramework::InputDevice | |
void | BroadcastInputChannelEvent (const InputChannel &inputChannel) const |
void | BroadcastInputTextEvent (const AZStd::string &textUTF8) const |
void | BroadcastInputDeviceConnectedEvent () const |
Broadcast an event when the input device connects to the system. | |
void | BroadcastInputDeviceDisconnectedEvent () const |
Broadcast an event when the input device disconnects from the system. | |
void | ResetInputChannelStates () |
Reset the state of all this input device's associated input channels. | |
Defines a generic keyboard input device, including the ids of all associated input channels. Platform specific implementations are defined as private implementations so that creating an instance of this generic class will work correctly on any platform supporting keyboard input, while providing access to the device name and associated channel ids on any platform through the 'null' implementation (primarily so that the editor can use them to setup input mappings).
|
explicit |
Constructor
[in] | inputDeviceId | Optional override of the default input device id |
[in] | implementationFactory | Optional override of the default Implementation::Create |
|
overridevirtual |
Access to the input device's currently assigned local user id. By default this returns the device index, but can be overridden to return a platform specific user id in order to support platforms where input comes from a specific user rather than just an index. Values are guaranteed to be unique for the local system, but they are otherwise system dependent and a user id may not necessarily persist for the same user between app runs.
Reimplemented from AzFramework::InputDevice.
|
overridevirtual |
|
overridevirtual |
|
static |
Check whether an input device id identifies a physical keyboard (regardless of index)
[in] | inputDeviceId | The input device id to check |
|
overridevirtual |
|
inline |
Set the implementation of this input device
[in] | implementation | The new implementation |