FWGS / xash3d-fwgs

Xash3D FWGS engine
1.57k stars 236 forks source link

Applying default control settings doesn't apply alternative keybinds #1012

Open FreeSlave opened 2 years ago

FreeSlave commented 2 years ago

E.g. default.cfg has

bind    UPARROW     +forward
bind    w           +forward

Xash3D seems to set the first bind only when "Use defaults" button is pressed.

Vladislav4KZ commented 2 years ago

By the way, when you enter in the console exec default.cfg, the +forward command successfully binds to two buttons

a1batross commented 2 years ago

WTF is default.cfg?

Vladislav4KZ commented 2 years ago

WTF is default.cfg?

This is the config that restores default keyboard settings.

a1batross commented 2 years ago

We don't use that anywhere. And it doesn't look like GoldSrc uses it, either.

For keyboard default settings, only kb_def.lst is used.

Vladislav4KZ commented 2 years ago

Anyway, the kb_def.lst has two buttons w and UPARROW that use the +forward command.

"k"             "+voicerecord"
"w"             "+forward"
"UPARROW"       "+forward"
"s"             "+back"
"DOWNARROW"     "+back"
"LEFTARROW"     "+left"
"RIGHTARROW"    "+right"
"a"             "+moveleft"
","             "+moveleft"
"d"             "+moveright"
"."             "+moveright"
"SPACE"         "+jump"
"CTRL"          "+duck"
"TAB"           "+showscores"
"e"             "+use"
"v"             "+moveup"
"'"             "+moveup"
"c"             "+movedown"
"/"             "+movedown"
"PGUP"          "+lookup"
"PGDN"          "+lookdown"
"END"           "force_centerview"
"ALT"           "+strafe"
"INS"           "+klook"
";"             "+mlook"
"r"             "+reload"
"SHIFT"         "+speed"
"MOUSE1"        "+attack"
"ENTER"         "+attack"
"MOUSE2"        "+attack2"
"\\"            "+attack2"
"f"             "impulse 100"
"1"             "slot1"
"2"             "slot2"
"3"             "slot3"
"4"             "slot4"
"5"             "slot5"
"MWHEELUP"      "invprev"
"["             "invprev"
"MWHEELDOWN"    "invnext"
"]"             "invnext"
"q"             "lastinv"
"F5"            "snapshot"
"F6"            "save quick"
"F7"            "load quick"
"F10"           "quit"
"PAUSE"         "pause"
"ESCAPE"        "escape"
"~"             "toggleconsole"
"`"             "toggleconsole"
"t"             "impulse 201"
"y"             "messagemode"
"u"             "messagemode2"
Vladislav4KZ commented 1 year ago

Just to clarify, the steam version of Half-Life has a file default.cfg and the first time you run Xash3D key bindings are loaded from this file

No, according to my observations, GoldSource does not use default.cfg to reset the keybindings, as well as Xash3D.

It uses the kb_def.lst file to restore the default keybindings.

Vladislav4KZ commented 1 year ago

default.cfg has an alias for zoom on the F11 key.

If GoldSource or Xash3D ever executed the default.cfg, then a zoom alias should be bound to the F11 key.