The Ur-Quan Masters Discussion Forum

The Ur-Quan Masters Re-Release => Technical Issues => Topic started by: Justin Z on August 09, 2011, 02:29:39 am



Title: Key reassignment in 0.7.0
Post by: Justin Z on August 09, 2011, 02:29:39 am
So in 0.6.2 I was able to edit a file--keys.cfg, I believe--in order to change my button assignments for menu select, menu cancel, and like, menu "enter."  These are set to buttons 1, 2 and 2 respectively by default (and maybe the second two are hard-coded to the same button).

Anyway, it would appear that flight.cfg is the file I need to modify to change these?  How would I go about doing that?

Thanks!


Title: Re: Key reassignment in 0.7.0
Post by: Novus on August 11, 2011, 05:18:16 pm
You're in the right directory, but you need a file called override.cfg.

See this thread (http://forum.uqm.stack.nl/index.php?topic=4905.0) for details.


Title: Re: Key reassignment in 0.7.0
Post by: onpon4 on August 23, 2011, 10:21:14 pm
Is there some small documentation on this anywhere? I did a quick search and didn't find any. The thread you linked to doesn't really provide much details, just a small example (and one I don't really understand, because I don't see where "select.6" and "cancel.6" come from).


Title: Re: Key reassignment in 0.7.0
Post by: Novus on August 28, 2011, 09:10:02 am
I can't find any documentation, so I'll give a brief explanation.

Basically, override.cfg is an extension to menu.key (http://sc2.svn.sourceforge.net/viewvc/sc2/trunk/sc2/content/menu.key?revision=3565&view=markup) and uses the same syntax. Basically, the format is:

<function name>.<definition number> = STRING:key <key name>

  • <function name> is what you want the key to do; look for the corresponding function in menu.key.
  • <definition number> is the number of the binding you want to change; you can bind several keys to the same function by giving them consecutive numbers. So, to add a binding like in the example, you use a definition number larger than the highest one used so far (in both menu.key and override.cfg). To change a previously defined key, use the same number.
  • <key name> is the name of the key you want to assign; for a list, see src/libs/input/sdl/keynames.c. (http://sc2.svn.sourceforge.net/viewvc/sc2/trunk/sc2/src/libs/input/sdl/keynames.c?revision=3210&view=markup)


Title: Re: Key reassignment in 0.7.0
Post by: Tamnosynth on December 09, 2011, 02:01:53 am
Hi,

I'm having a small but maddening problem with changing the keys in UQM 0.7.0.

I usually play using the arrow keys (not the number pad arrows), LeftCtrl for shooting / selecting and LeftShift for special weapon / menu cancelling.

However, I can't get LeftShift to open/cancel the menu--it stays RightShift.

It's been a while since I played UQM 0.6.2, but as far as I can remember, whatever key is assigned to 'Menu Cancel' should also open the menu if it's not already opened (e.g. when you're flying around in space and want to bring up the 'starmap/game/navigate' etc box).

I've done the following:
-Changed the keys in the UQM key config menu
-Changed the keys in the Notepad file 'Key Configuration', which appears in the Start menu under Program Files > Games > The Ur-Quan Masters. The last four lines now read as follows:

Menu-Cancel: key LeftShift
Template-1-Special: key LeftShift
Menu-Select: key LeftControl
Template-1-Weapon: key LeftControl

-Looked at the cfg files in the Application Data uqm folder but don't know what to do with them ('keys' looks identical to the Notepad file above, and 'flight' doesn't seem to include the menu commands).

I had similar troubles with 0.6.2. Actually, it was worse in that case, as Fire and Special stubbornly stayed RightCtrl and RightShift no matter what I did until I tracked down the cfg files. In 0.7.0 I've had no trouble changing the weapon controls from the in-game setup menu. It's just using LeftShift to open the menu that doesn't work.

I've read the advice above, but I'm having trouble understanding it (and I'm not sure if it's appropriate to my situation). I'm not very tech-savvy, so please talk me through in baby language!  :)