✅ Support for parameters when binding commands to hotkeys

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

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

Re: Support for parameters when binding commands to hotkeys

Post by *petermad »

I can confirm that SAVETABS doesn't work.
Here

Code: Select all

C+W=SAVETABS
C+W_params=%|COMMANDER_PATH|\current.tab
and

Code: Select all

C+W=SAVETABS
C+W_params="%|COMMANDER_PATH|\current.tab"
works fine in both [Shortcuts] and [ShortcutsWin] - in both 32bit and 64bit 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
User avatar
petermad
Power Member
Power Member
Posts: 14792
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Support for parameters when binding commands to hotkeys

Post by *petermad »

Sir_SiLvA wrote: 2023-05-24, 19:02 UTC on a button only works if "SAVETABS %COMMANDER_PATH%\Tabs\Current2.tab" is in cmdline with proper %Commander_path%.
on shortcut not at all
%|envvar| is only meant for the Parameter field, not for the Command field:
history.txt wrote:26.04.23 Added: Command line parameters (button bar, start menu): New parameter %|envvar| inserts environment variable envvar, e.g. %|windir| or %|$DESKTOP| in the parameter field (32/64)
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: 2295
Joined: 2020-01-18, 04:03 UTC

Re: Support for parameters when binding commands to hotkeys

Post by *Fla$her »

2petermad
The author himself confirmed the existence of the problem:
ghisler(Author) wrote: 2023-05-24, 19:54 UTC I can confirm that SAVETABS doesn't work.
Overquoting is evil! 👎
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48075
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Support for parameters when binding commands to hotkeys

Post by *ghisler(Author) »

Actually it's not the problem of the command (e.g. SAVETABS), but the problem of what modifiers you use for the hotkey!
Any hotkey with the Alt key modifier doesn't support parameters yet.
The reason is that any hotkey with Alt generates a WM_SYSKEYDOWN message, those without Alt generate WM_KEYDOWN messages.
Currently I'm only handling commands with parameters in WM_KEYDOWN. I will add support to WM_SYSKEYDOWN in beta 5.
Sorry for the confusion.
Author of Total Commander
https://www.ghisler.com
Fla$her
Power Member
Power Member
Posts: 2295
Joined: 2020-01-18, 04:03 UTC

Re: Support for parameters when binding commands to hotkeys

Post by *Fla$her »

2ghisler(Author)
Thanks for the clarification. I hope there are no such problems with Ctrl and Shift.
Overquoting is evil! 👎
User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 3290
Joined: 2003-05-06, 11:46 UTC

Re: Support for parameters when binding commands to hotkeys

Post by *Sir_SiLvA »

ghisler(Author) wrote: 2023-05-25, 09:39 UTC The reason is that any hotkey with Alt generates a WM_SYSKEYDOWN message, those without Alt generate WM_KEYDOWN messages.
@ Fla$her I know reading is hard :D
petermad wrote: %|envvar| is only meant for the Parameter field, not for the Command field:
I only used %Commander_Path% (as I dont see any sense to write it as %|Commander_Path| which is one more char as the original)
and THAT didnt work in ParamFields.
Hoecker sie sind raus!
Fla$her
Power Member
Power Member
Posts: 2295
Joined: 2020-01-18, 04:03 UTC

Re: Support for parameters when binding commands to hotkeys

Post by *Fla$her »

Sir_SiLvA wrote: 2023-05-25, 10:42 UTC @ Fla$her I know reading is hard :D
The hardness of reading has nothing to do with it. Pointing to one modifier doesn't exclude problems with the others...
Overquoting is evil! 👎
User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 3290
Joined: 2003-05-06, 11:46 UTC

Re: Support for parameters when binding commands to hotkeys

Post by *Sir_SiLvA »

Fla$her wrote: 2023-05-25, 10:50 UTC The hardness of reading has nothing to do with it. Pointing to one modifier doesn't exclude problems with the others...
For everyone when written like this,
The reason is that any hotkey with Alt generates a WM_SYSKEYDOWN message, those without Alt generate WM_KEYDOWN messages.,
it clearly does exclude the other modifiers.
Hoecker sie sind raus!
Fla$her
Power Member
Power Member
Posts: 2295
Joined: 2020-01-18, 04:03 UTC

