Jump to content

Can't create groups


Arcana33
 Share

Recommended Posts

Hello,

Since I started to play the Alpha XXII, I've noticed one thing : I can't create groups of unit anymore (by pressing CTRL + 1 - 2 - 3 ...). Am I doing something wrong in the command or is there any sort of bug or something else that I don't know about ?

Link to comment
Share on other sites

Previously when people have had an issue with creating control groups, it's been because of the interaction between the game and their keyboard (most if not all cases: they've had a non-qwerty keyboard), but that doesn't seem likely in your case if it's been working previously. Has something changed with your keyboard? (Or have you gotten a new one?)

  • Like 2
Link to comment
Share on other sites

I heard that from a different user too.

The hotkey code didn't change at all in Alpha 22, except this one commit rP19624 / D303. It doesn't look like it could cause a bug like that.

You could checkout the code, remove the two new lines in that patch  and compile the game (see BuildInstructions) to see if it changes the result.

With the below patch, you could also display the actual SDL keycode of any pressed key. It should be 49 if you press the "1" key.

Perhaps we could also consider whether SDL2 is stupid and assumes your number keys to be keypad keys, but I doubt it. https://wiki.libsdl.org/SDL_Keycode

Index: source/ps/Hotkey.cpp
===================================================================
--- source/ps/Hotkey.cpp	(revision 20095)
+++ source/ps/Hotkey.cpp	(working copy)
@@ -161,6 +161,9 @@
 	case SDL_KEYDOWN:
 	case SDL_KEYUP:
 		keycode = (int)ev->ev.key.keysym.sym;
+		LOGWARNING("Pressed SDL keycode is %d", keycode);
+		LOGWARNING("The button 1 is expected to have the value %d", SDLK_1);
+		LOGWARNING("The keypad button 1 is %d", SDLK_KP1);
 		break;
 
 	case SDL_MOUSEBUTTONDOWN:
  • Thanks 1
Link to comment
Share on other sites

I did test it again, it works for me with NEO 2 on arch. I'm not sure if I just remembered an old version or used the wrong hotkeys back then. (On both the last Alpha 22 and a somewhat recent svn build.)

Thanks for the patch, I'll keep it in mind if I ever have troubles again.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...