Editing hotkeys.cfg

OpenTTD is a fully open-sourced reimplementation of TTD, written in C++, boasting improved gameplay and many new features.

Moderator: OpenTTD Developers

Post Reply
cmhbob
Engineer
Engineer
Posts: 66
Joined: 29 May 2010 06:06
Contact:

Editing hotkeys.cfg

Post by cmhbob »

Is there a trick or FAQ about editing this file? I've tried a couple of edits, but they're not taking. I've done the edits when the game isn't running, assuming that edits wouldn't take if the game is running. The file seems to be overwritten every time the game starts or ends, or something, because my edits disappear, although I think I just figured out one problem.

What I want is to have a hotkey for when I'm looking at a vehicle window so that I can bring up the Orders window. I was editing the [order] section, and that's beyond where I want the hotkey to set.

At any rate, is there a list somewhere of the functions we can try and set up hotkeys for?
--
Bob
The wrinkles only go where the smiles have been...
Me, elsewhere
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Editing hotkeys.cfg

Post by planetmaker »

The things which hotkeys can be assigned to are listed in hotkeys.cfg
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: Editing hotkeys.cfg

Post by Zuu »

You might find the source code files hotkeys.cpp and hotkeys.h useful. In hotkeys.cpp you find a list of all special words that hotkey.cfg accept. For example you can see that there is a string "RETURN" that can be used. As you see there are no word for eg. the %-symbol. And that is because OpenTTD don't work symbol-based (except for the a-z keys), instead you will have to add SHIFT + number as you like to have it. Also mind that it uses semi-US-qwerty when it comes to symbols.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
cmhbob
Engineer
Engineer
Posts: 66
Joined: 29 May 2010 06:06
Contact:

Re: Editing hotkeys.cfg

Post by cmhbob »

Thanks for the info, both of you. I'll see what I can do.
--
Bob
The wrinkles only go where the smiles have been...
Me, elsewhere
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: No registered users and 19 guests