Forts
评价数不足
Custom Key Bindings
由 EarthWork Games 和其他 1 人合作完成
How to modify the default key mapping in Forts.
   
奖励
收藏
已收藏
取消收藏
In-game key rebinding
Forts was updated post-launch with in-game key rebinding. To use this feature, go to the Options screen in the main menu, then Input. The first tab allows you to edit the most commonly used keys, the second tab lists all keys.

To change a key binding, click on it and press the new key. A warning will appear if the key is used for another action. This isn't necessarily a problem - it depends if they are in effect at the same time. You can reset a specific key to the default, or reset all keys to the defaults too.

To manually edit the key bindings, see the following sections.
Creating and editing keys.lua
1. Open up Forts/data/mods/keyboard-AZERTY/keys.lua.
2. Copy that into your Forts/users/<user> folder, so it's next to settings.lua
3. The names of the available key functions can be found in Forts/data/mods/language-English/db/strings.lua, starting at "ToggleConsole" and ending at "SelectItem9". Some of these are not functional yet.
4. The available keys to bind to can be found in Forts/data/ui/dik_codes.lua
5. Edit the copied keys.lua to change the key bindings. You can delete the comments at the top.
Example
For example, if you wanted to change the pan keys to be the arrow keys instead of WASD (or equivalent):

Keys =
{
PanUp = { DIK_UP, },
PanDown = { DIK_DOWN, },
PanLeft = { DIK_LEFT, },
PanRight = { DIK_RIGHT, },
}
Modifiers
You can also apply key modifiers like so:

Keys =
{
RepairArea = { DIK_R, Ctrl | Shift | Alt },
}
11 条留言
[DEV] BeeMan  [作者] 2019 年 6 月 6 日 下午 9:55 
@SZzzzzz sorry we missed your question. It looks like there was a bug. I'll check it out.
SZzzzzz 2018 年 9 月 29 日 上午 10:02 
Hello Kind Sir, I've met the problem with impossibility to save changes in the game controls (after each restart / or maybe even during the game - the controls get reset to default), but thank you for this guide - it works for me .. but partially.

I've put next config file - but ToggleGIFCapture is not working - I need to switch this off completely.
I've tried to put
ToggleGIFCapture = {},
as well
ToggleGIFCapture = {,},
and the final varian even this one
ToggleGIFCapture = {DIK_F11, Alt},
- nope it doesn't work, i.e. standard combination Alt+G still survives all my tries.

Any ideas about:
1) why standard binding returns during the game?
2) why changed via Config -> Input setting are not permanent?
3) how to switch off this crazy GIFCapture (this just hang the app, this why I don't need that at all)?
EarthWork Games  [作者] 2017 年 7 月 4 日 上午 3:46 
It's RepairArea, as in the example given in the Modifiers section.
BENTON!!! 2017 年 7 月 3 日 下午 2:45 
what about changing the repair key?
Faust 2017 年 5 月 19 日 下午 6:54 
Thanks
EarthWork Games  [作者] 2017 年 5 月 19 日 下午 3:39 
FireWeapon :)
Nco 2017 年 5 月 15 日 上午 5:34 
Same problem Faust
Faust 2017 年 5 月 8 日 下午 10:55 
Hi, i know there s a key to repeat the fire on a group of weapon and i know it's mapped on "e" by default but i don't really know which function it is in the string.lua.
Can you help me there please ?
Thanks for the guide
EarthWork Games  [作者] 2017 年 4 月 26 日 上午 7:12 
Hi Wensaan, only the last one would take effect. Let me know if you want any duplicate actions.

Yeah PushToTalk is non-functional atm.
wensaan 2017 年 4 月 26 日 上午 6:32 
Thanks for that! commands SaveScreen and RestoreScreen are what I was looking for ;)

Hava a question tho. Is it possible to bind two different keys to do same action? Tryed, didnt work.

Guess command PushToTalk doesnt work, does it? Didnt try this one, but you already mentioned this is something from to-do list.

cheers
W