How to rebind the chat key!

Why I’m doing this:
I’m making this tutorial to help people, I’ve seen people ask how they can do it, and I myself have even asked how I can do it. Most people don’t know how to do it or they think it’s not possible. So once I figured out how to do it, I decided to make this tutorial to help other people.

Notes:
I suggest you have at least average scripting knowledge of Lua before proceeding with this tutorial.

What I’m Doing:
I’m going to quickly run down how you can change the chat hotkey, and I’m going to include clips to help people that don’t like to read a lot.

How to add the chat contents:
To start, what you need to do is click the play button. Once you have done that, scroll over to the “Chat” section and copy all of the contents, after that, click “Stop” to stop the play.


After all the contents are copied, paste them into the “Chat” section out of the game.

Once you have done those steps, widen the LocalScript called “ChatScript” and double click the module called “ChatMain” under it.

Editing the hotkey:
Now that you have done that and you’re inside the script, scroll down to line 39 and edit the part that says FFlagUserHandleChatHotKeyWithContextActionService = value to say FFlagUserHandleChatHotKeyWithContextActionService = true

and then hit CTRL+G on your keyboard and enter 537 for the line number, and click OK.

Find the code that says Enum.KeyCode.Slash, change the Slash to what you wish the hotkey will be. I’m going to choose T.
Once you have done the editing, scroll up to line 533 and find the text that says Enum.UserInputState.Begin and change the Begin to End. While you’re at it, find the text on line 528 that says
if FFlagUserHandleChatHotKeyWithContextActionService then and change it to
if FFlagUserHandleChatHotKeyWithContextActionService == true then just to make things easier to understand if you end up changing something later.

Go back to the explorer and find “ChatScript”, it should be just above the ChatMain module. After you have done that, go to line 10 and change the part that says FFlagUserHandleChatHotKeyWithContextActionService = value to say FFlagUserHandleChatHotKeyWithContextActionService = true


What changing the value to true does; it forces the value to always go with the hotkey you changed it to.

The end!
Now you should be able to go in game, hit the hotkey you decided to use and it should open the in game chat! Hope this helped!

10 Likes

On a question I found on the forums here, someone wanted to change the keybind because their keyboard wasn’t compatible with the QWERTY keybinds making the chat keybind different and harder to access.

FYI: you should only be forking the part of the chat that you’re actually editing. If you are just editing the chat’s keybind then you only need to fork the ChatScript LocalScript, not the other objects. Those can be deleted and you can leave the engine to fill those components in at the start of the server.

4 Likes

I should have mentioned that. It’s just my personal pet peeve to have everything on the ready.

thanks, might use this in my future games, looks cool and more compatible than “/” :+1:

1 Like