Re: Support for parameters when binding commands to hotkeys

Post by *Fla$her »

Sir_SiLvA wrote: 2023-05-25, 11:07 UTC For everyone when written like this, ... it clearly does exclude the other modifiers.
Never speak for everyone. Your logic excludes what has not been confirmed by the author or tested by me in practice. If such a message occurs with Alt, it 100% does not mean that it will not occur with any other modifier.
Overquoting is evil! 👎
User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 3290
Joined: 2003-05-06, 11:46 UTC

Re: Support for parameters when binding commands to hotkeys

Post by *Sir_SiLvA »

Fla$her wrote: 2023-05-25, 11:25 UTC Your logic excludes what has not been confirmed by the author
You can throw yourself on the floor and claim you are special as much as
you want but yes the author has confirmned it.
If you had any idea about coding I would have suggested you to read https://learn.microsoft.com/en-us/windows/win32/inputdev/wm-syskeydown ....
Hoecker sie sind raus!
User avatar
petermad
Power Member
Power Member
Posts: 14792
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Support for parameters when binding commands to hotkeys

Post by *petermad »

2Sir_SiLvA
I only used %Commander_Path% (as I dont see any sense to write it as %|Commander_Path| which is one more char as the original)
and THAT didnt work in ParamFields.
%Commander_Path% only works in Command field.
%|Commander_Path| only works in Parameters field

IF your Command if for example %COMSPEC% or a program that can resolve envars, you can use %%Commander_Path%% in the Parameters field.
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
User avatar
petermad
Power Member
Power Member
Posts: 14792
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Support for parameters when binding commands to hotkeys

Post by *petermad »

2ghisler(Author)
Any hotkey with the Alt key modifier doesn't support parameters yet.
I guess that is what I demonstrated here: viewtopic.php?p=432576#p432576

But why is it only a problem in 32bit TC?



2Fla$her
Thanks for the clarification. I hope there are no such problems with Ctrl and Shift.
Apparently not according to my test: viewtopic.php?p=432576#p432576
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: 2295
Joined: 2020-01-18, 04:03 UTC

Re: Support for parameters when binding commands to hotkeys

Post by *Fla$her »

Sir_SiLvA wrote: 2023-05-25, 11:52 UTC You can throw yourself on the floor and claim you are special as much as you want
🤫 The ulcer does not give rest in any way? There are always some personal narratives and assaults.
Drink chamomile, calm your nerves. Everything will be fine. ✊😆
Sir_SiLvA wrote: 2023-05-25, 11:52 UTC If you had any idea about coding I would have suggested you to read https://learn.microsoft.com/en-us/windows/win32/inputdev/wm-syskeydown
But since you considered yourself adequate, stating that this is not the case, closing your eyes to my previous dialogues about coding (thank God, not with you) and the words "tested by me in practice", then it wasn't worth giving a link. 😁

petermad wrote: 2023-05-25, 13:00 UTC Apparently not according to my test: viewtopic.php?p=432576#p432576
Thanks for the response of an adequate person! 👍
Overquoting is evil! 👎
User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 3290
Joined: 2003-05-06, 11:46 UTC

Re: Support for parameters when binding commands to hotkeys

Post by *Sir_SiLvA »

petermad wrote: 2023-05-25, 12:55 UTC %Commander_Path% only works in Command field.
%|Commander_Path| only works in Parameters field
Is that explained anywhere in the help-file anywhere?
Hoecker sie sind raus!
User avatar
AntonyD
Power Member
Power Member
Posts: 1246
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: Support for parameters when binding commands to hotkeys

Post by *AntonyD »

Is that explained anywhere in the help-file anywhere?
Not sure if this is the right question to ask. In the current realities, the question is more appropriate - why is there a difference between support here and there AT ALL? EVERYWHERE it should work the same way. Or do you want to say - somewhere there was not enough support for special characters and had to use others?
#146217 personal license
Post Reply