The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: Yona-TYT on March 10, 2026, 08:15:27 PM

Title: [Script API] Get the shortcut key associated with a tool
Post by: Yona-TYT on March 10, 2026, 08:15:27 PM
This is to obtain the values of the shortcut tool dynamically, since these values usually change depending on the packset.


@Prissi, I've noticed that `tool->command_key` isn't getting the value corresponding to the waytype shortcut. I think this means it can't be adjusted from `menuconf.tab` (in the `pakset` directory). 

Wouldn't it be a good idea to make it configurable from there?.

0001-Get-the-shortcut-key-associated-with-a-tool.patch
Title: Re: [Script API] Get the shortcut key associated with a tool
Post by: prissi on March 11, 2026, 01:35:41 AM
There are several bindings (i.e. for function keys) that require strings. A corrected version is in r 11896
Title: Re: [Script API] Get the shortcut key associated with a tool
Post by: Yona-TYT on March 11, 2026, 04:49:30 AM
Awesome, you added all the possible keyboard shortcuts, thanks for fixing it 🫡