Setup shortcut key to open specific lister plugin

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
lxg208
Junior Member
Junior Member
Posts: 6
Joined: 2023-06-06, 01:22 UTC

Setup shortcut key to open specific lister plugin

Post by *lxg208 »

Hello,

Here is the scenario, I have two lister plugins for pdf files: SumatraPDF and slister, as I want different settings for viewing different documents. Right now, which plugin is used is determined by the order of them. After start the plugin, I can switch though plugin menu.

I'm wondering if there is a way I can setup keyboard shortcuts to call the plugin I want to use?

Thanks
User avatar
petermad
Power Member
Power Member
Posts: 14914
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Setup shortcut key to open specific lister plugin

Post by *petermad »

Configuration -> Misc. -> Redefine hotkeys:
Command: cm_List
Parameter: /Pslister

and Redefine hotkeys:
Command: cm_List
Parameter: /Psumatrapdf
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Fla$her
Power Member
Power Member
Posts: 2390
Joined: 2020-01-18, 04:03 UTC

Re: Setup shortcut key to open specific lister plugin

Post by *Fla$her »

2petermad
Is it documented somewhere that /P can be used instead of /S=L:P ?
Overquoting is evil! 👎
User avatar
white
Power Member
Power Member
Posts: 4677
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Setup shortcut key to open specific lister plugin

Post by *white »

Fla$her wrote: 2024-05-24, 15:39 UTC 2petermad
Is it documented somewhere that /P can be used instead of /S=L:P ?
[Help - Dialog box: Choose command] wrote:cm_List,
cm_ListOnly,
cm_ListInternalOnly

Specifies the name of the file to be opened in the Lister. Supports the same options as the command line parameter /S=L:parameters. Must be passed before the name, and start with a slash / (without the part S=L: of the command line parameter), e.g.
cm_List /T1V file_name for text mode, variable width font
Fla$her
Power Member
Power Member
Posts: 2390
Joined: 2020-01-18, 04:03 UTC

Re: Setup shortcut key to open specific lister plugin

Post by *Fla$her »

Yeah. I have seen this text. But only now I noticed the phrase "without the part S=L:".
I think that it is worth giving an example below to make it clearer.
Overquoting is evil! 👎
User avatar
white
Power Member
Power Member
Posts: 4677
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Setup shortcut key to open specific lister plugin

Post by *white »

Fla$her wrote: 2024-05-24, 19:33 UTC I think that it is worth giving an example below to make it clearer.
Like the one that is already there?
User avatar
petermad
Power Member
Power Member
Posts: 14914
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Setup shortcut key to open specific lister plugin

Post by *petermad »

Like the one that is already there?
:wink:
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Fla$her
Power Member
Power Member
Posts: 2390
Joined: 2020-01-18, 04:03 UTC

Re: Setup shortcut key to open specific lister plugin

Post by *Fla$her »

white wrote: 2024-05-24, 21:17 UTC Like the one that is already there?
Yes, sort of. For /F and /Pname, for example.
Overquoting is evil! 👎
lxg208
Junior Member
Junior Member
Posts: 6
Joined: 2023-06-06, 01:22 UTC

Re: Setup shortcut key to open specific lister plugin

Post by *lxg208 »

petermad wrote: 2024-05-24, 13:58 UTC Configuration -> Misc. -> Redefine hotkeys:
Command: cm_List
Parameter: /Pslister

and Redefine hotkeys:
Command: cm_List
Parameter: /Psumatrapdf
Thanks a lot.

It looks like I have to unset external viewer to make this work. If I set external viewer than the shortcut key will invoke external viewer. Do I have to disable external viewer (alt-F3) to make this work?
User avatar
petermad
Power Member
Power Member
Posts: 14914
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Setup shortcut key to open specific lister plugin

Post by *petermad »

It looks like I have to unset external viewer to make this work. If I set external viewer than the shortcut key will invoke external viewer. Do I have to disable external viewer (alt-F3) to make this work?
Ahh, it looks like TC is hadrcoded to use external viewer when Alt is used together with cm_List - try using a shortcut that is not using Alt - like Ctrl+Shift+S or Win+F3

There is a workaround:
Put this code in your usercmd.ini file (located in the same dir as your wincmd.ini file - if it does not exist just make it in a text editor)

Code: Select all

[em_listSlister]
cmd=%COMMANDER_EXE% /i="%COMMANDER_INI%" /S=L:Pslister
param=%Z%P%N

[em_listSumatrapdf]
cmd=%COMMANDER_EXE% /i="%COMMANDER_INI%" /S=L:Psumatrapdf
param=%Z%P%N
Now you can assign for example Alt+S to em_listSlister and Alt+U to em_listSumatrapdf

Notice that Lister windows opened with those two commands will stay open when you close or restart TC.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
lxg208
Junior Member
Junior Member
Posts: 6
Joined: 2023-06-06, 01:22 UTC

Re: Setup shortcut key to open specific lister plugin

Post by *lxg208 »

Thank you very much. Both worked as described.
Post Reply