Keyboard case-sensitive key codes

Get help using Construct 2

Post » Fri Sep 06, 2013 3:41 pm

I'm trying to use the Keyboard object to capture all pressed keys, but it seems the keycode always shows the same code independently if it is lower case or upper case.

I understand that it is probably the most used way, but I have a particular case where I need the actual key pressed. It should work on Desktop or Mobile, but if I can get it work on desktop now, it would be great (it seems keyboard doesn't listen to mobile virtual keyboard, right)

Any idea on how to do it?

Thanks

B
4
S
1
Posts: 8
Reputation: 691

Post » Fri Sep 06, 2013 4:22 pm

Try also testing for if the key code for shift is currently down.
Scirra Founder
B
397
S
236
G
88
Posts: 24,408
Reputation: 194,486

Post » Fri Sep 06, 2013 4:49 pm

Thanks for the idea. Yes, that is working fine.

It also reports Caplocks, but it with this one I will have to assume the initial state and toggle it as the key is pressed.

Now, for mobiles, what would be the approach to track the virtual keyboard key down/press? Write specific plugins for each device/os?

Thanks




B
4
S
1
Posts: 8
Reputation: 691


Return to How do I....?

Who is online

Users browsing this forum: adventurist, Blendi1223, Lancifer, landily, leonardoer1, newt, PROxMTswatTR, ST314 and 22 guests