Middle click anywhere in panel - up one level

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
zaxzax
Junior Member
Junior Member
Posts: 2
Joined: 2006-12-02, 12:25 UTC

Middle click anywhere in panel - up one level

Post by *zaxzax »

Is this possible in Total commander, and if yes - how? I saw this in Gnome commander and I found it to be very useful.
User avatar
Hacker
Moderator
Moderator
Posts: 13102
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

No, not without AutoHotkey. Here is a script for AutoHotkey which comes cloes to what you would like, however, it sets focus on the panel where you click.

Code: Select all

#NoEnv

#IfWinActive, ahk_class TTOTAL_CMD
$MButton::
	MouseGetPos, , , , Control
	IfEqual, Control, TMyListBox1
	{
		ControlFocus, %Control%
		PostMessage, 1075, 2002
		Return
	}
	IfEqual, Control, TMyListBox2
	{
		ControlFocus, %Control%
		PostMessage, 1075, 2002
		Return
	}
Return
HTH
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
roentgen
Power Member
Power Member
Posts: 757
Joined: 2005-12-03, 19:58 UTC

Post by *roentgen »

This is discrimination if you ask me :wink:
If I was a middle click mouse button I'd feel hurt right now :P (why do the other buttons get so much attention?)

Hasn't the time come to bug Mr Ghisler about these little discrepancies???
TC for Linux please!
zaxzax
Junior Member
Junior Member
Posts: 2
Joined: 2006-12-02, 12:25 UTC

Post by *zaxzax »

Hacker wrote:No, not without AutoHotkey. Here is a script for AutoHotkey which comes cloes to what you would like, however, it sets focus on the panel where you click.

Code: Select all

#NoEnv

#IfWinActive, ahk_class TTOTAL_CMD
$MButton::
	MouseGetPos, , , , Control
	IfEqual, Control, TMyListBox1
	{
		ControlFocus, %Control%
		PostMessage, 1075, 2002
		Return
	}
	IfEqual, Control, TMyListBox2
	{
		ControlFocus, %Control%
		PostMessage, 1075, 2002
		Return
	}
Return
HTH
Roman
Thanks! Exactly what I was looking for. Too bad it isn't implemented in TC
rojer_31
Junior Member
Junior Member
Posts: 15
Joined: 2005-05-26, 20:38 UTC
Contact:

A small fix

Post by *rojer_31 »

When you use the above script, middle clicking on a tab to close it stops working. I have been so used to this in many applications that I needed a workaround.
So I added a few lines to fix that. But you'll need to enable "Close tab on double click" for this to work:

Code: Select all

;Middle click anywhere in panel - up one level with fix for middle click close tab 
; Important make sure that double click to close tab is enabled for middle click to close tab to work
#IfWinActive, ahk_class TTOTAL_CMD 
MButton:: 
   MouseGetPos, , , , Control 
   IfEqual, Control, TMyListBox1 
   { 
      ControlFocus, %Control% 
      PostMessage, 1075, 2002 
      Return 
   } 
   Else{
   Click
   }
   IfEqual, Control, TMyListBox2 
   { 
      ControlFocus, %Control% 
      PostMessage, 1075, 2002 
      Return 
   } 
   Else{
   Click 
   }
Return
#IfWinActive
If there is a simpler way to do it, (many here are autohotkey experts :) ) please post it. Also I am using TC 7 Beta 2 for testing this.
Visit bootcd.us!
rojer_31
Junior Member
Junior Member
Posts: 15
Joined: 2005-05-26, 20:38 UTC
Contact:

more changes

Post by *rojer_31 »

No, not without AutoHotkey. Here is a script for AutoHotkey which comes cloes to what you would like, however, it sets focus on the panel where you click.
This removes that limitation. So the focus is set back to the current tab. Try it and tell me if there are any bugs.

Code: Select all

;Middle click anywhere in panel - up one level with fix for middle click close tab 
; Important make sure that double click to close tab is enabled for middle click to close tab to work
#IfWinActive, ahk_class TTOTAL_CMD 
MButton:: 
   MouseGetPos, , , , Control 
   ControlGetFocus, Current
   IfEqual, Control, TMyListBox1 
   { 
      ControlFocus, %Control% 
      PostMessage, 1075, 2002 
	  ; return focus
	  ControlFocus, %Current% 
      Return 
   } 
   Else{
   Click
   }
   IfEqual, Control, TMyListBox2 
   { 
      ControlFocus, %Control% 
      PostMessage, 1075, 2002 
	  ; return focus
	  ControlFocus, %Current% 
      Return 
   } 
   Else{
   Click 
   }
Return
Visit bootcd.us!
rojer_31
Junior Member
Junior Member
Posts: 15
Joined: 2005-05-26, 20:38 UTC
Contact:

how to completely hide/remove the parent dir

Post by *rojer_31 »

Sorry for the repeat posts :oops:
But I want to know if it is possible to completely hide/remove the parent dir (the .. at the top of every view).
I have just found out that it is not much useful when we start to use this shortcut :)
I cannot find it in the preferences dialog or docs.
Visit bootcd.us!
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

Option !

Post by *Clo »

2rojer_31

:) Hello !

Configuration >> Options >> Display >> Files "Show parent dir (..] also in root of drive", remove the nick >> Apply >> OK

:mrgreen: KR
Claude
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
User avatar
Hacker
Moderator
Moderator
Posts: 13102
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

Clo,
As the name of the option implies, it only applies to the root of the drive.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

Enhanced

Post by *Clo »

2Hacker

:) Hi Roman !

• Yep True ! Might be enhanced in the panels for all views at will (another tick-box ?)…

:mrgreen: KR
Claude
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
rojer_31
Junior Member
Junior Member
Posts: 15
Joined: 2005-05-26, 20:38 UTC
Contact:

Re: Option !

Post by *rojer_31 »

Clo wrote: Configuration >> Options >> Display >> Files "Show parent dir (..] also in root of drive", remove the nick >> Apply >> OK

:mrgreen: KR
Claude
Clo
I was indeed aware of that option, it works only in root folders.

Maybe this option can be added in TC 7?
Visit bootcd.us!
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

3-state box

Post by *Clo »

2rojer_31

:) Hello !

• Feel free to suggest it in the appropriate section ;)

- Looking at this closer, the option for "Root" could be used with a 3-state box
(because there is no more room on the page…) :
¤ Ticked¦greyed : Shows •• in the root,
¤ Ticked : shows •• always in the panels (root and folders)
¤ Unticked : Never shows ••
or so… Too late for 7.0 such as in UI, but another flag could be added in the INI entry (doesn't need translations !) :
ShowParentDirInRoot=–1 Hides •• in the root and in the folders.

:mrgreen: KR
Claude
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
Post Reply