|
| 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
|
  |
| 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 |
|
|
| |
|
|
| 07 Nov 2014 02:41 PM |
Mouse!?
That useless Instance!?
Please, UserInputService! |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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 |
|
|
|
| 07 Nov 2014 02:46 PM |
| Oh, and touch input/accelerometer/gyroscope for Mobile devices! Cant forget that! |
|
|
| Report Abuse |
|
|
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
|
  |
| 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 |
|
|
|
| 07 Nov 2014 02:52 PM |
| So I take it pressing "0" and having the shift key pressed is not annoying? |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 10 Nov 2014 03:21 PM |
| Thanks for the suggestion to use userinputservice, but I am actually editing an old model. |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 10 Nov 2014 04:48 PM |
| @powertool: I think its "0", or "9". |
|
|
| Report Abuse |
|
|