How do I read the Left and Right Shift keys (SOLVED)

Get help using Construct 2

Post » Thu Dec 29, 2016 11:20 pm

This question is because I am designing a Pinball Sandbox game that will allow users to create their own realistic pinball games and share them with friends.

I have the game set up to use arrow keys and I will addd touch and mouse control but old school pinballers like to use the Shift keys as that is what is used in Visual Pinball.

The problem is C2 just reads both keys as shift so I had to use Z and / instead and I would like to use the shift keys if possible.

So has anyone got any ideas and maybe this is something Ashley can bring up as a fix for C2?

Here is my Demo:

https://www.scirra.com/arcade/tutorial-games/pinball-physics-demo-13984

Image
Last edited by lamar on Fri Dec 30, 2016 2:51 am, edited 1 time in total.
Banned User
B
28
S
7
G
58
Posts: 1,229
Reputation: 34,830

Post » Thu Dec 29, 2016 11:47 pm

I know the keycode for both shift keys are the same (16), so I don't think it's possible. Not easily anyway.

Edit: I dug up these old posts. Not sure if they'll help or not though.
how-do-i-detect-left-shift-right-shift_t106884
viewtopic.php?f=153&t=118462&p=850944
B
62
S
20
G
56
Posts: 1,077
Reputation: 36,021

Post » Fri Dec 30, 2016 12:17 am

Burvey wrote:I know the keycode for both shift keys are the same (16), so I don't think it's possible. Not easily anyway.

Edit: I dug up these old posts. Not sure if they'll help or not though.
how-do-i-detect-left-shift-right-shift_t106884
viewtopic.php?f=153&t=118462&p=850944


Thanks and that is what I suspected. Maybe Ashley will figure it out for a C2 update.
Banned User
B
28
S
7
G
58
Posts: 1,229
Reputation: 34,830

Post » Fri Dec 30, 2016 12:31 am

B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

Post » Fri Dec 30, 2016 2:15 am

korbaach wrote:try
LeftShiftRight.capx


Right on Korbach- you are the man!

Why hasn't someone done a tutorial on this or maybe they have?

Ashley should include a function in the next update to read those keys.

Now I can plug that in to my game tomorrow and make some old school pinballers happy and get them off my neck lol!
Banned User
B
28
S
7
G
58
Posts: 1,229
Reputation: 34,830

Post » Fri Dec 30, 2016 3:24 am

The only issue with that is the same drawback as with the plugin. You can't click them both at the same time (at least not as is).
B
62
S
20
G
56
Posts: 1,077
Reputation: 36,021

Post » Fri Dec 30, 2016 11:03 pm

Burvey wrote:The only issue with that is the same drawback as with the plugin. You can't click them both at the same time (at least not as is).


Yup Burvey you are right and that won't work for my pinball game but might help people wanting to use shift keys for other games.

I switched to Left Shift and Control for my game and that works well.

Just so people know- not all keys are fast repeating keys like the arrow keys and they have a built in lag after you press so if you want to use fast repeater keys the shift and control and tab keys are fast repeaters for games.

If you want to hold a button down with no lag time after the first press use those keys.
Banned User
B
28
S
7
G
58
Posts: 1,229
Reputation: 34,830


Return to How do I....?

Who is online

Users browsing this forum: dop2000, jatin1726, max2612, Yahoo [Bot] and 5 guests