Change in how keyboard shortcuts work in Spring 98

Change in how keyboard shortcuts work in Spring 98

Hearken back to the days of yore and enjoy the first major Spring module!

Moderators: Moderators, Content Developer

Post Reply
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Change in how keyboard shortcuts work in Spring 98

Post by Jools »

TL:DR Custom keymappings in uikeys.txt may need to be changed

Because Spring 98.0 upgraded SDL version from 1.2 to 2.0, some keyboard key values have changed and need to be adjusted if you have used custom keyboard shortcuts in uikeys. I think the default Spring shortcuts will be automatically adjusted, but because keyboard layouts differ, not all cases can be taken into account. For instance, the default shortcuts for rotating buildings are the [ and ] keys, but because these are not great keys to use for e.g. German and Scandinavian keyboards, see images below, (you need to press altgr+8/9 to use them), many people have assigned their own keys to this function in uikeys.txt.

For example, I have bound the "rotate buildings" command to the key next to backspace, the ´ key (acute accent) . To bind this key to rotate buildings in spring 98 you add these lines to uikeys.txt:

Code: Select all

keysym	acc				0xB4
bind  	acc				buildfacing inc
You can of course use any other name instead of "acc".

Similarly, if you have any commands bound to other keys specific to your keyboard, you may need to change the keyvalues. Here are some new values that apply for spring 98:

Code: Select all

keysym 			aring 			0x0E5 (the Å key)
keysym 			ae	  			0x0E4 (the Ä key)
keysym			oe				0x0F6 (the Ö key)
keysym			acc				0xB4 (acute accent)

If you want to obtain the key value of any key, you can type /keydebug in chat, which will list the hex-value of that key when you press it, along with any commands bound to it. After you have the key value you can use the above written method to bind any commands to that key.

I know this looks quite complicated, but it's really only 2 steps you have to do, and you only have to do it once.

English keyboard:

Image

German keyboard:

Image

Swedish keyboard: (I think Finnish is exactly same)

Image

More info:

* related forum help post: http://springrts.com/phpbb/viewtopic.php?f=11&t=25043

* wiki: http://springrts.com/wiki/Uikeys.txt

* list of default bindings:
https://github.com/spring/spring/blob/9 ... uikeys.txt

or you can type /keysave to have the game save current bindings to a file called uikeys.tmp in spring folder.
Post Reply

Return to “XTA”