News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

No more user-chosen keyboard shortcuts?

Started by NiWe, August 27, 2008, 12:05:04 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

NiWe

In earlier versions of simutrans (pre 100.0; I think the last one I used was about 99.16 or 99.18 or some such) one could use Ctrl+F2 --- Ctrl+F12 to give a specific tool a shortcut (the Fx keys). I fail to do this in the 100.0, and wonder if there are another way of doing the same thing here?
(that is, I get the keyboard help screen if I try, and this no longer mention this former ability)

And if it's completely gone - well, that'd be a pity...

I did look at menuconf.tab but realized at once that I don't understand anything there...  :(

(If I missed some discussion about this, I'm sorry, but I couldn't find any)

yoshi

You can assign a keyboard shortcut for each menu element, if you edit the menuconf.tab. But I think there is no formal documentation regarding how to edit the menuconf.tab, apart from some explanation in the menuconf.tab file itself. Yes, it's complicated...

whoami

(I move this to bug reports, because I also liked that feature.)

@NiWe: I assume you refer to ST version 100.0 - but which Pak (may have an impact)?

z9999

Quote from: NiWe on August 27, 2008, 12:05:04 PM
one could use Ctrl+F2 --- Ctrl+F12 to give a specific tool a shortcut (the Fx keys).

It's completely gone from source code.
But as yoshi said, you can define keyboard shortcut for your favorite tool.

For example:
Quote
# F2... way.gavel_road, F3...bridge.ClassicRoad, ctrl+s...BusStop
toolbar[5][11]=general_tool[14],,F2,gavel_road
toolbar[5][12]=general_tool[15],,F3,ClassicRoad
toolbar[5][13]=general_tool[19],,^s,BusStop

NiWe

@whoami: pak64 (vanilla).

@yoshi and z9999: That's cool, I'll try to edit that according to the examples.
May I guess that the options such as "gavel_road" or "ClassicRoad" are names of individual .pak files? (i.e. that "ClassicRoad" refers to the file "bridge.ClassicRoad.pak"?)

DirrrtyDirk

I think it's not the pak file, but the object name (which is often - but not always - identical).
  
***** PAK128 Dev Team - semi-retired*****

prissi

The old system with CNTRL + Function was aparently not working on all backend and almost never somebody used it. At least no question, no thanks no praises. Restoring this function is possible though.

whoami

Quote from: prissi on August 27, 2008, 07:10:41 PM
almost never somebody used it.
How do you know that? Does the program report statistics back to you? <just kidding>
The feature may not have been well-known, but it is very useful for things that need to be built very often, but don't have a pre-defined key, like bus stations, post boxes, signals, simple platforms etc..

QuoteAt least no question, no thanks no praises.
On the previous forum: http://archive.forum.simutrans.com/topic/06065.0/index.html, http://archive.forum.simutrans.com/topic/01742.0/index.html.

QuoteRestoring this function is possible though.
Menuconf.tab is helpful also for this, esp. because those settings are persistent, but it is less easy to configure, and cannot be changed in the game itself. Also: is it possible to use a separate file (instead of menuconf.tab) for user-specified settings, so they do not interfere with program updates (which can change the menue)?

prissi

The problem is: The function keys are now freely assignable. Thus I removed it, becuase the same can be done (persistent too!) with editing menuconf.tab.

Fabio

i don't know whether tis is intended, but in 100.0 the default shortcuts for tracks (t) and roads (s) don't use the last used type anymore, but only the default one...

DirrrtyDirk

That behaviour can be defined in menuconf.tab - you can link a specific set of, let's say tracks, to the "t" key or it can also be set to recall the last type used (at least with the nightlies).
  
***** PAK128 Dev Team - semi-retired*****

prissi

This was an error and is gone in the nightlies.

NiWe

*shrugs*
Ok, I haven't really had much time to play for quite a while, but found this bookmark :)

I did look at menuconf.tab, but I still am at a loss how to find those object names. I tried to add my three favourite shortcuts, namely to Bus stops, postboxes and freight yards. As z9999 indicated above, the name for the bus stops is "BusStop" (also the name of the pak), and also the name of the post box seems to be a pak name ("PostStop"). But I can't find any pak with a name resembling "freight yard", and I don't know where else to find even suggestions for object names. Could anyone please point me to  where I should look?

Spike

Quote from: NiWe on June 02, 2009, 12:25:24 AM
But I can't find any pak with a name resembling "freight yard", and I don't know where else to find even suggestions for object names. Could anyone please point me to  where I should look?

I assume that'd be CarStop - i got this from the pak64 source files, which you can find in the SVN on Sourceforge. Other than the pak sources I wouldn't know how to get good clues.

NiWe


Spike

You're welcome :)

Although it's not 100% correct, I think you can just look for symbol.* files in your pak folder. (Those are the cursor objects or menu icons of the tools - I have forgotten the exact details). The part between the "symbol." and the ".pak" should be what you need to name the tools.

NiWe

Not quite, I'm afraid. Even thought it does work with BusStop and CarStop, the pak file which I presume deal with the post stop isn't called "symbol.PostStop.pak" but merely "symbol.Post.pak".

At least I guess that's the one as there is no file named symbol.PostStop.pak. BTW, I got that name from the pak file "building.PostStop.pak".

Spike

I'm aware it's not 100% correct. But browsing the pak sources from the SVN is quite hard for the less computer literates, and I was looking for an easier method that still gives some help. If it doesn't, then only the source is the source. Pun intended ;)

NiWe

:) Ah, it's ok, I just intended to say that one may have to look at more pak files than the symbol.*.pak

(SVN I know absolutely nothing about myself, so I never even attempted that route. Well, as of yet ;))

whoami

#19
http://en.wiki.simutrans.com/index.php/Translation shows how to get the internal texts of any kind: by creating an empty language. Note that names of vehicles and stops won't be replaced by switching the language, and that the exact spelling may not be apparent from the in-game view (but it gives at least a clue which pak file to look at). Another way is to look into the simutranslator application.

Changing menuconf.tab isn't trivial, and I assume that there is not method to keep user-specified keyboard shortcuts in another file (under personal data, so it always stays). I would like such a method.

I also think that some more shortcuts should be pre-defined for the most popular objects and actions, especially placement of standard signals, simple station platforms, bus stops and post boxes (these are often time-line dependent). The pak-set maintainers can add them, of course, but we should keep a common set of keys for all the pak-sets, in order to make transition easier, and to avoid help requests in this regard.

(edit: added signals to the list of items that are used often)