Support ESC to cancel Copy to a phone

Here you can propose new features, make suggestions etc.

Moderators: sheep, Hacker, Stefan2, white

Post Reply
Slavic
Member
Member
Posts: 160
Joined: 2006-02-26, 15:41 UTC
Location: Moscow, Russia

Support ESC to cancel Copy to a phone

Post by *Slavic »

Please add the support of the ESC key to cancel a copy operation to/from external USB device, e.g. smartphone. Currently only [ No ] button in this dialog works, but no ESC key, nor [x] in the top right corner. Using ESC is very traditional, and lack of it here is unexpected and sad.
Desktop: Windows 8.1 x64, TC 9.51. Mobile: Pixel 3, Android 11 beta 1, TC 3.01b2

Slavic
Member
Member
Posts: 160
Joined: 2006-02-26, 15:41 UTC
Location: Moscow, Russia

Re: Support ESC to cancel Copy to a phone

Post by *Slavic »

I have done some searches of this dialog, here are the results.

To show the dialog for copy to/from USB device, TC uses the Win32 API function MessageBox(), which is a simple function to show the short message on the screen, by default in the centre of screen (you can notice the difference from "normal" Copy/Move dialog, which is shown in the centre of TC window). As described in MSDN, MessageBox has some parameters, the last of them is uType, which defines the look of message window and its buttons.

It seems that currently TC calls this function with the uType value MB_YESNO, which shows the buttons [ Yes ] and [ No ], but ignores the [ x ] in the top right corner (it is disabled) as well as Esc key. To enable them, need to use any other value of uType which shows the button [ Cancel ], for example, MB_OKCANCEL. In such case, dialog will show the buttons [ OK ] and [ Cancel ] instead, and Esc will work as expected, closing the dialog like Cancel. The dialog's functionality will remain the same, also the button names will be in line with the buttons in other TC dialogs.
Desktop: Windows 8.1 x64, TC 9.51. Mobile: Pixel 3, Android 11 beta 1, TC 3.01b2

User avatar
MVV
Power Member
Power Member
Posts: 8503
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Re: Support ESC to cancel Copy to a phone

Post by *MVV »

Well, it is not only TC who uses Yes-No logic because it is more human-readable than Ok-Cancel (compare "Do you want to do something? Yes-No" and "You are going to do something. Ok-Cancel"), especially if the only reason of the latter is closing by Esc. And there are more cases in TC when Yes-No dialogs are used (e.g. buttonbar button deletion confirmation).

You can try my tiny NoClose library from this post, it allows closing Yes-No dialogs by Esc, I use it for years and forgot about this annoyance.

Slavic
Member
Member
Posts: 160
Joined: 2006-02-26, 15:41 UTC
Location: Moscow, Russia

Re: Support ESC to cancel Copy to a phone

Post by *Slavic »

Thanks for this suggestion, MVV, but no. It should work similarly for everyone, not only for me. Yes, there may be the situations where the buttons Yes and No are really important because a user should answer the question of critical importance, so allowing to simply close this dialog by Esc would not be a good choice. Because of this, MB_YESNO option should exist and work as the API creators made. Of course, cancelling of the file copy to USB device isn't such case, it should look in line with other Copy/Mode TC dialogs, where the buttons [ OK ] and [ Cancel ] are traditionally used and where Esc works as expected.

As a UI tester (in some other projects) I always try to look at UI from the point of ordinary user, where the common default approach and similarity play important role. I try to forget my professional level and sometimes may ask obvious and maybe silly questions, all for the sake of the future end user.
Desktop: Windows 8.1 x64, TC 9.51. Mobile: Pixel 3, Android 11 beta 1, TC 3.01b2

User avatar
MVV
Power Member
Power Member
Posts: 8503
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Re: Support ESC to cancel Copy to a phone

Post by *MVV »

I understand your point of view but you can't ask every software developer to fix all dialogs, and there is a solution that already works for now. :)
Unfortunately standard Yes-No message boxes don't have any option to close by Esc, though TC may add a hook itself, so it will work for all users.

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 39801
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Support ESC to cancel Copy to a phone

Post by *ghisler(Author) »

The problem is that this isn't even Total Commander's dialog - copying from/to virtual folders goes via Copy+Paste, which is a part of Windows itself.
Author of Total Commander
http://www.ghisler.com

Post Reply