Custom define Shortcut with Win key doesn't work

English support forum

Moderators: sheep, Hacker, Stefan2, white

Post Reply
leo007
Junior Member
Junior Member
Posts: 31
Joined: 2019-10-28, 08:09 UTC

Custom define Shortcut with Win key doesn't work

Post by *leo007 »

Hi Everyone,

basically I'm trying to set Win+C to copy file path.

when I set Alt+C in wincmd.ini

Code: Select all

[Shortcuts]
A+C=cm_CopyFullNamesToClip
works perfect


but when I try to set Win+C in wincmd.ini

Code: Select all

[ShortcutsWin]
C=cm_CopyFullNamesToClip
there no reaction. even if I change to any other combination with Win key same result.

is this a bug or am I missing something?

Thanks in advance

leo007
Junior Member
Junior Member
Posts: 31
Joined: 2019-10-28, 08:09 UTC

Re: Custom define Shortcut with Win key doesn't work

Post by *leo007 »

Horst.Epp Thanks for your reply
Horst.Epp wrote:
2019-11-22, 10:48 UTC
There is no such section [ShortcutsWin] possible in TC.
Making Windows global assigments are stored by Windows and not in any TC config file.
at least in my case this section get created automatically after assign any shortcut with Win Key
https://i.imgur.com/mAXJW8O.jpg

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

Re: Custom define Shortcut with Win key doesn't work

Post by *Stefan2 »

Horst.Epp wrote:
2019-11-22, 10:48 UTC
There is no such section [ShortcutsWin] possible in TC.


Help > Settings in file wincmd.ini - Part 2
[shortcutswin]         Same as [shortcuts], but together with Windows key.




I have found in my wincmd.ini (from an older test?):
[ShortcutsWin]
F4=cm_Edit

And Win+F4 starts my text editor.



Many Win+x key combos are caught by winOS before TC get a change to get them.
For example "L" is a bad choice ("Win+L" is executed and look your win session)
But after another tests this works now for me:
[ShortcutsWin]
F4=cm_Edit
C=cm_CopyFullNamesToClip
And Win+C executes cm_CopyFullNamesToClip in TC 9.21a

Editing the wincmd.ini and an try without TC restart doesn't work in my first test, only the way over the settings > misc. works.
Maybe that's the same for your experience?
leo007 wrote:
2019-11-22, 09:54 UTC
but when I try to set Win+C in wincmd.ini
Or you may have edited a wrong wincmd.ini?
(see menu "Help > About TC > INI-Files", or use menu "Configuration > Changes Settings Files Directly...")





 

leo007
Junior Member
Junior Member
Posts: 31
Joined: 2019-10-28, 08:09 UTC

Re: Custom define Shortcut with Win key doesn't work

Post by *leo007 »

Stefan2 Thanks for your Reply
Stefan2 wrote:
2019-11-22, 11:30 UTC
Or you may have edited a wrong wincmd.ini?
as a simple test I put all shortcut entries within one wincmd.ini

Code: Select all

[Shortcuts]
S+C=cm_CopyFullNamesToClip
A+C=cm_CopyFullNamesToClip

[ShortcutsWin]
C=cm_CopyFullNamesToClip
Alt+C & Shift+C works like clock. but Win+C zero reaction.

Stefan2 wrote:
2019-11-22, 11:30 UTC
Many Win+x key combos are caught by winOS before TC get a change to get them.
I tried tested each windows unsigned key combo like: C|J|Z|Y same 0 reaction

* settings > misc nor manual writing doesn't work for in my case.
* adding another key like: Shift+win+C (S+C=cm_CopyFullNamesToClip) also gives no results

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

Re: Custom define Shortcut with Win key doesn't work

Post by *Stefan2 »

leo007 wrote:
2019-11-22, 13:43 UTC
...also gives no results
Sounds like editing the wrong INI, or doubled ShortcutsWin section.
But you also tried via "settings > misc", so it should work.
Maybe another tool is catching the win key? Can you try with an AutoHotkey to react on win+C ?


