How do I make a button do an Input Map Input?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Ultraic

How do I make it so that “Button” (in this case I named it “Right”)
Do an event/input from the input?
Like, make it so that it does “move_right” in the input map when pressed?
This is a touchscreen and pc application and I can’t get the touchscreen buttons to work either.
It also needs to be able so that you can use more than 1 of these and at the same time too.
Like one for going left, jumping, and others too.

:bust_in_silhouette: Reply From: flurick


I’m sorry if I was unclear but that’s not what I mean sir.
I meant not to make a button make a new inputevent in the inputmap but make a button
do an inputevent, as in when I press this button, do “move_left”, not make “move_left”
Sorry if I was very unclear but thanks for answering!

Ultraic | 2019-03-19 08:10

:bust_in_silhouette: Reply From: Kaan Alpar

This might be what you are looking for: Input.action_press(input_name)