Synchronize Directories: no confimation for Permanent delete if to press Shift+Enter on "Delete..." context menu items
Moderators: Hacker, petermad, Stefan2, white
Synchronize Directories: no confimation for Permanent delete if to press Shift+Enter on "Delete..." context menu items
To reproduce:
1. Compare some locations in Sync Dirs, selet some items.
2. Call the context menu.
3. In context menu, with keyboard select "<- Delete left", "-> Delete right" or "Delete on both sides" item.
4. Press Shift+Enter: the files will be deleted permanently without a chance to cancel the action in "Confirm delete" dialog.
I'm not sure that this is intentinal, looks more like it's a part of Windows behavior.
Still the beahvior it is not expected, so even if it's impossible to make "Confirm delete" dialog apppear properly in this case, I suggest to detect if
the Shift was pressed while one of the "Delete ..." items was pressed with keyboard in the context menu,
and when delete process starts, show in delete progress dialog a 1 or 2 seconds delay so user could cancel an operation by pressing Esc key or "Cancel" button.
1. Compare some locations in Sync Dirs, selet some items.
2. Call the context menu.
3. In context menu, with keyboard select "<- Delete left", "-> Delete right" or "Delete on both sides" item.
4. Press Shift+Enter: the files will be deleted permanently without a chance to cancel the action in "Confirm delete" dialog.
I'm not sure that this is intentinal, looks more like it's a part of Windows behavior.
Still the beahvior it is not expected, so even if it's impossible to make "Confirm delete" dialog apppear properly in this case, I suggest to detect if
the Shift was pressed while one of the "Delete ..." items was pressed with keyboard in the context menu,
and when delete process starts, show in delete progress dialog a 1 or 2 seconds delay so user could cancel an operation by pressing Esc key or "Cancel" button.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Ukraine's National Bank special bank account:
UA843000010000000047330992708
- sqa_wizard
- Power Member
- Posts: 3893
- Joined: 2003-02-06, 11:41 UTC
- Location: Germany
Re: Synchronize Directories: no confimation for Permanent delete if to press Shift+Enter on "Delete..." context menu ite
Have a look at your settings (Configuration - Options - Operation - Copy/Delete).
Do you have enabled [x] Use Explorer delete method ?
In this case the deletion is done under the control of Windows explorer.
May it helps to enable the option to show deletion dialog at Recycle Bin settings.
Do you have enabled [x] Use Explorer delete method ?
In this case the deletion is done under the control of Windows explorer.
May it helps to enable the option to show deletion dialog at Recycle Bin settings.
#5767 Personal license
Re: Synchronize Directories: no confimation for Permanent delete if to press Shift+Enter on "Delete..." context menu ite
This option is disabled. If I use the touch pad or mouse buttons to click e.g. "-> Delete right" context menu item while Shift key is pressed, I get a confirmation dialog from TC like this one:sqa_wizard wrote: 2021-06-26, 14:58 UTC Have a look at your settings (Configuration - Options - Operation - Copy/Delete).
Do you have enabled [x] Use Explorer delete method ?
In this case the deletion is done under the control of Windows explorer.
Code: Select all
---------------------------
Confirm delete
---------------------------
RIGHT: Do you really want to delete the 3 selected files/directories?
---------------------------
Yes No
---------------------------
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Ukraine's National Bank special bank account:
UA843000010000000047330992708
- sqa_wizard
- Power Member
- Posts: 3893
- Joined: 2003-02-06, 11:41 UTC
- Location: Germany
Re: Synchronize Directories: no confimation for Permanent delete if to press Shift+Enter on "Delete..." context menu ite
I can confirm now the special behaviour.
1. Open context menu with mouse on an entry to synchronize
2. move cursor at this context menu to entry "-> Delete right"
3. Press SHIFT-ENTER key
=> a dialog (most likely confirmation) flashes for a 10th of a second
=> file is deleted without a chance to confirm
Seems the confirmation dialog is eating the same ENTER key
1. Open context menu with mouse on an entry to synchronize
2. move cursor at this context menu to entry "-> Delete right"
3. Press SHIFT-ENTER key
=> a dialog (most likely confirmation) flashes for a 10th of a second
=> file is deleted without a chance to confirm
Seems the confirmation dialog is eating the same ENTER key

