class unreal.InputSettings(outer=None, name='None')

Bases: unreal.Object

Project wide settings for input handling https://docs.unrealengine.com/latest/INT/Gameplay/Input/index.html:

C++ Source:

  • Module: Engine
  • File: InputSettings.h

Editor Properties: (see get_editor_property/set_editor_property)

  • action_mappings (Array(InputActionKeyMapping)): [Read-Write] List of Action Mappings
  • alt_enter_toggles_fullscreen (bool): [Read-Write] Alt Enter Toggles Fullscreen
  • always_show_touch_interface (bool): [Read-Write] Should the touch input interface be shown always, or only when the platform has a touch screen?
  • axis_config (Array(InputAxisConfigEntry)): [Read-Write] List of Axis Properties
  • axis_mappings (Array(InputAxisKeyMapping)): [Read-Write] List of Axis Mappings
  • capture_mouse_on_launch (bool): [Read-Write] Controls if the viewport will capture the mouse on Launch of the application
  • console_keys (Array(Key)): [Read-Write] The keys which open the console.
  • default_touch_interface (SoftObjectPath): [Read-Write] The default on-screen touch input interface for the game (can be null to disable the onscreen interface)
  • default_viewport_mouse_capture_mode (MouseCaptureMode): [Read-Write] The default mouse capture mode for the game viewport
  • default_viewport_mouse_lock_mode (MouseLockMode): [Read-Write] The default mouse lock state behavior when the viewport acquires capture
  • double_click_time (float): [Read-Write] If a key is pressed twice in this amount of time it is considered a “double click”
  • enable_fov_scaling (bool): [Read-Write] Scale the mouse based on the player camera manager’s field of view
  • enable_gesture_recognizer (bool): [Read-Write] Whether or not to use the gesture recognition system to convert touches in to gestures that can be bound and queried
  • enable_mouse_smoothing (bool): [Read-Write] Mouse smoothing control
  • excluded_autocorrect_cultures (Array(str)): [Read-Write] Disables autocorrect for these cultures, even if autocorrect is turned on. These should be ISO-compliant language and country codes, such as “en” or “en-US”.
  • excluded_autocorrect_device_models (Array(str)): [Read-Write] Disables autocorrect for these device models, even if autocorrect is turned in. Model IDs listed here will match against the start of the device’s model (e.g., “SM-” will match all device model IDs that start with “SM-“). This is currently only supported on Android devices.
  • excluded_autocorrect_os (Array(str)): [Read-Write] Disables autocorrect for these operating systems, even if autocorrect is enabled. Use the format “[platform] [osversion]” (e.g., “iOS 11.2” or “Android 6”). More specific versions will disable autocorrect for fewer devices (“iOS 11” will disable autocorrect for all devices running iOS 11, but “iOS 11.2.2” will not disable autocorrect for devices running 11.2.1).
  • f11_toggles_fullscreen (bool): [Read-Write] F11Toggles Fullscreen
  • fov_scale (float): [Read-Write] The scaling value to multiply the field of view by
  • show_console_on_four_finger_tap (bool): [Read-Write] Whether or not to show the console on 4 finger tap, on mobile platforms
  • use_autocorrect (bool): [Read-Write] If enabled, virtual keyboards will have autocorrect enabled. Currently only supported on mobile devices.
  • use_mouse_for_touch (bool): [Read-Write] Allow mouse to be used for touch
add_action_mapping(key_mapping, force_rebuild_keymaps=True) → None

Programmatically add an action mapping to the project defaults

add_axis_mapping(key_mapping, force_rebuild_keymaps=True) → None

Programmatically add an axis mapping to the project defaults

force_rebuild_keymaps() → None

When changes are made to the default mappings, push those changes out to PlayerInput key maps

get_action_mapping_by_name(action_name) -> Array(InputActionKeyMapping)

Get Action Mapping by Name

Parameters:action_name (Name) –
Returns:out_mappings (Array(InputActionKeyMapping)):
Return type:Array(InputActionKeyMapping)
get_action_names() -> Array(Name)

Populate a list of all defined action names

Returns:action_names (Array(Name)):
Return type:Array(Name)
get_axis_mapping_by_name(axis_name) -> Array(InputAxisKeyMapping)

Retrieve all axis mappings by a certain name.

Parameters:axis_name (Name) –
Returns:out_mappings (Array(InputAxisKeyMapping)):
Return type:Array(InputAxisKeyMapping)
get_axis_names() -> Array(Name)

Populate a list of all defined axis names

Returns:axis_names (Array(Name)):
Return type:Array(Name)
classmethod get_input_settings() → InputSettings

Returns the game local input settings (action mappings, axis mappings, etc…)

Return type:InputSettings
remove_action_mapping(key_mapping, force_rebuild_keymaps=True) → None

Programmatically remove an action mapping to the project defaults

remove_axis_mapping(key_mapping, force_rebuild_keymaps=True) → None

Programmatically remove an axis mapping to the project defaults

save_key_mappings() → None

Flush the current mapping values to the config file