Disable middle click multi select file/folder

Whenever I middle click on a file or folder, the file/folder gets selected.
It's multi-select so each file/folder I middle click gets added to the selection, I want to turn this off if possible.

First I tried another mouse in another USB port just to check if it's not an mouse issue, but the middle click issue persists

Then I set the below settings in an attempt to stop selecting items when middle clicking, but the issue still persists.

From this topic: How to disable middle click selection?
I read this topic: Middle click folder to open in new folder tab
And I set/unset:

  • Preferences / Folder Tree / Selection Events

Emptied "Middle mouse button"

  • Checkbox is turned off: Preferences / File Displays / Mouse /

Turned off: Single middle click to trigger middle double-click events on background and files
Turned off: Single click to open...

Other settings:

  • Settings > Filetypes > All files and folders

There is only "Middle double click" (no "Middle click")
And I can not create a new one (button "New..." is greyed out)

  • Settings > File Display Mode > Power Mode Buttons

Middle button disabled (drag & drop also disabled)

  • Settings > Toolbars > Options

Turned off: Simulate middle mouse click...

1 Like

We can add an option for this, but why do you want to turn it off? The middle mouse button would then not do anything by default.

In my situation:
I am using listary and want have the middle mouse button be available for listary and not do anything else. Also I might want to reserve for other functions/external tools/...

If you could add a way to set the function of the middle mouse button that would be very welcome. I don't know how others think about this though. But I hope you could add it.

Thanks!

2 Likes

That makes sense!

1 Like

Did we get any update for this?

1 Like

I'm also very interested in this. I'd like to open a file in an external app (or do some scripting operations targeting it) using the middle-click, but without changing the selection.

I spent a few hours looking, but I couldn't find any alternative way to access the file under the mouse cursor.

GetFocusItem used with a hotkey combo was close, but not quite what I needed. I discovered that 'mouse-over highlight' and 'focused' are separate things.

1 Like

Checkbox mode may be what you want, as that is exactly what it was designed to do.

Stopping middle-click doing anything in Opus probably won't help you, since there's no way for a script to find "the file under the mouse" if it hasn't been clicked on.

Hmm I actually meant to post this in the context of the other thread (linked below), it probably makes more sense there (I had both open while researching the issue... that's what I get for posting while tired):

It might be a little out of place in this thread now, but I'll follow up since I started.

=========

In my case, I was trying to use middle-click events to execute a command/script (set up in File Type->Events), but the multi-select functionality was still in the way.

Or to generalize: The 'mandatory selection' behavior of any type of click can be in the way for some use-cases.

I did more research while writing this draft, and I just found a workaround to get mostly what I want. I ended up switching to using left-click instead of middle-click in this case, since it worked more smoothly with a selection caveat (mentioned below).

Workaround:

Result behavior: Ctrl + double-click a file to set it as 'focused' and 'deselected', then run a script against it. (Can also set up middle click for the same.)

I found this tip from an old post or yours, and was able to use the first part of the command to change the focused file while leaving the selections on other files.

So first, under File Type -> Events -> Left double-click + Ctrl, I can specify the command: Select DESELECT MAKEVISIBLE EXACT {file|noterm}

Then I can add a custom script command as part of the click event on newly-focused file, or run a separate hotkey script.

Example hotkey:

function OnClick(clickData)
{
	DOpus.ClearOutput();
	var cmd = clickData.func.command;
	cmd.deselect = false; // Prevent automatic deselection
	focused_item = clickData.func.sourcetab.GetFocusItem()

	// <Perform commands with focused_item here>
}

The minor limitation is that if I'm targeting one of the files I had already selected, that file's selection will be cleared. However, since Ctrl + left single-click already toggles selection, it's not too flow-breaking to toggle back.

Here's another request for optionally disabling MMB-selection. (Purpose.)

It's coming. (Already written, in fact, but not released yet.)

3 Likes

Hi, I'm new to Directory Opus, I'm loving it so far. Here's my situation with the middle button. Up until now I was using an Autohotkey script that enabled me to middle-click anywhere in an Windows Explorer window to "go up back" to the parent directory, in other words, not only empty background but also files. On directories that contain many files there may not be any empty background space so the way I had this working was very convenient. I can adapt my script to work with Directory Opus but it would be nice if I could just use built-in functionality so I don't need to use a script which can be a kludge.

I understand the current multiples selection middle button behavior cannot be disabled although an option to do so will be rolled out in an future update, but I wanted to comment on a couple of points that may have slipped under the radar.

Firstly, the option Single middle click to trigger middle double-click events on background and files. doesn't appear to work correctly. It does works on the background, but on files it just selects multiple files/folders, as usual.

The other problem is that the middle button on files can only add files to the selection, in other words, if a file is middle-clicked once it gets selected, and if middle-clicked a second time it remains selected (i.e. nothing happens), so with the middle button the selection just keeps growing. When I Ctrl-Click a file that is part of the selection it gets deselected. Ideally the middle click should work like Ctrl-Click.

1 Like

Opus 13 splits those into separate settings for files and the background, plus a new option to turn off middle-click to toggle selection.

If you want an AHK script to handle middle-clicks instead of Opus, you'd want to turn both of these off:

And also ensure the middle button options here are off:

They should toggle the selection, in all modes other than Power Mode. Power Mode can be different, depending on your configuration. (Redefining what mouse buttons do is more or less what Power Mode is for.)

2 Likes

Just installed Opus 13, still multi-selects even with the single click toggle off.

The option shown above works OK here. Make sure OK or Apply are clicked after changing it, and that you're using Details mode, not Power mode.

Nope, no difference. Using Details mode. Also disabling Single middle click to trigger file and folder just makes middle click do nothing altogether.

If they're both disabled then middle-clicks wouldn't do anything, which I assumed was the aim.

Taking a step back, what do you want middle-clicks on files to do?

I want it to open the clicked folder in a new tab without multi-selecting in the previous. Sometimes I'll open tabs of several folders in a directory, then go back to find they're all selected.