UIS and the Tilde key

Apparently UserInputService does not detect the Tilde key, unless I’m mistaking the ~ key for something else.

1 Like

You’re right. Even if I disable the Backpack it won’t detect it. Looks like a bug.

Also repro code:

game.StarterGui:SetCoreGuiEnabled("Backpack", false)
uis = game:GetService("UserInputService")
while true do
	wait()
	print( uis:IsKeyDown(Enum.KeyCode.Tilde) )
end

Might be related to right and left bumpers not firing when backpack is enabled. But this time it doesn’t matter if it’s enabled or not.

1 Like

Tilde specifically refers to the uppercase form of that key. You’ll see the same behavior if you listen for QuestionMark, Percent, etc. since only the lowercase will fire. You need to listen for Backqoute, I think.

8 Likes

Wow backquote? I was looking for “grave” on the keycodes page. I must have forgotten it was also called backquote. ested and works - and it fires even if backpack is enabled of course. Well mark this as solved @GuestCapone

If you’re having trouble detecting a key, print the keycode whenever a key is pressed, makes it easy to know what keycode you need to look for.

What about Tab in studio :( It doesn’t print anything when I press it. I want to use it as a plugin shortcut so much :( :( :( :( :( :( :(

Play solo…? Just print any keypress.

Tab presses don’t get printed at all (not even KeyCode.Unknown) because Studio intercepts tab presses for some silly base Windows program functionality that isn’t useful to us at all.

Well that works. Thanks.

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