Shift not a recommended key?

Shift not a recommended key?

Postby Adventurer » 10 Sep 2015, 18:19

Hi, everyone!

I have a question. After binding the Shift key to a certain action, this warning appears: "Warning: The 'Shift' is not a recommended key. When 'Shift' is pressed down, all keys that contain a character that is different in upper-case will stop working." However, I cannot reproduce this - all of my keys seem to work properly in conjunction with Shift. For instance, I have "Shift" bound to skidding and "x" to looking back, and the game allows me to look back while skidding just fine. Am I misunderstanding something or is this a leftover message that isn't true anymore?
Adventurer
 
Posts: 3
Joined: 10 Sep 2015, 17:50

Re: Shift not a recommended key?

Postby Auria » 11 Sep 2015, 00:28

Hi,

actually I don't know if this is still relevant!
I do remember that in older versions we had issues on some systems (not even on all OSes, though I can't remember which OS had this issue). Basically on that OS, irrlicht would use a char code that would be different when shift was pressed. Maybe if people want to test with shift and see what happens, and we'll either find on OS this happens (and perhaps attempt a better fix), or discover the issue is outdated - I honestly don't know!
Image
User avatar
Auria
STK Moderator
 
Posts: 2976
Joined: 07 Dec 2009, 03:52

Re: Shift not a recommended key?

Postby deve » 11 Sep 2015, 05:35

It can work differently on different platforms. For example it will work for you on linux, but won't work on windows.
But it shouldn't be hard to solve if this problem still exists.
deve
 
Posts: 268
Joined: 23 Jan 2014, 13:45

Re: Shift not a recommended key?

Postby Adventurer » 11 Sep 2015, 13:27

Thank you both for shedding some light on this! I should have mentioned I am on Linux. Until a proper fix is found, perhaps it would be a good idea to replace "will" with "may" in the message to make it less confusing?
Adventurer
 
Posts: 3
Joined: 10 Sep 2015, 17:50

Re: Shift not a recommended key?

Postby Auria » 12 Sep 2015, 00:50

Maybe a good first step would be to create a ticket on github. Then anyone with some free time could take a look
Image
User avatar
Auria
STK Moderator
 
Posts: 2976
Joined: 07 Dec 2009, 03:52

Re: Shift not a recommended key?

Postby deve » 12 Sep 2015, 14:38

This warning has been added in 2010 in commit f18ead68201a0d23553ea17a6dcde41e257efbc7. It was before STK 0.7 release, which is rather old.

As I see, on linux it was always working because even in very old irrlicht you can see:
KeyMap.push_back(SKeyMap(XK_A, KEY_KEY_A));
KeyMap.push_back(SKeyMap(XK_B, KEY_KEY_B));
KeyMap.push_back(SKeyMap(XK_C, KEY_KEY_C));
(...)
KeyMap.push_back(SKeyMap(XK_a, KEY_KEY_A));
KeyMap.push_back(SKeyMap(XK_b, KEY_KEY_B));
KeyMap.push_back(SKeyMap(XK_c, KEY_KEY_C));

Both uppercase and lowercase keys are mapped to the same key. Just shift mask is different.

On windows it is written differently, but works for me too, at least under wine.

And irrlicht doesn't even have defined different key codes for uppercase and lowercase keys. It just has:
KEY_KEY_A = 0x41, // A key
KEY_KEY_B = 0x42, // B key
KEY_KEY_C = 0x43, // C key
etc. in Keycodes.h...
deve
 
Posts: 268
Joined: 23 Jan 2014, 13:45

Re: Shift not a recommended key?

Postby Adventurer » 12 Sep 2015, 14:43

I have opened an issue on the tracker: https://github.com/supertuxkart/stk-code/issues/2312 .
Adventurer
 
Posts: 3
Joined: 10 Sep 2015, 17:50

Who is online

Users browsing this forum: No registered users and 1 guest