unreal.InputSettings
¶
- class unreal.InputSettings(outer: Optional[Object] = None, name: Union[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] Action Mappings: List of Action Mappingsalt_enter_toggles_fullscreen
(bool): [Read-Write] Alt Enter Toggles Fullscreenalways_show_touch_interface
(bool): [Read-Write] Always Show Touch Interface: Should the touch input interface be shown always, or only when the platform has a touch screen?axis_config
(Array[InputAxisConfigEntry]): [Read-Write] Axis Config: List of Axis Propertiesaxis_mappings
(Array[InputAxisKeyMapping]): [Read-Write] Axis Mappings: List of Axis Mappingscapture_mouse_on_launch
(bool): [Read-Write] Capture Mouse on Launch: Controls if the viewport will capture the mouse on Launch of the applicationconsole_keys
(Array[Key]): [Read-Write] Console Keys: The keys which open the console.default_input_component_class
(Class): [Read-Write] Default Input Component Class: Default class type for pawn input components.default_player_input_class
(Class): [Read-Write] Default Player Input Class: Default class type for player input object. May be overridden by player controller.default_touch_interface
(SoftObjectPath): [Read-Write] Default Touch Interface: 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] Default Viewport Mouse Capture Mode: The default mouse capture mode for the game viewportdefault_viewport_mouse_lock_mode
(MouseLockMode): [Read-Write] Default Viewport Mouse Lock Mode: The default mouse lock state behavior when the viewport acquires capturedouble_click_time
(float): [Read-Write] Double Click Time: 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] Enable Dynamic Component Input Binding: 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] Enable FOVScaling: Scale the mouse based on the player camera manager’s field of viewenable_gesture_recognizer
(bool): [Read-Write] Enable Gesture Recognizer: Whether or not to use the gesture recognition system to convert touches in to gestures that can be bound and queriedenable_legacy_input_scales
(bool): [Read-Write] Enable Legacy Input Scales: Enable the use of legacy input scales on the player controller (InputYawScale, InputPitchScale, and InputRollScale)enable_motion_controls
(bool): [Read-Write] Enable Motion Controls: 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] Enable Mouse Smoothing: Mouse smoothing controlexcluded_autocorrect_cultures
(Array[str]): [Read-Write] Excluded Autocorrect Cultures: 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] Excluded Autocorrect Device Models: 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] Excluded Autocorrect OS: 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 Fullscreenfilter_input_by_platform_user
(bool): [Read-Write] Filter Input by Platform User: 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] FOVScale: The scaling value to multiply the field of view byshould_flush_pressed_keys_on_viewport_focus_lost
(bool): [Read-Write] Should Flush Pressed Keys on Viewport Focus Lost: 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] Show Console on Four Finger Tap: Whether or not to show the console on 4 finger tap, on mobile platformsspeech_mappings
(Array[InputActionSpeechMapping]): [Read-Write] Speech Mappings: List of Speech Mappingsuse_autocorrect
(bool): [Read-Write] Use Autocorrect: If enabled, virtual keyboards will have autocorrect enabled. Currently only supported on mobile devices.use_mouse_for_touch
(bool): [Read-Write] Use Mouse for Touch: 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) –