Delete Key Moves Selected File to Trash

I miss the old Finder where you could have a file selected, press the Delete key, and the file would be moved to the trash. Is there any way to accomplish this in Keyboard Maestro particularly is there a way to limit that macro to the Finder only?

1 Like

Hey Charles,

Delete

-Chris

3 Likes

:facepalm: Sorry to have bothered.

That triggers an annoying dialog asking if I want to delete. I only use ⌘del when I want to delete, and I do it too often to tolerate the nagging dialog. Is there a workaround?

Are the things you are trying to delete on a remote volume? You should only be getting that dialog when items will actually be deleted (as opposed to being moved to Trash, which is what happens with local files).

You can confirm that dialog with ⌘D, so your routine would be ⌘⌫ ⌘D, but the only ways I know of to suppress it altogether would be to use rm in the shell or the KM "Delete File" action.

You'd have to use rm -r or the KM action's "Delete Directory" option to also cope with folders. And since you'd have to pass the current Finder selection or similar as an argument this could go horribly wrong...

1 Like

I access files over the LAN frequently, which is why I made this macro (or rather pair of macros): LAN Trash (trash files on SMB shares instead of deleting them). I do think that Apple should have come up with their own solution by now, but then again, I do not know of anyone else who uses those macros, so I suppose not many people find the inability to trash files remotely to be a problem.

I would, but I have to consider my co-workers! Confusion would abound...

Nitpick: I think the README for the client macro is wrong:

image

But, given there's only one macro in the "LAN Trash on server" Macro Group, it's not that much of a problem.

1 Like

Of course. Although I wondered about, even, long-distance SMB shares, the idea was centred on home LAN use by clued-up users. “Get off my LAN!” :farmer:

Thanks, well spotted. I have updated the macro.

I presume that's a nod to the famous line from Air Force One. You just removed the bounding letters, which is quite witty.

Thanks, but no, I haven’t seen that (looks up what it is, even!). I was just referring to the cliché (meme) of farmers yelling “Get off my land” to unwelcome outsiders.

No, they're not on a remote volume — unless having them in a Dropbox folder counts?

No, ⌘D does not confirm the dialog. I've found that ⌘D alone is sometimes enough, but not always.

This is my system at the moment.

Is this a solution to my issue if there is no LAN involved?

(So we are in sync, note that my reply was specifically to @Nige_S’s point about remote volumes, and that was before you also replied, advising that a remote volume was not involved. At least we have ruled that out.)

My only further guess is that the problem could perhaps be due to a file/folder/volume ownership problem. I am stubbornly avoiding MacOS Sequoia, so I should leave other users of it to say whether that aspect might be worth looking into.

There is a topic on Reddit that looks as though it may be relevant to your problem:

Sequoia Home Folder Permissions - What is going on?!

Be sure to have backups before you try anything mentioned in that thread, of course, and don’t proceed with anything that you are not sure about.

The problem is relatively recent, so that tracks, but I'm not certain it started with Sequoia. Thanks for the feedback.

1 Like

Yes, I am not aware that Sequoia should have introduced such problems, so it might just have been roughly coincidental.

I am being cautious about giving you specific advice when it comes to options that involve data migration, because either you are confident doing that sort of thing, or else should get a friend or local “genius” to guide you through it. None of that should be particularly difficult, but where your data is concerned... be careful. Having copies of your files on at least two different physical drives, and preferably three, would be prudent—just in case!

It shouldn't do -- default behaviour for Dropbox files/folders is that Finder moves the target to Trash and then the Dropbox Engine syncs the changes.

That you reference Dropbox begs the question -- is this happening for every file/folder you try to delete, or only some? If only some, what's the commonality?

Was that second ⌘D meant, or should it have been ⌘⌫?

Assuming you haven't set ⌘D as a macro hot key trigger or have some similar "interruption", it should always select the "Delete" button in the Finder confirmation dialog. If it sometimes does and sometimes doesn't then check it is a Finder dialog and not from some other utility like Dropbox.

If you meant that ⌘⌫ is sometimes enough but sometimes brings up the confirmation dialog, that points to an issue with the things you are trying to delete. It shouldn't be permissions -- that should spawn an authentication dialog -- and a locked file brings up a different dialog with "Stop" or "Continue", and it should be obvious why since it says the file is locked.

So keep doing what you are doing and make a careful note of when the problem does and doesn't crop up. From that you should be able to work out what particular issue is causing the the confirmation to spawn -- and once you know that you can look for a fix.

It really doesn’t. :wink:

You are probably right but under some unusual circumstances (I could give examples but they are not directly relevant) the Finder seems to be incapable of expressing the nature of the problem, or will warn when there is no need for a warning, so from personal (anecdotal) experience, I would check for ownership issues, if only to rule them out.

:thinking: Actually, one of those examples that I had in mind involved the Finder getting confused over symbolic links. @DrMajorBob, if you routinely use those, that might be something to check.

Setting up a second account for test purposes may yield more clues, if you compare its behaviour with that of the main account.

Since I'm not engaging in classical rhetoric or logic, you may want to keep scrolling down to the Vernacular section... :stuck_out_tongue:

I tried everything I could think of before posting, in case something had changed (again) in 15.6 -- including incorrect permissions. The closest I could get (for a local volume) to @DrMajorBob's report is when trying to insta-delete using ⌥⌘⌫, which does bring up a confirmation because there's no Trash safety net.

So it may simply be an ⌥ key that's yet to be mentioned, or an utility that switches the "Trash" and "Delete" shortcuts (AFAIK you can't do that yourself in Keyboard Shortcuts), or even a KM macro.

1 Like

Your argument is predicated on the assumption that I had not already done so.[1] Yes, there is “… a usage distinct from that in logic but widespread, though some consider it incorrect”. Please excuse my pet peeve as it strains at its leash.

There are indeed lots of variables when it comes to an account that is in regular use. If the same issue does not occur with an account that has been freshly set up (for test purposes), one can at least conclude that there is not a system-wide problem.


  1. You’ll be begging the question before you know it! ↩︎