zzzTest.ahk

Code: Select all

;//  # Win,  ! Alt,  ^ Control,  + Shift
;//Run this script, then press Win+C to see a MessageBox
#C::
MsgBox HELLO
ExitApp



 

User avatar
Horst.Epp
Power Member
Power Member
Posts: 3632
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Custom define Shortcut with Win key doesn't work

Post by *Horst.Epp »

Stefan2 wrote:
2019-11-22, 15:43 UTC
leo007 wrote:
2019-11-22, 13:43 UTC
...also gives no results
Sounds like editing the wrong INI, or doubled ShortcutsWin section.
But you also tried via "settings > misc", so it should work.
Maybe another tool is catching the win key? Can you try with an AutoHotkey to react on win+C ?


zzzTest.ahk

Code: Select all

;//  # Win,  ! Alt,  ^ Control,  + Shift
;//Run this script, then press Win+C to see a MessageBox
#C::
MsgBox HELLO
ExitApp
Autohotkey has no problems to use Win key shortcuts.
I use Quick Access Popup which is coded in Autohotkey and supports TC.
I have assigned a lot of Win + char shortcuts.
Currently I use the keys A C E F H M O T Y without problems.
Only Win+L can't normaly be used.
Windows 10 Home x64 November 2019 Update, Version 1909 (OS Build 18363.752)
Intel(R) Core(TM) i7-4770 CPU @ 3.40GH, 16GB RAM
TC 9.51 x64 / x86, Everything 1.4.1.972 (x64)

leo007
Junior Member
Junior Member
Posts: 31
Joined: 2019-10-28, 08:09 UTC

Re: Custom define Shortcut with Win key doesn't work

Post by *leo007 »

Stefan2 wrote:
2019-11-22, 15:43 UTC
Sounds like editing the wrong INI, or doubled ShortcutsWin section.
But you also tried via "settings > misc", so it should work.
its very strange because i rechecked everything lot of time for correct INI naming, single name section, path, and also tested everything. its really MYSTERY
Horst.Epp wrote:
2019-11-22, 16:18 UTC
;// # Win, ! Alt, ^ Control, + Shift
;//Run this script, then press Win+C to see a MessageBox
#C::
MsgBox HELLO
ExitApp
it display a massage HELLO

Horst.Epp wrote:
2019-11-22, 16:18 UTC
Autohotkey has no problems to use Win key shortcuts.
I use Quick Access Popup which is coded in Autohotkey and supports TC.
I have assigned a lot of Win + char shortcuts.
Currently I use the keys A C E F H M O T Y without problems.
Only Win+L can't normaly be used.
I'm also pretty heavy Autohotkey user. its nice to find Here people that also use TC in combine with Autohotkey)
I made some work around by define total Commander shortcut Alt+C as copy file path:

Code: Select all

[Shortcuts]
A+C=cm_CopyFullNamesToClip
then wrote short script:

Code: Select all

 #IfWinActive, ahk_class TTOTAL_CMD
    #c:: 
       SendInput, !{c}
       Return
 #IfWinActive  
    
  #If !WinActive("ahk_class TTOTAL_CMD")
    #c::
      Send, ^c
      Sleep 100
      Clipboard := Clipboard
      Return
  #IfWinActive
its works 100%

if you ask why I didn't just use global script:

Code: Select all

    #c::
      Send, ^c
      Sleep 100
      Clipboard := Clipboard
      Return
  #IfWinActive
for 95% it works fine. but for *.exe files it buffer them as copy Action instead of copy there path. so I had to differentiate script for environment Activity but to be triggered by same hot key in all of them. this is why specifically Win+C is that important to me.

User avatar
Hacker
Moderator
Moderator
Posts: 11579
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Custom define Shortcut with Win key doesn't work

