use mouse wheel click to open folder in new tab

Here you can propose new features, make suggestions etc.

Moderators: sheep, Hacker, Stefan2, white

Post Reply
knoeppes
New Member
New Member
Posts: 1
Joined: 2010-02-03, 03:07 UTC

use mouse wheel click to open folder in new tab

Post by *knoeppes » 2010-02-03, 03:15 UTC

great product, i love totalcmd!

how about adding the feature when you use the mouse wheel
to click on a folder to open it in a new tab?
(background/foreground is user choice), this would be similar to firefox for example.

opinions? interested to hear back.
cheers,

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

Post by *MVV » 2010-02-03, 05:03 UTC

Mouse wheel click is usually used for fast scrolling.

But you may use some script to get what you want even w/o such feauture in TC directly.

Since I usually use keyboard when browsing folders in TC, I press Ctrl+Up to open focused folder in new tab. Also button with command cm_OpenNewTabBg may be added to button bar.

User avatar
Stance
Power Member
Power Member
Posts: 1075
Joined: 2005-03-29, 06:26 UTC

Post by *Stance » 2010-02-03, 05:55 UTC

knoeppes wrote:how about adding the feature when you use the mouse wheel
to click on a folder to open it in a new tab?
(background/foreground is user choice) [...]
My support for this proposal, especially if it would be configurable. I would certainly use this feature.

User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom » 2010-02-04, 22:00 UTC

Whether or not you'll find this useful;
This is how you would do just that with AutoHotKey:

If your TC Setting/Preferences:
Folder Tabs
[ ] Ctrl+Up opens new tab in foreground
Then set
TCCtrlUpNewTabFore := 0
else, if that option is checked:
TCCtrlUpNewTabFore := 1

This should be checked (so that Ctrl+Tab Shift+Ctrl+Tab works below):
[x] Open new tabs near current tab

Code: Select all

MButtonTabForeground := 1
; There is a way to parse TC's wincmd.ini file and set this from TC's 
; actual setting, but I don't have access to my PC and AHK functions.
TCCtrlUpNewTabFore := 0

#ifWinActive ahk_class TTOTAL_CMD
{
	MButton::
	{
		KeyWait, MButton
		MouseGetPos, ,,,aControl
		if( RegExMatch( aControl, "^TMyListBox(1|2)$"))
		{
			Send, ^{Up}
			if( MButtonTabForeground && !TCCtrlUpNewTabFore )
				Send, ^{Tab}
			else
			if( !MButtonTabForeground && TCCtrlUpNewTabFore )
				Send, +^{Tab}
		}
		else
			Send, {MButton}
	return
	}
return
}

User avatar
Stance
Power Member
Power Member
Posts: 1075
Joined: 2005-03-29, 06:26 UTC

Post by *Stance » 2010-02-06, 18:38 UTC

Balderstrom
Thanks for the effort. I have installed Autohotkey and created a AHK-Script with the code.

Your script is functional when the filelist has the focus (KatMouse?) and the directory is under the cursor. I am using different Configurations, partly with "SingleClickStart=6". Your script seems to work even in the "BreadCrumbBar", but only with directories that contain subdirectories (could have been an issue with UAC on Vista). I was running TC from USB.

User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom » 2010-02-07, 01:47 UTC

I use the "TMyListBox" and the MouseGetPos to prevent unwanted actions from occuring (when the mouse is not actually hovering over the FileList panels). This allows the Middle Mouse Button to work for possible other actions when the mouse pointer is placed on a different gui element, and for it to not occur if when the Middle button is released the mouse pointer is outside of TC's window.

To remove such, the script would possibly incur unwanted behaviour, as well as capturing the Middle Button at all times (within TC).

Code: Select all

MButtonTabForeground := 1 
TCCtrlUpNewTabFore := 0

#ifWinActive ahk_class TTOTAL_CMD 
{ 
   MButton:: 
   { 
      KeyWait, MButton 
      Send, ^{Up} 
      if( MButtonTabForeground && !TCCtrlUpNewTabFore ) 
         Send, ^{Tab} 
      else 
      if( !MButtonTabForeground && TCCtrlUpNewTabFore ) 
         Send, +^{Tab} 
   } 
return 
}

User avatar
Stance
Power Member
Power Member
Posts: 1075
Joined: 2005-03-29, 06:26 UTC

Post by *Stance » 2010-02-07, 13:28 UTC

Balderstrom wrote:This allows the Middle Mouse Button to work for possible other actions when the mouse pointer is placed on a different gui element,[Snip...]
The Middle Mouse Button already opens a new Tab by clicking on a drive-icon in Total Commander.
The developer (or the AHK-script-author) may enhance these TC-function from drives also to directories.

Post Reply