Center to Capital and cycle through cities keybindings

Center to Capital and cycle through cities keybindings 0.0.4

does the key configuration handle mouse buttons too? ideally i'd like to switch from Home to Mouse X1.
It should be possible. You just have to figure out the correct names of the buttons. You could start by trying :
  • MOUSE_BUTTON_4 → Commonly the "Back" side button
  • MOUSE_BUTTON_5 → Commonly the "Forward" side button
Civ7_CenterCapitalMod/data/input-action-default-gestures.xml:
<Database>
<InputActionDefaultGestures>
<!-- Default to HOME for capital -->
<InsertOrIgnore ActionId="camera-center-capital" Index="0" GestureType="KBMouse" GestureData="MOUSE_BUTTON_4"/>
<!-- Default to PAGEUP for forward city-cycling -->
<InsertOrIgnore ActionId="camera-cycle-cities-forward" Index="0" GestureType="KBMouse" GestureData="KEY_PAGEUP"/>
<!-- Default to PAGEDOWN for backward city-cycling -->
<InsertOrIgnore ActionId="camera-cycle-cities-backward" Index="0" GestureType="KBMouse" GestureData="KEY_PAGEDOWN"/>
</InputActionDefaultGestures>
</Database>

Let me know how it worked out!
 
Hi, check the readme.txt inside the mods folder. There is guide how to change the quick keys. Basically you just change the bindings at the "input-action-default-gestures.xml" file. :)
Oh, yes...good Tip...but somehow it´s not working for me.

I tried it with several Key Combinations (Backspace, Tab, Single Keys etc.)
No other Key Mods installed, no conflict with another Key Binding from Menu. I even rename the Folder to "zzz_Civ7_CenterCapitalMod".

The old method (lib-register-keybinding) worked fine :)
 

Attachments

  • Bildschirmfoto 2025-03-08 um 15.06.56.png
    Bildschirmfoto 2025-03-08 um 15.06.56.png
    522.8 KB · Views: 13
confirmed, the mouse controls are the ones in core/config/Input.xml (and there are gamepad controls in there too for anybody who wants those).
are the next/prev keys also supposed to cycle between cities on the City Details screen, or only on the main map?
Cool! This works only on main map for now. I have been trying to get the game to detect any custom keypresses while the city details panel is open but have been unable to find a way. I will post update immediately if I manage to do that.
 
Oh, yes...good Tip...but somehow it´s not working for me.

I tried it with several Key Combinations (Backspace, Tab, Single Keys etc.)
No other Key Mods installed, no conflict with another Key Binding from Menu. I even rename the Folder to "zzz_Civ7_CenterCapitalMod".

The old method (lib-register-keybinding) worked fine :)
What does the game say about the button name if you assign it to some default action in the game settings keybindings menu? Maby it has some other name on Macs. Also you could try resetting the keys to defaults and restarting the game once without the mod enabled.
 
What does the game say about the button name if you assign it to some default action in the game settings keybindings menu? Maby it has some other name on Macs. Also you could try resetting the keys to defaults and restarting the game once without the mod enabled.
I tried everything mentioned above...but what really helped was to reset the Keys to defaults. Now it´s working perfect! Thx a lot!
Will play with default keys now, but need to learn them first...hahaha.
 
Burntz updated Center to Capital and cycle through cities keybindings with a new update entry:

Ver 0.0.4 - New City Cycling modes + other improvements

0.0.4
- Configurable city cycling order: 1. Grouped, 2. Alphabetical, 3. Geographical 4. Game default
- Improved city cycling logic — city list now refreshes only when cycling for better performance.
- Added ENABLE_CONSOLE_ERRORS flag for easily toggling debug messages (set true for development, false for release).
- Added timestamp logic to refresh the city table only if the previous refresh was over 20 seconds...

Read the rest of this update entry...
 
Back
Top Bottom