Post by *Hacker »

leo007,
Does it work if you define the shortcut through TC's GUI?

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
petermad
Power Member
Power Member
Posts: 9488
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: Custom define Shortcut with Win key doesn't work

Post by *petermad »

Under Windows 10 1909 the only Win-keys I can assign in TC out-of-the-box are: N and Y.

If I use this setting in the Registry:

Code: Select all

[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoWinKeys"=dword:00000001
I can assign these keys:
A, B, D, E, N, M, Q, R, S, T, Y and Z.

I can still not use: C,F,H and O as Horst.Epp can.

_________________________


Under Windows 7 these keys can be assigned to Win in TC out-of-the-box: A, I, J, K, N, O, W, X, Y and Z.

And with:

Code: Select all

[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoWinKeys"=dword:00000001
I can assign these keys:
A, B, D, E, F, I, J, K, M, N, O, Q, R, S, T, X, Y and Z.
Last edited by petermad on 2019-11-23, 02:21 UTC, edited 1 time in total.
License #524 (1994)
Danish Total Commander Translator
TC 9.5b10 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 (1909) 64bit, 'Everything' 1.4.1.960 (x64)
TC 3.0b16 on Android 6.0
Get: Extended Total Commander Menus | TC Languagebar | PHSM-Calendar

leo007
Junior Member
Junior Member
Posts: 31
Joined: 2019-10-28, 08:09 UTC

Re: Custom define Shortcut with Win key doesn't work

Post by *leo007 »

Hacker,*petermad Thanks for your Reply
Hacker wrote:
2019-11-22, 18:06 UTC
Does it work if you define the shortcut through TC's GUI?
if you ment "Settings > misc" then it doesn't work.
petermad wrote:
2019-11-22, 19:28 UTC
Under Windows 10 1909 the only Win-keys I can assign in TC out-of-the-box are: N and Y.
absolutely the same situation in my case. Y key is the only actual key that works when the N key used by Onenote
petermad wrote:
2019-11-22, 19:28 UTC
If I use this setting in the Registry:
CODE: SELECT ALL

[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoWinKeys"=dword:00000001
I can assign these keys:
A, B, D, E, N, M, Q, R, S, T and Y, Z.

I can still not use: C,F,H and O as Horst.Epp can.
absolutely the same situation in my case.

User avatar
Horst.Epp
Power Member
Power Member
Posts: 3632
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Custom define Shortcut with Win key doesn't work

Post by *Horst.Epp »

For me QAP (Quick Access Popup) can assign the Win keys I mentioned above
and it overrides the default Windows behaviour.
I can't do this in TC but it allows me for example to go to the current TC dir in Open/Save dialogs using Win+C.
Windows 10 Home x64 November 2019 Update, Version 1909 (OS Build 18363.752)
Intel(R) Core(TM) i7-4770 CPU @ 3.40GH, 16GB RAM
TC 9.51 x64 / x86, Everything 1.4.1.972 (x64)

leo007
Junior Member
Junior Member
Posts: 31
Joined: 2019-10-28, 08:09 UTC

Re: Custom define Shortcut with Win key doesn't work

Post by *leo007 »

Horst.Epp wrote:
2019-11-23, 10:03 UTC
For me QAP (Quick Access Popup) can assign the Win keys I mentioned above
and it overrides the default Windows behaviour.
I can't do this in TC but it allows me for example to go to the current TC dir in Open/Save dialogs using Win+C.
as I see limited TC Win key combination support is known issue.
Autohotkey allow me to Achieve my wanted functionality so a bit more code isn't an issue for me)

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

Re: Custom define Shortcut with Win key doesn't work

Post by *ghisler(Author) »

You can only assign the key combinations which are passed to Total Commander. Many WIN key combinations are handled by Windows before they get to the applications, so they cannot be reassigned.
Author of Total Commander
http://www.ghisler.com

Post Reply