Page 1 of 1
Deconstruction default binding error
Posted: Wed Aug 19, 2015 7:59 pm UTC
by Lemaki
Hi all, there's a problem I encounter with my keybindings, and I can't seem to find a solution. Simply put, deconstructing a structure doesn't work. Let's say I choose 'c' as the key to deconstruct a structure. Each time I press the c key, this message appears:
unknown modifier key name in "marked""
I decided to take a look at keybindings.cfg to see what the fuss is all about, but the corresponding line in a bit more complicated than I expected:
Code: Select all
bind c "modcase alt \\\"/deconstruct marked\\\" /deconstruct"
The sad thing is there is no mention of building at all in the creating custom keybinds wiki page so I've no idea what's going on. Anyone also having this problem?
Re: Deconstruction default binding error
Posted: Wed Aug 19, 2015 8:45 pm UTC
by Ishq
Interesting. That looks like a bug. I'll take a look.
Re: Deconstruction default binding error
Posted: Wed Aug 19, 2015 8:52 pm UTC
by illwieckz
Re: Deconstruction default binding error
Posted: Wed Aug 19, 2015 9:06 pm UTC
by Tom
It works for me with this code:
Code: Select all
bind e modcase !shift,!alt "/deconstruct" "/deconstruct marked"
Re: Deconstruction default binding error
Posted: Wed Aug 19, 2015 9:47 pm UTC
by Lemaki
Thanks Tom, this code works like a charm. My guess is that the client, when editing keybindings.cfg, sees a " sign inside quotes and tries to escape it, and then somehow decides to escape both the " sign again, and the \ sign that comes before it because of the first escape. Weird behavior but explains everything.
PS: My version of Unvanquished was taken from the Arch User Repository. (v0.42.0-1)
Re: Deconstruction default binding error
Posted: Thu Aug 20, 2015 3:01 am UTC
by illwieckz
Yes, it works if you do the binding properly by hand, what I mean is the bug is in Unvanquished since ages. It's good that Lemaki reports it since I have forget it (I just use two keys to workaround that).
Re: Deconstruction default binding error
Posted: Thu Aug 20, 2015 7:18 am UTC
by Tom
@Lemaki: Please note that the code line must be copied into autoexec.cfg (that must be created) and not keybindings.cfg.
@illwieckz: Indeed.
Re: Deconstruction default binding error
Posted: Thu Aug 20, 2015 7:29 am UTC
by Ishq
Was indeed a bug. Fix is in master. There was unnecessary escaping in the rml file, which broke the actual command.
Re: Deconstruction default binding error
Posted: Thu Aug 20, 2015 11:55 am UTC
by Tom
Thanks!