Tab key autocomplete

Features wanted...
Post Reply
Liquidmantis
Posts: 32
Joined: 27 Apr 2007 22:34

Tab key autocomplete

Post 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!

admin
Site Admin
Posts: 66347
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Tab key autocomplete

Post by admin »

Are you talking about "Auto-complete path/file names" (config|general)? I'm not sure about the Tab key though...

lukescammell
Posts: 744
Joined: 28 Jul 2006 13:15
Location: Kent, UK
Contact:

Post 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 :)
Used to update to the latest beta every day. Now I have children instead…
Windows 10 Pro x64 (everywhere except phone…)

admin
Site Admin
Posts: 66347
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Post 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)...

Liquidmantis
Posts: 32
Joined: 27 Apr 2007 22:34

Post 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.

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Post 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.
Proud XYplorer Fanatic

admin
Site Admin
Posts: 66347
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Post 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.

Liquidmantis
Posts: 32
Joined: 27 Apr 2007 22:34

Post 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?

admin
Site Admin
Posts: 66347
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Post 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!

Liquidmantis
Posts: 32
Joined: 27 Apr 2007 22:34

Post 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.

Liquidmantis
Posts: 32
Joined: 27 Apr 2007 22:34

Post 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

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Post 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 :?
Proud XYplorer Fanatic

admin
Site Admin
Posts: 66347
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Post 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. :?

Liquidmantis
Posts: 32
Joined: 27 Apr 2007 22:34

Re: Tab key autocomplete

Post 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.

Post Reply