Prevent delete button usage in the folder tree possible?

Hi,

is it somehow possible (eg. by customizing the keys) to prevent folder deleting via the delete button while the focus is on the folder tree?
In other words, I don't want to be able to delete folders via the keyboard using the delete button (or even more dangerous shift+delete) while working in the folder tree, as this can be very dangerous. :blush: .

Another question: Is it possibel to somehow dimm the color of the file display while the focus is on the folder tree (like the dimming that happens to the green path bar above the file display when the programm loses focus to an other application) so it is more obvious that the focus is on the folder tree and not in one of the file views.

Sam

Regarding question 1 (you should better post each question separately), you can add the @confirm command
to your standard delete command (-> settings -> customize -> keys (tab) (search the delete command in the field at the
bottom).

@Confirm caution, the item is going to be deleted|continue|abort delete

[ul][li]Delete confirmations:

Regarding Abr's post above mine, a better way to get delete confirmations is to turn them on via Preferences / File Operations / Deleting Files: Preferences / File Operations / Deleting Files / Ask for confirmation before commencing delete.

[/li]
[li]Prevent deletion from the tree:

I don't think there is a way to make the Delete button/key do nothing when the folder tree is active, but you can make it always act on the file display and never on the tree, if that helps.

If you edit the toolbar (Settings -> Customize Toolbars) and inspect the Delete button, it should run this at the moment: Delete SHIFT

There are also separate hotkeys (Settings -> Customize Toolbars -> Keys) for the Delete key (runs the Delete command without any arguments) and the Shift + Delete key (runs the Delete SHIFT command).

If you add the NOFROMFOCUS argument to the toolbar button and the two hotkeys, they will delete what's selected in the file display even when the tree is active:








[/li]
[li]Dimming the file display when inactive:

Make sure these two options are turned on, below Settings -> Preferences / Display / Options:

[ul][li]Fade selected item colors when file display does not have focus[/li]
[li]Fade selected item colors when tree does not have focus[/li][/ul]

(You can also change the fading amount via the opacity settings next to each option.)

When those are on, the selected items in the tree and file display will be brighter when active and lighter when inactive, which should help avoid accidentally acting on the wrong things.[/li][/ul]

Thank you for your fast answer.

Is it possible to use vbscripting for the delete key (like with file renaming in Script mode) to make this conditional to someting like "if FocusIsOnFolderTree then AksForConfirmation" or is the Command Editor limited to the commands arguments and modifiers from its drop down lists?

Would I be able to do this if I write my own function?
Is it possible for a script/function to somhow find out if the focus is on the Folder Tree (or if a File View has the focus, would be good enoug too)?

Thank very much Leo, that is exacly what I wanted (the NOFROMFOCUS thing). Kindly ignor my post above this one.