Deconstruction default binding error

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

Deconstruction default binding error

Post 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?

User avatar
Ishq
Project Head
Posts: 1145
Joined: Tue Mar 06, 2012 8:32 pm UTC

Re: Deconstruction default binding error

Post by Ishq »

Interesting. That looks like a bug. I'll take a look.

User avatar
illwieckz
Project Head
Posts: 718
Joined: Sat Aug 11, 2012 7:22 pm UTC
Location: France
Contact:

Re: Deconstruction default binding error

Post by illwieckz »

it never worked

This comment is licensed under cc ​​by 4 and antecedent.

User avatar
Tom
Dragoon
Posts: 253
Joined: Tue Jan 15, 2013 3:34 pm UTC
Location: France

Re: Deconstruction default binding error

Post by Tom »

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

Post 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)

User avatar
illwieckz
Project Head
Posts: 718
Joined: Sat Aug 11, 2012 7:22 pm UTC
Location: France
Contact:

Re: Deconstruction default binding error

Post 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).

This comment is licensed under cc ​​by 4 and antecedent.

User avatar
Tom
Dragoon
Posts: 253
Joined: Tue Jan 15, 2013 3:34 pm UTC
Location: France

Re: Deconstruction default binding error

Post by Tom »

@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: 1145
Joined: Tue Mar 06, 2012 8:32 pm UTC

Re: Deconstruction default binding error

Post by Ishq »

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: 253
Joined: Tue Jan 15, 2013 3:34 pm UTC
Location: France

Re: Deconstruction default binding error

Post by Tom »

Thanks! :thumbup: :cool:

Post Reply