RestirctInterface

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
romulous
Senior Member
Senior Member
Posts: 226
Joined: 2003-11-19, 04:10 UTC

RestirctInterface

Post by *romulous »

Hi everyone,

Not sure exactly where this bug is located, so apologies if I have the wrong forum. Using TC 7.5 PB7 with XCD - eXtended Change Directory. I have a Start Menu entry for CTRL+ALT+F1 to this:
Command: xcd (XCD folder is in the Windows path so I do not need to specify the xcd.exe location here)
Parameters: ?

Now, when I hit CTRL+ALT+F1, a box pops up in TC, where I type in a folder name. XCD then searches my drive, looking for matches. When the results appear, I highlight the folder I want TC to change to, and then hit Enter. XCD disappears, and TC changes to that folder. All works well...except now that I have entered this in the wincmd.ini:
RestrictInterface=2

The TC command line irritates me no end, so I entered that to disable it. Problem is, it also disables XCD. The XCD box still appears listing the matches, but when you hit Enter, the XCD box disappears, but TC does not change to the folder that you hit Enter on. Remove that line from wincmd.ini, and XCD works again. I could leave that line out, but then the command line appears if I hit left or right arrow. Going into TC's options, there is no 'disable' command for Options-Misc-Redefine Hotkeys, so I cannot as an alternative disable left and right arrow (that is, make them do nothing when pressed) - the best I can do is to assign them to something other than opening the command line. Anyway, as I say, not sure if the bug is in TC, or in XCD.

Thanks.

CM
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48093
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I assume that xcd is sending the path to TC via command line. To check this, I need xcd to test, but I cannot find it on www.totalcmd.net or www.ghisler.com (under addons). Where can I find it?
Author of Total Commander
https://www.ghisler.com
User avatar
romulous
Senior Member
Senior Member
Posts: 226
Joined: 2003-11-19, 04:10 UTC

Post by *romulous »

Hi Christian,

Homepage is here:
http://mitglied.lycos.de/matbal/

Regards,

CM
User avatar
StickyNomad
Power Member
Power Member
Posts: 1933
Joined: 2004-01-10, 00:15 UTC
Location: Germany

Post by *StickyNomad »

2ghisler(Author)

You can find the link in the TC wiki:
http://www.ghisler.ch/wiki/index.php?title=XCD
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

@romulous, yes and defining the left/right arrows to something else (which I have done briefly in the past) will cause all kinds of quirky annoying behaviour. Like not being able to move the cursor in any TC text or edit field.

Personally I'd prefer to use <--- Left and ---> Right to make that pane active - but there is no clear way to do something like that without ill side effects.
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.
User avatar
romulous
Senior Member
Senior Member
Posts: 226
Joined: 2003-11-19, 04:10 UTC

Post by *romulous »

Balderstrom wrote:@romulous, yes and defining the left/right arrows to something else (which I have done briefly in the past) will cause all kinds of quirky annoying behaviour. Like not being able to move the cursor in any TC text or edit field.

Personally I'd prefer to use <--- Left and ---> Right to make that pane active - but there is no clear way to do something like that without ill side effects.
Yeah, this was the first time I had ever bothered to try and re-map a key inside TC. I was very surprised to find that there was not a 'no mapping' entry or similar, where you could totally disable a key. Looking through the commands available for mapping a key, there is none that really do not have any sort of effect :(
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48093
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks - I can confirm that xcd sends the path to the command line and then simulates a pressed ENTER key. There is a more elegant way to change dirs in TC (via WM_COPYDATA), but only the author of xcd could change that...
Author of Total Commander
https://www.ghisler.com
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

[OT]
romulous wrote:there was not a 'no mapping' entry or similar, where you could totally disable a key
You can create one yourself as user-defined command:
just give it a name like em_DoNothing, as command use e.g. cd without parameters.
[/OT]
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

That'll be a cool fix for my MainMenu items that reference the few keyboard only commands (they were assigned cm_Return). But for this would still disable left/right from functioning in any of TC's List/Edit boxes and prevent you from being able to move the cursor.
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

Here's something I threw together Romulous, if you don't mind using AutoHotKey.

This prevents the CommandLine from popping up when you press Left/Right and the Left/Right cursor controls should remain functional for all the places you actually need to move the cursor around.

The replacement action is Left (Focus Left), Right (Focus Right)
If you prefer no action at all, just replace "PostMessage ..." with "return"

Code: Select all

#SingleInstance, Force 
SetTitleMatchMode 1

Do_LCursor(activeEXE)
{
	if (activeEXE == "TCMD")
	{
		ControlGetFocus, aControl, A
		if (RegExMatch(aControl, "^T(My(ListBox|Panel)|ButtonBar)[0-9]?"))
		{
			PostMessage, 1075, 4001
		}
		else
		{
			SendInput, {Left}
		}
	}
}
return

Do_RCursor(activeEXE)
{
	if (activeEXE == "TCMD")
	{
		ControlGetFocus, aControl, A
		if (RegExMatch(aControl, "^T(My(ListBox|Panel)|ButtonBar)[0-9]?"))
		{
			PostMessage, 1075, 4002
		}
		else
		{
			SendInput, {Right}
		}
	}
}
return


#ifWinActive, ahk_class TTOTAL_CMD
{
;	WheelUp::  Do_WheelUp("TCMD")
;	WheelDown::Do_WheelDn("TCMD")
;	Xbutton1:: Do_MouseX1("TCMD")
	Left::     Do_LCursor("TCMD")
	Right::    Do_RCursor("TCMD")
}
return
To give it some context, I tend to just run one AHK script for KeyBoard/Mouse remapping, and at the bottom of the script are all of the programs that share similiar HotKeys, and above those are the functions that are defined/called, so I also have this for example that you don't need :)

Code: Select all

#ifWinActive, ahk_class gpgwndclass_dungeonsiege2_exe
{
	WheelUp::  Do_WheelUp("DS2")
	WheelDown::Do_WheelDn("DS2")

	XButton1:: Do_MouseX1("DS2")
	XButton2:: Do_MouseX2("DS2")
} 
return
And then the Do_WheelUp(activeEXE) will check for
if (activeEXE == "TCMD") { ... code .... }
else
if (activeEXE == "DS2") { ... code ... }

Back when I first started messing around with AHK beyond simple keyboard macros I found it was easier to manage and see what was doing what by defining callable functions et al.
Post Reply