[BUG (particular nice)] shortcut F10 assigns F9 too

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

[BUG (particular nice)] shortcut F10 assigns F9 too

Post by *Sheepdog »

Create a fresh Wincmd.ini with following content

Code: Select all

[Shortcuts]
F10=cm_OpenTransferManager
[Configuration]
DirTabOptions=891
where the command assigned to F10 should be any internal command.

Start Total Commander with this ini (you may use "/i=" parameter.

When you press F9 the command assigned to F10 will be executed.

This Bug was initially reported by SanskritFritz in this thread http://ghisler.ch/board/viewtopic.php?t=9927

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

All undocumented shortcuts should be either removed from TC or finally be fully documented!
It's not ok that TC does *whatever* actions on keypresses which the user can only be aware of when reading this forum regularly.

Besides my usual rant: I confirm the bug! ;)

Icfu
This account is for sale
User avatar
petermad
Power Member
Power Member
Posts: 14806
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

2Sheepdog

See also: http://ghisler.ch/board/viewtopic.php?p=81876#81876 where I elaborate the bug a little more.

I have DirTabOptions=1016 - so I am not sure DirTabOptions has any significance for the bug.
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
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

You are probably right, DirTabOtions may be neglectible.

When I tried first to reproduce it with SansKritFritzs wincmd.ini it did not work for me with only

Code: Select all

[Shortcuts]
F10=cm_OpenTransferManager 
But later this evening I could reproduce it with only this setting set, too.

I guess there is a coherence between the 'Activate Menu' and 'Actviate left or rigth Menu'' functionality and this bug.

It seems that it was introduced with Windows Commander 4.02 where user defined Keyboard shortcuts were introduced. I could only test with 4.03 because of the lack of V 4.02.

I guess noone who redefined F10 has ever used the F9 feature to activate the menu but Alt instead. Thats why this bug has been never noticed.

Maybe it's time to give up compatibility, remove the default F10 action and introduce instead 'cm_SrcActivateMainMenu' instead to struggle with the code to make those never used functionality work. F10 could set ba default to the new 'cm_SrcActivateMainMenu', too.

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

The problem is the following:
F10 is used by Windows itself to focus the main window. The Norton Commander, however, uses F9. The problem is that there is no method to programmatically focus the main Window! So when Total Commander receives the F9 keypress notification, it sends itself an F10 keypress, which makes Windows focus the main window.

Therefore you can redefine F9, but you cannot redefine F10.
Author of Total Commander
https://www.ghisler.com
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

but you cannot redefine F10
:?: I did redefine the F10 key long time ago!
I switched to Linux, bye and thanks for all the fish!
User avatar
petermad
Power Member
Power Member
Posts: 14806
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

2SanskritFritz
I did redefine the F10 key long time ago
but you cannot redefine F10
I think Christian means that you should not redefine F10
Last edited by petermad on 2006-02-22, 13:52 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
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

ghisler(Author) wrote:The problem is that there is no method to programmatically focus the main Window! So when Total Commander receives the F9 keypress notification, it sends itself an F10 keypress, which makes Windows focus the main window.
What about sending [Alt] instead?


sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I don't know why it didn't work then, but I had to use F10.
Author of Total Commander
https://www.ghisler.com
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

That's really strange, then. Because here on Win XP SP2 [Alt] always works the same way as F10 does. And I can not remember this being different on any other OS I used.

Or do you send also F10 when Alt is pressed?

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
Post Reply