Deconstruction default binding error

Get support for Unvanquished.
User avatar
Lemaki
Posts: 8
Joined: Sun Aug 16, 2015 1:03 pm UTC
Location: France

Deconstruction default binding error

Postby Lemaki » Wed Aug 19, 2015 7:59 pm UTC

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?
User avatar
Ishq
Project Head
Posts: 1138
Joined: Tue Mar 06, 2012 8:32 pm UTC

Re: Deconstruction default binding error

Postby Ishq » Wed Aug 19, 2015 8:45 pm UTC

Interesting. That looks like a bug. I'll take a look.
User avatar
illwieckz
Project Head
Posts: 443
Joined: Sat Aug 11, 2012 7:22 pm UTC
Location: France
Contact:

Re: Deconstruction default binding error

Postby illwieckz » Wed Aug 19, 2015 8:52 pm UTC

it never worked
This comment is licensed under cc ​​by 4 and antecedent.
User avatar
Tom
Dragoon
Posts: 248
Joined: Tue Jan 15, 2013 3:34 pm UTC
Location: France

Re: Deconstruction default binding error

Postby Tom » Wed Aug 19, 2015 9:06 pm UTC

It works for me with this code:

Code: Select all

bind e modcase !shift,!alt "/deconstruct" "/deconstruct marked"
User avatar
Lemaki
Posts: 8
Joined: Sun Aug 16, 2015 1:03 pm UTC
Location: France

Re: Deconstruction default binding error

Postby Lemaki » Wed Aug 19, 2015 9:47 pm UTC

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)
User avatar
illwieckz
Project Head
Posts: 443
Joined: Sat Aug 11, 2012 7:22 pm UTC
Location: France
Contact:

Re: Deconstruction default binding error

Postby illwieckz » Thu Aug 20, 2015 3:01 am UTC

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).
This comment is licensed under cc ​​by 4 and antecedent.
User avatar
Tom
Dragoon
Posts: 248
Joined: Tue Jan 15, 2013 3:34 pm UTC
Location: France

Re: Deconstruction default binding error

Postby Tom » Thu Aug 20, 2015 7:18 am UTC

@Lemaki: Please note that the code line must be copied into autoexec.cfg (that must be created) and not keybindings.cfg. :smile:

@illwieckz: Indeed.
User avatar
Ishq
Project Head
Posts: 1138
Joined: Tue Mar 06, 2012 8:32 pm UTC

Re: Deconstruction default binding error

Postby Ishq » Thu Aug 20, 2015 7:29 am UTC

Was indeed a bug. Fix is in master. There was unnecessary escaping in the rml file, which broke the actual command.
User avatar
Tom
Dragoon
Posts: 248
Joined: Tue Jan 15, 2013 3:34 pm UTC
Location: France

Re: Deconstruction default binding error

Postby Tom » Thu Aug 20, 2015 11:55 am UTC

Thanks! :thumbup: :cool:

Return to “Troubleshooting”

Who is online

Users browsing this forum: No registered users and 2 guests