New Keybindings?

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
myp
New Member
New Member
Posts: 1
Joined: 2004-01-14, 14:48 UTC
Contact:

New Keybindings?

Post by *myp »

Hi,
I would like to know if its possible to bind a key in Total Commander to some action other than the default functions provided in options. For example, I use xmplay to play mp3 files. If a directory name is given to xmplay, it loads all the media files in that directory and starts playing. I wonder if I can bind a key within Total Commander to start some arbitrary program, like xmplay, with an argument of a directory under the cursor? Is this possible at all?
Thanx in advance.
-Mike
User avatar
Lefteous
Power Member
Power Member
Posts: 9536
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2myp

Hi,

It's possible. Create a start menu entry. The start menu entry has to be one of the first ten entries, otherwise you'll have to extend the file "Totalcmd.inc". You have to remember the entries position. The following example uses a start menu entry on position 5.

In menu "Configuration" select "Options".
Select tab sheet "Misc".
Select a hotkey.
Select cm_usermenu5 in the command dropdown. The identifier (cm_usermenu5 to xmplay for example) can be changed in "Totalcmd.inc".
Push the little button to the right to apply hotkey.

The file "Totalcmd.inc" is located in the Total Commander directory.

Extending Totalcmd.inc
You can create new user commands here:
cm_MyCommand=723. This is start menu entry #23.
User avatar
Black Dog
Power Member
Power Member
Posts: 1024
Joined: 2003-02-05, 22:17 UTC
Location: Odessa
Contact:

Post by *Black Dog »

[face=courier]On 14-01-2004 16:55:25 +0000 myp wrote:

m> I wonder if I can bind a key within Total Commander
m> to start some arbitrary program, like xmplay, with an
m> argument of a directory under the cursor? Is this
m> possible at all?


To start some program with directory under the cursor as parameter you can use "%P" and/or "%N" placeholders. There is detailed description of them in Help, actually.
For more information about key mapping read FAQ.txt.[/face]
Post Reply