Page 1 of 1

I want to unbind and rebind

Posted: 01 Apr 2011, 10:51
by Forboding Angel
I want to unbind fps mode from c, and bind capture to it. Now I know how to bind c to capture, but I have no idea how to unbind fps mode. Am I missing something simple?

If someone feels like saving me the time of figuring it out, by all means, post the 2 lines of code it should take, if not, please point me in the right direction. I have no idea what fps mode is called in the engine. Capture is just cmd_capture unless I'm mistaken...


Anyway, halp plox!

Re: I want to unbind and rebind

Posted: 01 Apr 2011, 10:52
by Beherith
unbind Any+c controlunit

Re: I want to unbind and rebind

Posted: 01 Apr 2011, 14:55
by knorke
Spring.SendCommands ("unbind Any+c controlunit")
(or SendCommand)
notice no /
I looked at uikeys.txt in hope all possible commands would be listed but at least capture is not listed there. some others are though, so if you want to unbind more stuff like share dialog you could look there.

Re: I want to unbind and rebind

Posted: 01 Apr 2011, 15:02
by Beherith
Uikeys.txt contains only the default binds, so that you know what to unbind if you need something else there.

Re: I want to unbind and rebind

Posted: 01 Apr 2011, 15:37
by knorke
Uikeys.txt contains only the default binds
complete list anywhere? did not find one so far.

Re: I want to unbind and rebind

Posted: 01 Apr 2011, 18:40
by Forboding Angel
Keep in mind that I'm doing this in a gadget. For all intents and purposes uikeys does not exist in this instance.

Re: I want to unbind and rebind

Posted: 01 Apr 2011, 19:18
by knorke
unsynched part of gadget...
but i meant uikeys.txt as reference/docu.

Re: I want to unbind and rebind

Posted: 01 Apr 2011, 20:24
by zwzsg
uikeys.txt mentions something about
/keysave : save current bindings to 'uikeys.tmp' (NOTE: 'tmp' vs. 'txt')

Re: I want to unbind and rebind

Posted: 02 Apr 2011, 00:14
by Forboding Angel

Code: Select all

	Spring.SendCommands({
		"unbindkeyset c",
	})
	Spring.SendCommands("bind c capture")
In case anyone is curious, ^^ that is how to do it.