solved with workaround [TC 4.03 - TC 11.00b6] problems when remapping shortcut for cm_copy

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

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

solved with workaround [TC 4.03 - TC 11.00b6] problems when remapping shortcut for cm_copy

Post by *petermad »

I can trace this bug all the way back to TC 4.03

Make a clean wincmd.ini file with these two sections:

Code: Select all

[Shortcuts]
Q=cm_Copy
C+Q=cm_Copy
A+Q=cm_Copy
S+Q=cm_Copy
CA+Q=cm_Copy
CS+Q=cm_Copy
AS+Q=cm_Copy
CAS+Q=cm_Copy

[ShortcutsWin]
Q=cm_Copy
C+Q=cm_Copy
A+Q=cm_Copy
S+Q=cm_Copy
CA+Q=cm_Copy
CS+Q=cm_Copy
AS+Q=cm_Copy
CAS+Q=cm_Copy
Try all the different key combinations - the only two that gives the correct action is Q and Win+Q

The other combinations opens either the "Copy" dialog for the same panel, the "Create Shortcut" dialog or the "Pack Files" dialog.
Last edited by petermad on 2023-06-14, 19:56 UTC, edited 1 time in total.
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
Hacker
Moderator
Moderator
Posts: 13102
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: [TC 4.03 - TC 11.00b6] problems when remapping shortcut for cm_copy

Post by *Hacker »

petermad,
Isn't that more or less known and by design? Not saying it's good, just that it's known and expected(?).

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
petermad
Power Member
Power Member
Posts: 14914
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 4.03 - TC 11.00b6] problems when remapping shortcut for cm_copy

Post by *petermad »

I can understand that prior to TC 4.02 (before keyboard remapping was introduced), hardcoding the modifier keys to the command and not to the keyboard combination was done. but now except for a very few commands, it is no longer necessary.

It seems to only be a few command that has modifiers hardcoded: cm_copy (Ctre, Alt, Shift), cm_List (Alt, Shift) and F8 (Shift)

Examples of hardcoded modifier/command sets, and the equivalent command
Shift + cm_Copy = cm_CopySamepanel
Alt + cm_Copy = cm_PackFiles = cm_CopyToArchive
Alt + Shift + cm_copy = cm_MoveToArchive = cm_PackFiles /M1
Ctrl + cm_copy = cm_CreateShortcut
Ctrl + Shift + cm_copy = cm_CreateShortcut

cm_List = cm_ListOnly
shift + cm_List = cm_ListMulti
Alt + cm_List = cm_ListExternal
Alt + Shift + cm_List = cm_ListInternalOnly
OR
cm_List = cm_ListMulti
shift + cm_List = cm_ListOnly
Alt + cm_List = cm_ListExternal
Alt + Shift + cm_List = cm_ListInternaOnly
OR
cm_List = cm_ListExternal
shift + cm_List = cm_ListMulti
Alt + cm_List = cm_List
Alt + Shift + cm_List = cm_ListInternalOnly


There is no explicit command for shift + cm_Delete - it depends on the configuration

And why is C+Q=cm_Copy doing the same as Crtl+Shift+F5 - it is not even the same modifier combination?


These commands are configurable, but can all be split up in two explicit commands
cm_SpreadSelection = cm_SelectFiles OR cm_SelectBoth
cm_SelectAll = cm_SelectAllFiles OR cm_SelectAllBoth
cm_ClearSelCfg = cm_ShrinkSelection OR cm_ClearFiles
cm_ClearAllCfg = cm_ClearAll OR cm_ClearAllFiles
cm_ExchangeSelection = cm_ExchangeSelFiles OR cm_ExchangeSelBoth

These commands are configurable, but can not be split up in two explicit commands
cm_SpreadSelectionCurrentExt
cm_SelectCurrentExtension
cm_SelectCurrentName
cm_SelectCurrentNameExt


So it seems to me that all commands except the following can be released from hardcoded modifiers:
cm_Delete
cm_SpreadSelectionCurrentExt
cm_SelectCurrentExtension
cm_SelectCurrentName
cm_SelectCurrentNameExt
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
jinsight
Senior Member
Senior Member
Posts: 299
Joined: 2003-02-25, 19:47 UTC
Location: Wooster, Ohio, USA

Re: [TC 4.03 - TC 11.00b6] problems when remapping shortcut for cm_copy

Post by *jinsight »

Support fixing code from yesteryear and no loner appropriate.
License #1945
Windows 10 Pro x64
Version 22H2 (OS Build 19045.3930)
TC 11.00 x64 and x86, Everything 1.5.0.1366a x64, QAP 11.6.3.1 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48232
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 4.03 - TC 11.00b6] problems when remapping shortcut for cm_copy

Post by *ghisler(Author) »

Currently you can't use cm_copy with parameters in hotkeys because it expects the parameter in the command field. This will be added in beta 7.
When using cm_copy with parameters, it ignores any modifier keys like Ctrl and Shift.
I will not change the behavior when cm_copy is used without parameters, it would break many user settings.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14914
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 4.03 - TC 11.00b6] problems when remapping shortcut for cm_copy

Post by *petermad »

2ghisler(Author)
I will not change the behavior when cm_copy is used without parameters, it would break many user settings.
OK - then maybe add a couple of new commands equivalent to this:
history.txt wrote:02.03.22 Added: New internal commands cm_CopyToArchive/cm_MoveToArchive to open pack dialog with "Move" option unchecked/checked independent of the state of the Ctrl/Alt/Shift keys (32/64)
I could suggest cm_FileCopy, cm_DeleteToRecyclebin and cm_DeleteDirectly to supplement cm_Copy and cm_Delete

For cm_List there is already commands independent of of the state of the Ctrl/Alt/Shift keys.
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
ghisler(Author)
Site Admin
Site Admin
Posts: 48232
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 4.03 - TC 11.00b6] problems when remapping shortcut for cm_copy

Post by *ghisler(Author) »

Unfortunately this comes too late because I have already contacted all translators, sorry.
Just use cm_copy /V0 or some other parameter set to 0 (=off) to force the copy function.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14914
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 4.03 - TC 11.00b6] problems when remapping shortcut for cm_copy

Post by *petermad »

I tried with:

Code: Select all

C+Q=cm_Copy
C+Q_params=/V0
but it didn't change anything, but maybe it will in beta7

Maybe cm_Delete could be changed to accept parameters:
0 = as congfigured
1 = to Recycle bin
2 = directly

That does not require translation, only to be added to the Help file.
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
ghisler(Author)
Site Admin
Site Admin
Posts: 48232
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 4.03 - TC 11.00b6] problems when remapping shortcut for cm_copy

Post by *ghisler(Author) »

but it didn't change anything, but maybe it will in beta7
Yes, as I wrote elsewhere, you can't use cm_copy with parameters for hotkeys yet. Please wait for beta 7.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14914
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 4.03 - TC 11.00b6] problems when remapping shortcut for cm_copy

Post by *petermad »

history.txt wrote:09.06.23 Fixed: Parameters didn't work in hotkeys and the command line for cm_Copy, cm_RenMov and cm_CreateShortcut (32/64)
Hence a command like:

Code: Select all

[Shortcuts]
C+Q=cm_Copy
C+Q_params=/G0
Now opens the Copy dialog and not the Create shorcut dialog :-)
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
Post Reply