Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Zed

ZDoom key bindings

Recommended Posts

Hello there, Doomworld. I have a little issue.

I downloaded ZDoom 2.7.0 a while ago. Everything works fine, except for one thing. Every time I load it, I have to re-assign the keys (I use WASD). It's really somewhat trivial, but it bothers me a little that I have to spend a couple of minutes changing it, and if I want to play, say, 3 or 4 different wads, that means I lost around 5-8 minutes per gaming session. Is there a way to "tell" ZDoom not to change them back to the defaults every time I quit? I'm sure this is basic knowledge, but I searched the ZDoom wiki almost an entire week and found nothing. Maybe I'm looking in the wrong place. Maybe I'm just an idiot.

Thanks for reading, and good night.

Share this post


Link to post

There should be a "zdoom-[your OS username].ini" file somewhere in the same folder as the executable, I believe. Without that, not only won't you have your inputs saved, but your resolution would always default to something like 1024x768 or something.

That said, that file should be automatically generated, so your settings would be saved...

Share this post


Link to post

Yes, there is one. It says "Configuration Options" and opens automatically in notepad. Is that the one? By the way, it's empty.

Share this post


Link to post

Sounds like some kind of permissions problem. Try running ZDoom as administrator if you can . Are you doing anything weird when you run it or when you installed it?

If that doesn't fix it you can probably set up autoexec.cfg to set your keys:
* first make sure you don't already have a file called autoexec.cfg in your ZDoom directory
* make a new file called autoexec.cfg, open it with notepad
* add keybindings, one per line, in the form of bind keyname "action"

To dump a list of your current keybindings to file
* Start ZDoom and set the keybindings as you would normally
* Press ` to open the console
* Type logfile mykeys.txt
* Type bind
* Quit ZDoom
* The file mykeys.txt should have a list of keybindings. You can copy the ones you need to set to autoexec.cfg, make sure to start the line with bind though.

If mykeys.txt comes up blank or doesn't get made, you've got a more serious problem on your hands.

Share this post


Link to post

Delete it and run the game again it should generate a new one that will save your settings. If that doesn't work I'd guess you've got a slightly corrupted Zdoom download. Download it again and try again. ZDoom should automatically save your settings everytime. :)

Share this post


Link to post

Thanks for your replies.

plums said:

Sounds like some kind of permissions problem. Try running ZDoom as administrator if you can . Are you doing anything weird when you run it or when you installed it?


I already tried that. Didn't work. And no, nothing weird. I downloaded, installed it in normal way, and that's it.

plums said:

If that doesn't fix it you can probably set up autoexec.cfg to set your keys:
* first make sure you don't already have a file called autoexec.cfg in your ZDoom directory
* make a new file called autoexec.cfg, open it with notepad
* add keybindings, one per line, in the form of bind keyname "action"

To dump a list of your current keybindings to file
* Start ZDoom and set the keybindings as you would normally
* Press ` to open the console
* Type logfile mykeys.txt
* Type bind
* Quit ZDoom
* The file mykeys.txt should have a list of keybindings. You can copy the ones you need to set to autoexec.cfg, make sure to start the line with bind though.

If mykeys.txt comes up blank or doesn't get made, you've got a more serious problem on your hands.


Sorry, are those two separate solutions or I have to first make the autoexec thing and then open ZDoom?

Average said:

Delete it and run the game again it should generate a new one that will save your settings. If that doesn't work I'd guess you've got a slightly corrupted Zdoom download. Download it again and try again. ZDoom should automatically save your settings everytime. :)


You mean, delete ZDoom and reinstall? I tried that already.

Again, thank you. I will try all of these again while I wait for your answers. Have a good day.

Share this post


Link to post

What Average meant is that you should delete your empty autoexec.cfg then run ZDoom. ZDoom normally auto-generates a new, default .cfg if none is found. If it doesn't, then something is definitely wrong and you should download a new version of ZDoom and see if that fixes things. (EDIT: I just read that you already tried reinstalling - it's really weird that didn't work... Did you just delete the ZDoom folder, or did you actually go through the uninstall process? Make sure you do the latter, to make sure you get rid of any traces that may be messing things up (making backups of custom files, of course))

If the solution above (deleting autoexec.cfg) doesn't solve the problem of your key bindings resetting to defaults, I recommend manually inputting the bindings you want, saving the .cfg, and right-clicking on the file, going to 'Properties,' and checking the box marked read only. This will ensure that ZDoom will not rewrite your bindings

P.S. your autoexec.cfg might be named zdoom-<USERNAME>.ini (mine is). The above steps should work on this as well. I have no idea what the difference between these two is. :P

Share this post


Link to post

I thought autoexec.cfg was a list of console commands to execute automatically at the start of every run of the program, while zdoom-[username].ini was your settings.

Share this post


Link to post
Shadow Hog said:

I thought autoexec.cfg was a list of console commands to execute automatically at the start of every run of the program, while zdoom-[username].ini was your settings.

My keybindings are in that .ini file. I don't even have an autoexec.cfg file in my ZDoom folder.

Share this post


Link to post

My mistake. If Zed has a working .ini file, then checking 'Read-only' should stop ZDoom from overwriting his keybindings...

EDIT: after manually inputting the keybindings into the .ini file, of course.

Share this post


Link to post
Zed said:

