How do i get the "character input" from the keyboard?

So how would I get the the “character input” in the best way. What I mean by “character input” is getting the “actual” character from the keyboard, for example:

when pressing "shift+1 " it should return "! " instead of "1 "

Is this even possible?

Yes! I’d suggest reading the docs here: UserInputService | Documentation - Roblox Creator Hub

It looks like you want to ROBLOX to detect double-inputs instead of single inputs.
You can try using a dictionary of certain double-inputs (in this case ! )

local inputs = {
	["!"] = {
		Enum.KeyCode.LeftShift,
		Enum.KeyCode.One
	},
	
	["@"] = {
		Enum.KeyCode.LeftShift,
		Enum.KeyCode.Two
	}
}

Then let UserInputService detect these inputs in some way.

ROBLOX has a sort of double-input system with their Freecam. You can try dissecting their piece of code.

Hope this helps.

1 Like

You would do that using a Textbox.
You can make it invisible so that the user can’t see it and capture what they were typing using the :CaptureFocus() method

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.