Selecting Response with a Custom Key?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
DrewThomasArt
Posts: 60
Joined: Thu Mar 24, 2022 12:07 am

Selecting Response with a Custom Key?

Post by DrewThomasArt »

The "C" key is the interact button for my entire game, so I'd like to be able to select responses with it, and I can't find out how. It seems to work with "enter" as the default, but I'd like to switch or add "C" to that. I'm using the Runic Dialogue UI if that helps.

Any help is greatly appreciated!
User avatar
Tony Li
Posts: 22143
Joined: Thu Jul 18, 2013 1:27 pm

Re: Selecting Response with a Custom Key?

Post by Tony Li »

Hi,

The dialogue UIs use standard Unity UI input, which is controlled by the EventSystem GameObject's input module.

If you're using Unity's built-in input manager, the EventSystem's input module is called StandaloneInputModule. This component has a field named "Submit Button" that is set to "Submit". "Submit" is an input defined in the input manager. When the player presses this input, it "clicks" the currently-focused UI button.

To add the C key to the "Submit" input, select menu item Edit > Project Settings. On the left hand side, click Input Manager. On the right hand side, expand Axes, and locate the entries for Submit. You can either replace one of the Positive Button or Alt Positive Button values (e.g., change "space" to "c") or add a new Submit entry just for "c".
DrewThomasArt
Posts: 60
Joined: Thu Mar 24, 2022 12:07 am

Re: Selecting Response with a Custom Key?

Post by DrewThomasArt »

Tony Li wrote: Thu Oct 13, 2022 9:51 pm Hi,

The dialogue UIs use standard Unity UI input, which is controlled by the EventSystem GameObject's input module.

If you're using Unity's built-in input manager, the EventSystem's input module is called StandaloneInputModule. This component has a field named "Submit Button" that is set to "Submit". "Submit" is an input defined in the input manager. When the player presses this input, it "clicks" the currently-focused UI button.

To add the C key to the "Submit" input, select menu item Edit > Project Settings. On the left hand side, click Input Manager. On the right hand side, expand Axes, and locate the entries for Submit. You can either replace one of the Positive Button or Alt Positive Button values (e.g., change "space" to "c") or add a new Submit entry just for "c".
Thank you!
User avatar
Tony Li
Posts: 22143
Joined: Thu Jul 18, 2013 1:27 pm

Re: Selecting Response with a Custom Key?

Post by Tony Li »

Happy to help!
Post Reply