#5767 Personal license
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Synchronize Directories: no confimation for Permanent delete if to press Shift+Enter on "Delete..." context menu ite
EDIT: I wasn't able to reproduce the problem when I pressed Shift+Enter normally.
The only way to reproduce it was to press and hold Enter. Then the keyboard would repeat the Enter key until "Yes" the confirmation dialog is pressed too.
I tried with and without the option "Use Explorer delete method".
Could you give me more information, please?
- Total Commander 32-bit or 64-bit?
- Windows version?
- Windows 32-bit or 64-bit?
The only way to reproduce it was to press and hold Enter. Then the keyboard would repeat the Enter key until "Yes" the confirmation dialog is pressed too.
I tried with and without the option "Use Explorer delete method".
Could you give me more information, please?
- Total Commander 32-bit or 64-bit?
- Windows version?
- Windows 32-bit or 64-bit?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Synchronize Directories: no confimation for Permanent delete if to press Shift+Enter on "Delete..." context menu ite
In a summer, 2021 I tested the partial fix of this issue in what was then private beta of TC 10.10 pre 3:
Christian Ghisler's guess it that that problem could be with key bouncing:
and which can be turned on with the dialog which appears if to hold the Shift key for 8 seconds), because on the video I sent by email, the possible double Enter was sent to the confirmation dialog immediately after context menu was closed, and there wasn't seem to be any noticeable delay between the repeated Enter keypresses that dialog received...
I wrote that it usually happens if to press Shift+Enter very fast, so like together, so it's possible to hit Enter at first, and asked to try to press Enter+Shift on delete item in context menu: the Enter will be send to the Confirmation dialog and files will be permanently deleted. Maybe that is a problem.
The goal of bugfix is to prevent unexpected deletion of files when user sends the Enter key to a context menu, but it goes to a confirmation dialog. As I see it, TC has to watch for that keyboard repeat delay since context menu shows up and a bit (a second or even less?) after context menu has been closed and confirmation dialog appeared - to prevent pressing Yes there by accident, whether it happens due to key bouncing effect or not...
The last reply on this I got from Christian Gisler is:
With the fix it's better but sometimes I can still reproduce the problem.history1050.txt wrote:30.06.21 Fixed: Synchronize dirs: Make sure the Enter key is not pressed any more when deleting files on the left/right via context menu before showing the confirmation dialog (not reproduced bug) (32/64)
Christian Ghisler's guess it that that problem could be with key bouncing:
And if this is the case, TC cannot wait:Christian Ghisler (by email) wrote:that could be a key sending two events (key bouncing effect).
TC waits for Enter being released before showing the delete confirmation
now. But if the key bounces, Windows will send two keypressed/rel[e]ased
events.
I wrote then that I dout it's a key bouncing problem (if by it was meant that option which allows Windows to ignore repeated keypressesChristian Ghisler (by email) wrote:At least for the keyboard repeat delay. That's the time the keyboard waits
after pressing and holding a key until it starts sending repeated keys.
[...]
The delay is what you configure in the control panel.
[...]
and which can be turned on with the dialog which appears if to hold the Shift key for 8 seconds), because on the video I sent by email, the possible double Enter was sent to the confirmation dialog immediately after context menu was closed, and there wasn't seem to be any noticeable delay between the repeated Enter keypresses that dialog received...
I wrote that it usually happens if to press Shift+Enter very fast, so like together, so it's possible to hit Enter at first, and asked to try to press Enter+Shift on delete item in context menu: the Enter will be send to the Confirmation dialog and files will be permanently deleted. Maybe that is a problem.
The goal of bugfix is to prevent unexpected deletion of files when user sends the Enter key to a context menu, but it goes to a confirmation dialog. As I see it, TC has to watch for that keyboard repeat delay since context menu shows up and a bit (a second or even less?) after context menu has been closed and confirmation dialog appeared - to prevent pressing Yes there by accident, whether it happens due to key bouncing effect or not...
The last reply on this I got from Christian Gisler is:
It would be nice if someone could help to figure out with reproducing of the issue and finding a solution.Christian Ghisler (by email) wrote:[and] So far i couldn't reproduce the error any more after my fix.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Ukraine's National Bank special bank account:
UA843000010000000047330992708
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Synchronize Directories: no confimation for Permanent delete if to press Shift+Enter on "Delete..." context menu ite
Sorry, I don't have any better solution. Try using the Enter instead of the Return key (or vice versa) to check if that key also causes the same effect. If not, then your Return key is defective.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Synchronize Directories: no confimation for Permanent delete if to press Shift+Enter on "Delete..." context menu ite
I wasn't able to reproduce the problem (tc 10.00 and 10.50 rc1, 32- and 64-bit, Win10 21H1), regardless of the used combination of keys (shift, enter, return).
So I would assume that this is hardware related.
Actually, when the confirmation dialog comes up, the focus is set to the YES button.
Changing the focus to the NO button would prevent the accidentally deletion.
So I would assume that this is hardware related.
Actually, when the confirmation dialog comes up, the focus is set to the YES button.
Changing the focus to the NO button would prevent the accidentally deletion.