unreal.InputDeviceState

class unreal.InputDeviceState(input_device: InputDevices = Ellipsis, shift_key_down: bool = False, alt_key_down: bool = False, ctrl_key_down: bool = False, cmd_key_down: bool = False, keyboard: KeyboardInputDeviceState = Ellipsis, mouse: MouseInputDeviceState = Ellipsis)

Bases: StructBase

Current state of physical input devices at a point in time. Assumption is that the state refers to a single physical input device, ie InputDevice field is a single value of EInputDevices and not a combination.

C++ Source:

  • Module: InteractiveToolsFramework

  • File: InputState.h

Editor Properties: (see get_editor_property/set_editor_property)

  • alt_key_down (bool): [Read-Write] Is they keyboard ALT modifier key currently pressed down

  • cmd_key_down (bool): [Read-Write] Is they keyboard CMD modifier key currently pressed down (only on Apple devices)

  • ctrl_key_down (bool): [Read-Write] Is they keyboard CTRL modifier key currently pressed down

  • input_device (InputDevices): [Read-Write] Which InputDevice member is valid in this state

  • keyboard (KeyboardInputDeviceState): [Read-Write] Current state of Keyboard device, if InputDevice == EInputDevices::Keyboard

  • mouse (MouseInputDeviceState): [Read-Write] Current state of Mouse device, if InputDevice == EInputDevices::Mouse

  • shift_key_down (bool): [Read-Write] Is they keyboard SHIFT modifier key currently pressed down

property alt_key_down: bool

[Read-Write] Is they keyboard ALT modifier key currently pressed down

Type:

(bool)

property cmd_key_down: bool

[Read-Write] Is they keyboard CMD modifier key currently pressed down (only on Apple devices)

Type:

(bool)

property ctrl_key_down: bool

[Read-Write] Is they keyboard CTRL modifier key currently pressed down

Type:

(bool)

property input_device: InputDevices

[Read-Write] Which InputDevice member is valid in this state

Type:

(InputDevices)

property keyboard: KeyboardInputDeviceState

[Read-Write] Current state of Keyboard device, if InputDevice == EInputDevices::Keyboard

Type:

(KeyboardInputDeviceState)

property mouse: MouseInputDeviceState

[Read-Write] Current state of Mouse device, if InputDevice == EInputDevices::Mouse

Type:

(MouseInputDeviceState)

property shift_key_down: bool

[Read-Write] Is they keyboard SHIFT modifier key currently pressed down

Type:

(bool)