Support [Windows key] for Shortcut function...

Here you can propose new features, make suggestions etc.

Moderators: Hacker, petermad, Stefan2, white

User avatar
Stefan2
Power Member
Power Member
Posts: 4281
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Post by *Stefan2 »

I would also like to use other keys on my keyboard
for shortcut keys, like Ä,Ö and Ü

I like to use Shift+Ä
I like to use Shift+#
VadiMGP
Power Member
Power Member
Posts: 672
Joined: 2003-04-05, 12:11 UTC
Location: Israel

Post by *VadiMGP »

SanskritFritz wrote:Anyway, you can use AutoHotkey to define any shortcut key in TC.
I'm just interesting - does AHK allows to define hotkey that works in command line only?
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

Was that a rhetorical question? ;)

This script sends \ when # is pressed, only when focus is in command line:

Code: Select all

#IfWinActive, ahk_class TTOTAL_CMD
#::
ControlGetFocus, v_Focus
If (v_Focus = "Edit1")
  SendInput, \
Else
  SendInput, {Raw}#
Return
Icfu
This account is for sale
VadiMGP
Power Member
Power Member
Posts: 672
Joined: 2003-04-05, 12:11 UTC
Location: Israel

Post by *VadiMGP »

icfu wrote:Was that a rhetorical question?
Nope. :wink: How you can ensure that "Edit1" belongs to command line or not? May be it is another editbox?
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

How you can ensure that "Edit1" belongs to command line or not?
The first line in the script ensures that the hotkey is only active when the TC main window is focussed, and because there is only one editbox in the TC main window, it has to be the command line. ;)

Icfu
This account is for sale
VadiMGP
Power Member
Power Member
Posts: 672
Joined: 2003-04-05, 12:11 UTC
Location: Israel

Post by *VadiMGP »

Ok, I see. And what if there will be loaded some sophisticated plugin like TotalConsole? Such plugin can create its own editbox that not belong to TC?
User avatar
petermad
Power Member
Power Member
Posts: 16027
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

What if cm_EditPath is invoked - isn't that also an edit box?
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

What if cm_EditPath is invoked - isn't that also an edit box?
TInEdit.UnicodeClass1
And what if there will be loaded some sophisticated plugin like TotalConsole? Such plugin can create its own editbox that not belong to TC?
Editbox will have different instance number and it will be child of different control, in this case TFKon1.

You can also check the dimensions and/or location of editbox, etc...

Icfu
This account is for sale
VadiMGP
Power Member
Power Member
Posts: 672
Joined: 2003-04-05, 12:11 UTC
Location: Israel

Post by *VadiMGP »

Editbox will have different instance number
Of course, but how it is possible to know what instance number (as well as dimension and location) is right one?

Well, this is actually rhetorical question, I've got the point. :wink:
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

You check with AHK window spy, or AutoIt Window Info tool or use this script:
http://www.autohotkey.com/forum/topic8976.html

Just in case... ;)

Icfu
This account is for sale
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

I actually had that problem in my Popup the splitter menu script :-) The only solution I found was to check the dimensions of TPanel, because funny enough, the splitter and the ftp panel have the same classes, and they vary the instance number!
I switched to Linux, bye and thanks for all the fish!
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

the splitter and the ftp panel have the same classes, and they vary the instance number!
I have tried to reproduce that:
"Success" with TC 6.57, splitter instance number changes from 1 to 2 when FTP panel appears.

But, in TC 7 this is not reproducable anymore, the instance number does not change, so the problem seems to be fixed.

Icfu
This account is for sale
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

2icfu
Thanks for testing it!
I switched to Linux, bye and thanks for all the fish!
Post Reply