Page 1 of 1

Tab key autocomplete

Posted: 14 May 2007 04:19
by Liquidmantis
I love the tab key autocomplete feature of the command prompt. I find myself really wanting this for typing addresses into the address bar.

Of coures here's where someone replies back that it's already in there like my last wish. I swear I've tried to find info on this one too!

Re: Tab key autocomplete

Posted: 14 May 2007 07:31
by admin
Are you talking about "Auto-complete path/file names" (config|general)? I'm not sure about the Tab key though...

Posted: 14 May 2007 11:10
by lukescammell
I think he's talking about the IE option of "Use inline AutoComplete" ?

It would be nice to have this as an option for sure :)

Posted: 14 May 2007 11:50
by admin
lukescammell wrote:I think he's talking about the IE option of "Use inline AutoComplete" ?

It would be nice to have this as an option for sure :)
Hm, but isn't that what I said? Check out "Auto-complete path/file names" (config|general)...

Posted: 14 May 2007 14:39
by Liquidmantis
I have all the autocompletes turned on, the tab key just makes entry extremely fast rather than having to reach for the down arrow to select the top entry.

For example, in the XP and later cmd prompt (I believe there was a registry key to enable it in 2000), you can type cd \pro, press Tab and you'll have cd \"Program Files" with the cursor at the end so then you can type \xy, press Tab and you'll then have cd \"Program Files\XYplorer". This way you can quickly navigate a directory tree.

The Tab key just fills in the first match and jumps to the end of the line.

Posted: 14 May 2007 16:57
by jacky
Yes, he's talking about another autocomplete, on that is very useful whenever you're on console mode (windows' command prompt, linux, etc) but that I don't think is (ever) used on GUI mode, if only because the rule there for Tab is to switch focus to another "object".

This is why on such case, and the AB supports this, you have another autocomplete feature that will popup a list of possible paths, allowing you to easilly choose the one you want using arrow keys to have it "autocompleted" for you.

I'm not sure the console way to go could be implemented, but I'm pretty sure it would kinda "break" the standard : Tab is used to move/cycle focus.

Posted: 14 May 2007 17:39
by admin
jacky wrote:I'm not sure the console way to go could be implemented, but I'm pretty sure it would kinda "break" the standard : Tab is used to move/cycle focus.
(Programmers' garble:) AFAIK it's not possible, at least not without subclassing: The Tab key (without Ctrl) does not even raise the KeyDown event.
But indeed I see it working in Explorer's address bar, so it is a working standard in Windows GUI world.

Posted: 14 May 2007 17:49
by Liquidmantis
admin wrote:(Programmers' garble:) AFAIK it's not possible, at least not without subclassing: The Tab key (without Ctrl) does not even raise the KeyDown event.
That's what I was worried about. What about Shift-Spacebar?

Posted: 14 May 2007 18:30
by admin
Liquidmantis wrote:
admin wrote:(Programmers' garble:) AFAIK it's not possible, at least not without subclassing: The Tab key (without Ctrl) does not even raise the KeyDown event.
That's what I was worried about. What about Shift-Spacebar?
I could probably make that work, but it is so non-standard I rather admit that Tab is not supported in AutoComplete and leave it at that :wink:

They should build keyboards with arrow keys on each side!

Posted: 14 May 2007 19:07
by Liquidmantis
I agree, I just want my hands on the home row! Reaching for the arrow keys feels sloooow.

Well, while it won't care if the address bar has focus or not, this AutoHotKey script does the trick for me:

Code: Select all

+Space::
	SetTitleMatchMode 2
	IfWinActive XYplorer @ XYplorer.ini
	{
		Send {Down}
	}
	Return
As far as I know, Shift-Space isn't really used for anything so I shouldn't have to worry about overlap. I'm looking right now to see if I can determine if the address bar has the focus too.

Posted: 14 May 2007 19:38
by Liquidmantis
Ok, here's a script that will do exactly what I want and is almost as good as the Windows Explorer behavior:

Code: Select all

Tab::
	SetTitleMatchMode 2
	IfWinActive, XYplorer @ XYplorer.ini
		{
			ControlGetFocus, ctrlFocus
			If ctrlFocus = Edit3
				{
					Send {Down}
					Return
				}
		}
	Hotkey, Tab, Off
	SendEvent {Tab}
	Hotkey, Tab, on 
	Return

Posted: 14 May 2007 19:48
by jacky
admin wrote:(Programmers' garble:) AFAIK it's not possible, at least not without subclassing: The Tab key (without Ctrl) does not even raise the KeyDown event.
But indeed I see it working in Explorer's address bar, so it is a working standard in Windows GUI world.
Oh right.. I didn't even know it did work in Explorer!
Actually it seems to be a supported thing yeah, SHACF_USETAB means Tab will cycle through the MRU instead of letting the focus go. Only I quickly tried and it didn't had any effect :?

Posted: 14 May 2007 20:33
by admin
jacky wrote:Actually it seems to be a supported thing yeah, SHACF_USETAB means Tab will cycle through the MRU instead of letting the focus go. Only I quickly tried and it didn't had any effect :?
Good find, but same here: SHACF_DEFAULT does not work as promised. :?

Re: Tab key autocomplete

Posted: 29 Oct 2009 20:48
by Liquidmantis
Arise!

Just bumping this up because recently I had to change the script to Edit2 rather than Edit3 in order to match the address bar, so in case anyone happens to be using my trick you'll need to edit the script.

I just happened across this thread looking for a fix for the lack of TAB autocomplete as my script is causing TAB to not work in games so I was hoping to be able to do away with that hotkey definition. I forgot I'd already raised this issue.