Skip to content

InputPlumberProfile

Inherits: Resource

Resource for loading and saving InputPlumber Input Profiles

Description

This resource is used to load and save InputPlumber input profiles that can be used to remap gamepad inputs.

Properties

Type Name Default
int version 1
String kind "DeviceProfile"
String name
int[] target_devices
InputPlumberMapping[] mapping

Methods

Returns Signature
InputPlumberProfile load(path: String)
InputPlumberProfile from_dict(dict: Dictionary)
InputPlumberProfile from_json(json: String)
String get_target_device_string(target_device: int)
int get_target_device(target_device_str: String)
int save(path: String)
PackedStringArray get_mappings_source_capabilities()
InputPlumberMapping[] get_mappings_by_source_capability(source_capability: String)
Dictionary to_dict()
String to_json()

Property Descriptions

version

int version = 1

Version of the config

kind

String kind = "DeviceProfile"

Type of configuration schema

name

String name

Name of the profile

target_devices

int[] target_devices

Target input devices to emulate

mapping

InputPlumberMapping[] mapping

Input mappings


Method Descriptions

load()

InputPlumberProfile load(path: String)

Load the InputPlumberProfile in JSON format from the given path

from_dict()

InputPlumberProfile from_dict(dict: Dictionary)

Create an InputPlumberProfile from the given dictionary

from_json()

InputPlumberProfile from_json(json: String)

Create an InputPlumberProfile from the given JSON string

get_target_device_string()

String get_target_device_string(target_device: int)

Return the target device string for the given target device type

get_target_device()

int get_target_device(target_device_str: String)

Return the target device for the given target device string

save()

int save(path: String)

Save the profile to the given path in JSON format

get_mappings_source_capabilities()

PackedStringArray get_mappings_source_capabilities()

Returns an array of source capability strings for all mappings in the profile. I.e. this will return a list of every mapping.source_event property.

get_mappings_by_source_capability()

InputPlumberMapping[] get_mappings_by_source_capability(source_capability: String)

Return all mappings that match the given source capability. Most source capabilities will just have a single mapping, but some, like "GamepadAxis", may have multiple mappings associated with them (e.g. LeftStick -> KeyA, KeyW, KeyS, KeyD)

to_dict()

Dictionary to_dict()

Convert the profile to an easily serializable dictionary

to_json()

String to_json()

Serialize the profile to JSON