Sorry, are those two separate solutions or I have to first make the autoexec thing and then open ZDoom?


Do this part first:

* Start ZDoom and set the keybindings as you would normally
* Press ` to open the console
* Type logfile mykeys.txt
* Type bind
* Quit ZDoom


edit mykeys.txt, it will look something like this, except much longer:

Log started: Thu Oct 24 06:57:38 2013

]bind
Current key bindings:
1 "slot 1"
2 "slot 2"
3 "slot 3"
4 "slot 4"
5 "slot 5"
6 "slot 6"
7 "slot 7"
tab "togglemap"
w "+forward"
r "+moveup"
a "+moveleft"
s "+back"
d "+moveright"
f "+movedown"
Delete the first few lines that aren't keybindings, and optionally delete any other line that is a default keybinding. Now add the word "bind" at the start of each line, so it looks something like this:
bind w "+forward"
bind r "+moveup"
bind a "+moveleft"
bind s "+back"
bind d "+moveright"
bind f "+movedown"
Now save that file as autoexec.cfg and it should run every time you run ZDoom (hopefully).

(you can just type all that into autoexec.cfg directly, but you need to know the names of the right actions like +moveup. some keys are also not obviously-named.)

NB: This is obviously a workaround, but I don't know why your keys aren't being stored in the ini file. There are disadvantages to doing it this way, like if you want to change keys in the future, but if it works it's better than nothing.

Share this post


Link to post

The syntax for aliases and key binding is different whether it's in autoexec.cfg (as console commands) or zdoom-user.ini (as settings).

If ZDoom does not save your keybinding settings in the ini, then something is preventing it from doing so. If might be a permission issue if ZDoom is installed within Program Files on a Windows Vista/7/8+ system. Moving it to a different place would fix the issue.

If you have a zdoom.ini file (without the username part) then it will be loaded first. You could edit or create that file. If all you want is to assign the movement keys to WASD, then it only needs to contain those lines:

[Doom.Bindings]
w=+forward
a=+moveleft
s=+back
d=+moveright
Default values will be used for everything else. You can also duplicate these lines for [Heretic.Bindings], [Hexen.Bindings], [Strife.Bindings], etc. as needed if you also play other games supported by ZDoom.

Share this post


Link to post
plums said:

Do this part first:

[/B]* Start ZDoom and set the keybindings as you would normally
* Press ` to open the console
* Type logfile mykeys.txt
* Type bind
* Quit ZDoom


edit mykeys.txt, it will look something like this, except much longer:

Log started: Thu Oct 24 06:57:38 2013

]bind
Current key bindings:
1 "slot 1"
2 "slot 2"
3 "slot 3"
4 "slot 4"
5 "slot 5"
6 "slot 6"
7 "slot 7"
tab "togglemap"
w "+forward"
r "+moveup"
a "+moveleft"
s "+back"
d "+moveright"
f "+movedown"
Delete the first few lines that aren't keybindings, and optionally delete any other line that is a default keybinding. Now add the word "bind" at the start of each line, so it looks something like this:
bind w "+forward"
bind r "+moveup"
bind a "+moveleft"
bind s "+back"
bind d "+moveright"
bind f "+movedown"
Now save that file as autoexec.cfg and it should run every time you run ZDoom (hopefully).

(you can just type all that into autoexec.cfg directly, but you need to know the names of the right actions like +moveup. some keys are also not obviously-named.)

NB: This is obviously a workaround, but I don't know why your keys aren't being stored in the ini file. There are disadvantages to doing it this way, like if you want to change keys in the future, but if it works it's better than nothing.


Thanks a lot. It worked!

Gez said:

The syntax for aliases and key binding is different whether it's in autoexec.cfg (as console commands) or zdoom-user.ini (as settings).

If ZDoom does not save your keybinding settings in the ini, then something is preventing it from doing so. If might be a permission issue if ZDoom is installed within Program Files on a Windows Vista/7/8+ system. Moving it to a different place would fix the issue.


Does this applies to XP as well?

Gez said:

If you have a zdoom.ini file (without the username part) then it will be loaded first. You could edit or create that file. If all you want is to assign the movement keys to WASD, then it only needs to contain those lines:

[Doom.Bindings]
w=+forward
a=+moveleft
s=+back
d=+moveright
Default values will be used for everything else. You can also duplicate these lines for [Heretic.Bindings], [Hexen.Bindings], [Strife.Bindings], etc. as needed if you also play other games supported by ZDoom.


Thanks. Just a couple of questions: I use E for run. Should I only add e=+run? And yes, I have Heretic and Hexen. So, when you talk about duplicate the lines, do you mean that I should add, below that, the same bindings but with [Hexen.Bindings] and [Heretic.Bindings] as a header?

I really, really appreciate your help. I'm a happy man now :) Thanks again to all for your help, and good day.

Share this post


Link to post

If you mean the "always run" toggle key, then you'd have to bind to "toggle cl_run". If you mean the key that only has an effect as long as you press it, then it's "+speed" that you want.


For reference, player controls on the ZDoom wiki.

Share this post


Link to post
Gez said:

If you mean the key that only has an effect as long as you press it, then it's "+speed" that you want.


For reference, player controls on the ZDoom wiki.


Yes, that's what I want. I never use the "always run" option. And thanks for the link.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×