Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

What's the key byte code for 'ctrl'?

Asked by
Marolex 45
10 years ago

I was wondering, whats the byte code for 'ctrl' or 'Control'? I read on a java forum that it's 17 but that didn't work :/

4 answers

Log in to vote
1
Answered by
BlueTaslem 18071 Moderation Voter Administrator Community Moderator Super Administrator
10 years ago

You can test yourself easily enough:

game.Players.LocalPlayer:GetMouse().KeyDown:connect(function(key) print(key,key:byte()); end);

For some reason for me it is giving 50 (which corresponds also to the 2 key for some reason?)

0
Thanks! that's a cool tricks too. Marolex 45 — 10y
Ad
Log in to vote
1
Answered by
Asleum 135
10 years ago

Ctrl is 50. In the future, if you need more byte codes, use this short script, it tells you the code of the keys you've pressed :

game.Players.LocalPlayer:GetMouse().KeyDown:connect(function(Key)
    print(string.byte(Key))
end)
Log in to vote
1
Answered by 10 years ago

I think it's 17, that's what I've gotten before.

Log in to vote
-1
Answered by
Dominical 215 Moderation Voter
10 years ago

This table has helped me SOOOO much with ASCCI codes: http://www.asciitable.com/

Answer this question