Page 3 of 4
Re: Support for parameters when binding commands to hotkeys
Posted: 2023-05-24, 23:39 UTC
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.
Re: Support for parameters when binding commands to hotkeys
Posted: 2023-05-24, 23:43 UTC
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)
Re: Support for parameters when binding commands to hotkeys
Posted: 2023-05-25, 06:50 UTC
by Fla$her
2
petermad
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.
Re: Support for parameters when binding commands to hotkeys
Posted: 2023-05-25, 09:39 UTC
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.
Re: Support for parameters when binding commands to hotkeys
Posted: 2023-05-25, 10:22 UTC
by Fla$her
2ghisler(Author)
Thanks for the clarification. I hope there are no such problems with Ctrl and Shift.
Re: Support for parameters when binding commands to hotkeys
Posted: 2023-05-25, 10:42 UTC
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
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.
Re: Support for parameters when binding commands to hotkeys
Posted: 2023-05-25, 10:50 UTC
by Fla$her
Sir_SiLvA wrote: 2023-05-25, 10:42 UTC
@
Fla$her I know reading is hard
The hardness of reading has nothing to do with it. Pointing to one modifier doesn't exclude problems with the others...
Re: Support for parameters when binding commands to hotkeys
Posted: 2023-05-25, 11:07 UTC
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.
Re: Support for parameters when binding commands to hotkeys
Posted: 2023-05-25, 11:25 UTC
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.
Re: Support for parameters when binding commands to hotkeys
Posted: 2023-05-25, 11:52 UTC
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 ....
Re: Support for parameters when binding commands to hotkeys
Posted: 2023-05-25, 12:55 UTC
by petermad
2
Sir_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.
Re: Support for parameters when binding commands to hotkeys
Posted: 2023-05-25, 13:00 UTC
by petermad
2
ghisler(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?
2
Fla$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
Re: Support for parameters when binding commands to hotkeys
Posted: 2023-05-25, 13:08 UTC
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.

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.
Thanks for the response of an adequate person!

Re: Support for parameters when binding commands to hotkeys
Posted: 2023-05-25, 13:32 UTC
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?
Re: Support for parameters when binding commands to hotkeys
Posted: 2023-05-25, 14:24 UTC
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?