unreal.InputSettings
¶
- class unreal.InputSettings(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
Object
Project wide settings for input handling see: 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 Mappingsalt_enter_toggles_fullscreen
(bool): [Read-Write]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 Propertiesaxis_mappings
(Array[InputAxisKeyMapping]): [Read-Write] List of Axis Mappingscapture_mouse_on_launch
(bool): [Read-Write] Controls if the viewport will capture the mouse on Launch of the applicationconsole_keys
(Array[Key]): [Read-Write] The keys which open the console.default_input_component_class
(Class): [Read-Write] Default class type for pawn input components.default_player_input_class
(Class): [Read-Write] Default class type for player input object. May be overridden by player controller.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 viewportdefault_viewport_mouse_lock_mode
(MouseLockMode): [Read-Write] The default mouse lock state behavior when the viewport acquires capturedouble_click_time
(float): [Read-Write] If a key is pressed twice in this amount of time it is considered a “double click”enable_dynamic_component_input_binding
(bool): [Read-Write] Should components that are dynamically added via the ‘AddComponent’ function at runtime have input delegates bound to them? see: AActor::FinishAddComponentenable_fov_scaling
(bool): [Read-Write] Scale the mouse based on the player camera manager’s field of viewenable_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 queriedenable_input_device_subsystem
(bool): [Read-Write] If true, then the input device subsystem will be allowed to Initalize when the engine boots. NOTE: For this setting to take effect, and editor restart is required. see: UInputDeviceSubsystemenable_legacy_input_scales
(bool): [Read-Write] Enable the use of legacy input scales on the player controller (InputYawScale, InputPitchScale, and InputRollScale)enable_motion_controls
(bool): [Read-Write] If set to false, then the player controller’s InputMotion function will never be called. This will effectively disable any motion input (tilt, rotation, acceleration, etc) on the GameViewportClient. see: GameViewportClient::InputMotionenable_mouse_smoothing
(bool): [Read-Write] Mouse smoothing controlexcluded_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]filter_input_by_platform_user
(bool): [Read-Write] If true, then the PlayerController::InputKey function will only process an input event if it came from an input device that is owned by the PlayerController’s Platform User.fov_scale
(float): [Read-Write] The scaling value to multiply the field of view byplatform_settings
(PerPlatformSettings): [Read-Write] Platform specific settings for Input. see: UInputPlatformSettingsshould_flush_pressed_keys_on_viewport_focus_lost
(bool): [Read-Write] If true, then the Player Controller will have it’s Pressed Keys flushed when the input mode is changed to Game and UI mode or the game viewport loses focus. The default behavior is true. see: UGameViewportClient::LostFocus see: APlayerController::ShouldFlushKeysWhenViewportFocusChangesshow_console_on_four_finger_tap
(bool): [Read-Write] Whether or not to show the console on 4 finger tap, on mobile platformsspeech_mappings
(Array[InputActionSpeechMapping]): [Read-Write] List of Speech Mappingsuse_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
- Parameters:
key_mapping (InputActionKeyMapping) –
force_rebuild_keymaps (bool) –
- add_axis_mapping(key_mapping, force_rebuild_keymaps=True) None ¶
Programmatically add an axis mapping to the project defaults
- Parameters:
key_mapping (InputAxisKeyMapping) –
force_rebuild_keymaps (bool) –
- 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:
- 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:
- classmethod get_input_settings() InputSettings ¶
Returns the game local input settings (action mappings, axis mappings, etc…)
- Return type:
- remove_action_mapping(key_mapping, force_rebuild_keymaps=True) None ¶
Programmatically remove an action mapping to the project defaults
- Parameters:
key_mapping (InputActionKeyMapping) –
force_rebuild_keymaps (bool) –
- remove_axis_mapping(key_mapping, force_rebuild_keymaps=True) None ¶
Programmatically remove an axis mapping to the project defaults
- Parameters:
key_mapping (InputAxisKeyMapping) –
force_rebuild_keymaps (bool) –