Godot Version
v4.3.stable.official [77dcf97d8]
Question
I’m looking to enhance my game’s input controls by integrating a MIDI keyboard. To achieve this, I need to incorporate MIDI input events into the game’s InputMap, which is the same one found in the project settings.
Here’s the function I’ve created for this purpose:
func add_midi_inputs() -> void:
OS.open_midi_inputs()
var input:InputEvent = InputEventMIDI.new()
input.message = 11
InputMap.action_add_event(&"DEBUG QUIT", input)
This code doesn’t produce any errors, but I’m concerned that the InputMap being modified is not the global one used throughout the game, but rather a newly instantiated object.