Page 1 of 1
Shift not a recommended key?

Posted:
10 Sep 2015, 18:19
by Adventurer
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?
Re: Shift not a recommended key?

Posted:
11 Sep 2015, 00:28
by Auria
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!
Re: Shift not a recommended key?

Posted:
11 Sep 2015, 05:35
by deve
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.
Re: Shift not a recommended key?

Posted:
11 Sep 2015, 13:27
by Adventurer
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?
Re: Shift not a recommended key?

Posted:
12 Sep 2015, 00:50
by Auria
Maybe a good first step would be to create a ticket on github. Then anyone with some free time could take a look
Re: Shift not a recommended key?

Posted:
12 Sep 2015, 14:38
by deve
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...
Re: Shift not a recommended key?

Posted:
12 Sep 2015, 14:43
by Adventurer