generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Control Characters

Previous Thread :: Next Thread 
BunnyBoy26 is not online. BunnyBoy26
Joined: 17 Jun 2010
Total Posts: 5674
07 Nov 2014 02:31 PM
What is the control character for both shifts?
While you're at it, a list of all the control characters would come in handy.
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
07 Nov 2014 02:37 PM
mouse.KeyDown:connect(function(key)
if key:byte() == NUMBER then
--blah
end
end)

Replace NUMBER with one of the numbers from this list

http://wiki.roblox.com/index.php?title=Taking_keyboard_input#Full_list
Report Abuse
BunnyBoy26 is not online. BunnyBoy26
Joined: 17 Jun 2010
Total Posts: 5674
07 Nov 2014 02:38 PM
Many thanks!
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
07 Nov 2014 02:41 PM
Mouse!?

That useless Instance!?

Please, UserInputService!
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
07 Nov 2014 02:43 PM
^ Please, use UserInputService just if you want to look like a boss or a showoff.

I mean sure, it has some cool events, but not anything outside this service we can already do with the mouse.
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
07 Nov 2014 02:44 PM
Different number/special keys...

Use of the entire keyboard, Esc included...

Getting focus/defocus of a window...

Get mouse delta even whilst cursor position is locked...

Control over mobile D-Pad...

Get if the user is on a Mobile device...
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
07 Nov 2014 02:46 PM
Oh, and touch input/accelerometer/gyroscope for Mobile devices! Cant forget that!
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
07 Nov 2014 02:51 PM
Yeah, it's of course used for mobile devices, but else than that I just feel like sticking with the "old" method.
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
07 Nov 2014 02:52 PM
It's quite good, but I just don't take time to use it since I just prefer the "Old" method, alot faster and most stuff in the input service can be quite specific.
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
07 Nov 2014 02:52 PM
So I take it pressing "0" and having the shift key pressed is not annoying?
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
07 Nov 2014 02:55 PM
Well, I'd use inputservice if I HAD to. But I won't use it often.
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
07 Nov 2014 02:56 PM
I find its far easier to just set it up to use UserInputService to begin with, bypassing all future issues (Namely: If you use Mouse, you cannot check for special character/number input)
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
07 Nov 2014 03:01 PM
Oh, an example for BunnyBoy26:

--Will not work as expected in Studio, test online.
game:GetService("UserInputService").InputBegan:connect(function(input)
if input.UserInputType == Enum.UserInputType.Keyboard then
local key = input.KeyCode
if key == Enum.KeyCode.LeftShift then
print("Left shift pressed!")
elseif key == Enum.KeyCode.RightShift then
print("Right shift pressed!")
end
end
end)
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
07 Nov 2014 03:12 PM
Fedora, I have a module script for UserInputService, to make it act more like Mouse. It is undocumented, and doesn't include functions for anything other than PC, but you can sure use it. :P
Report Abuse
BunnyBoy26 is not online. BunnyBoy26
Joined: 17 Jun 2010
Total Posts: 5674
10 Nov 2014 03:21 PM
Thanks for the suggestion to use userinputservice, but I am actually editing an old model.
Report Abuse
powertool is not online. powertool
Joined: 01 Feb 2008
Total Posts: 3771
10 Nov 2014 03:24 PM
I'd have to dig through some old scripts. I have the left shift's keycode saved in there. It's close to 40something if I recall correctly. Let me find it.
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
10 Nov 2014 04:48 PM
@powertool: I think its "0", or "9".
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image