An example would be the default chat system in-game, where pressing "/" automatically begins typing.
✓ ANSWER ACCEPTED
Is there a way to start typing in a text box by detecting a key press?
2 answers
✓ Accepted answer
There is a method TextBox:CaptureFocus() to make a user start typing in that textbox.
(Thanks to einsteinK for saying about the Capture Focus method!)
You are talking about the wonderful UserInputService!
For an example of this,
local service = game:GetService("UserInputService") -- The service required to detect UserInput
local gui = script.Parent --My gui
service.InputBegan:connect(function(keyPressed,gameProcessedEvent) --Connect the function
if gameProcessedEvent then
return end
if keyPressed.KeyCode == Enum.KeyCode.Slash then --If "/" then do...
gui.TextBox:CaptureFocus() --To start typing.
end
end)
Hope I helped!
THIS MUST BE A LOCAL SCRIPT
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
also add "if gameProcessedEvent then return end" otherwise it'll capture the textbox every time you press slash, even while already entering text in another textbox
Ah, thank you.