Doom Marine
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Source Ports > ZDoom key bindings
 
Author
All times are GMT. The time now is 05:36. Post New Thread    Post A Reply
Zed
Forum Regular


Posts: 962
Registered: 10-11


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.

Old Post 10-24-13 03:19 #
Zed is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
Shadow Hog
Forum Regular


Posts: 761
Registered: 07-09


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

Old Post 10-24-13 03:25 #
Shadow Hog is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit || Quote
Zed
Forum Regular


Posts: 962
Registered: 10-11


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

Old Post 10-24-13 03:30 #
Zed is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
plums
Senior Member


Posts: 2011
Registered: 08-13


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.

Old Post 10-24-13 12:11 #
plums is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
Average
Member


Posts: 456
Registered: 05-11


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

Old Post 10-24-13 12:13 #
Average is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
Zed
Forum Regular


Posts: 962
Registered: 10-11


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.

Old Post 10-24-13 20:00 #
Zed is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
schwerpunk
Senior Member


Posts: 2067
Registered: 05-12


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

Last edited by schwerpunk on 10-24-13 at 21:40

Old Post 10-24-13 21:32 #
schwerpunk is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
Shadow Hog
Forum Regular


Posts: 761
Registered: 07-09


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.

Old Post 10-24-13 21:35 #
Shadow Hog is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit || Quote
schwerpunk
Senior Member


Posts: 2067
Registered: 05-12



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.

Old Post 10-24-13 21:39 #
schwerpunk is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
Shadow Hog
Forum Regular


Posts: 761
Registered: 07-09


Right, because the INI isn't a bunch of console commands.

Old Post 10-24-13 22:02 #
Shadow Hog is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit || Quote
schwerpunk
Senior Member


Posts: 2067
Registered: 05-12


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.

Old Post 10-24-13 22:20 #
schwerpunk is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
plums
Senior Member


Posts: 2011
Registered: 08-13



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:
code:
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:
code:
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.

Old Post 10-24-13 22:22 #
plums is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
Gez
Why don't I have a custom title by now?!


Posts: 11379
Registered: 07-07


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:

code:
[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.

Old Post 10-24-13 22:24 #
Gez is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
Zed
Forum Regular


Posts: 962
Registered: 10-11



plums said:


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:
code:
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:
code:
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. [/B]


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:

code:
[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.

Old Post 10-25-13 00:00 #
Zed is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
Gez
Why don't I have a custom title by now?!


Posts: 11379
Registered: 07-07


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.

Old Post 10-25-13 15:48 #
Gez is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
Zed
Forum Regular


Posts: 962
Registered: 10-11



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.

Old Post 10-25-13 18:51 #
Zed is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
All times are GMT. The time now is 05:36. Post New Thread    Post A Reply
 
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Source Ports > ZDoom key bindings

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.