[Solved] Custom shortcut for a command using '§'/'½'-key?

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
jensbrak
Junior Member
Junior Member
Posts: 4
Joined: 2021-06-11, 06:24 UTC
Location: Sweden
Contact:

[Solved] Custom shortcut for a command using '§'/'½'-key?

Post by *jensbrak »

Update: solution (by hacker/Roman and petermad) as follows:

Specific solution (for my keyboard Swedish):
Map OEM_US\| to get the '§' key

Generic solution (to map any supported key):
  • Open menu 'configuration''
  • Open dialogue 'options'
  • Select section 'Misc.' (bottom)
  • Under 'Redefine hotkeys (Keyboard remapping)':
    • Select drop down for 'Hotkey' once
    • Tap the desired key
  • Select the desired command to assign key to
Please note that selecting the drop down for 'Hotkey' a second time before tapping the key also works (as proposed by Roman) but it will just close the opened drop down before the key tap. Another way is to use tab to move input focus to the drop down. The thing is to get the focus to the drop down, either way.

Image: https://static.zon3.se/tc1.png

Original post:

Hi,

(Long time user of TC but I have never really digged into the customization possibilities of it, much because I am so happy how it works out of the box.)

Question: How do I override a shortcut by assigning it to the paragraph ('§') key? Is it possible?

I know I can override shortcuts by adding a [shortcuts] section in the wincmd.ini file and add rows for each shortcut, as described in the manual.
However, I fail to do this with the §-key. What am I missing?

Background: I am not only a long time TC user, I got hooked on Norton Commander ages ago and TC has become what NC was and way, way more than that. Without compromising speed and ease of use. However, there's one shortcut I still miss from NC. In TC it is CTRL+U and SHIFT+CTRL+U for swapping panels, or exchange directories as it is named in TC.
I was thinking of using the old NC shortcut for it which, if my muscle memory serves me right, is the §-key just above the tab key. Adding the row '§=cm_exchange' under the added [shortcuts] section of my wincmd.ini won't work anyway. The input ends up in the command line instead. I suspect that shortcuts must use some combination keys and that I'm stuck with that. Or?
Last edited by jensbrak on 2021-07-31, 10:56 UTC, edited 2 times in total.
Loyal TC user and former NC user. Software developer by profession and passion.
User avatar
Gral
Power Member
Power Member
Posts: 1467
Joined: 2005-01-26, 15:12 UTC

Re: Custom shortcut for a command using '§'/'½'-key?

Post by *Gral »

Isn't "OEM`~" what you want?

http://gral.y0.pl/tc/oem.png
User avatar
jensbrak
Junior Member
Junior Member
Posts: 4
Joined: 2021-06-11, 06:24 UTC
Location: Sweden
Contact:

Re: Custom shortcut for a command using '§'/'½'-key?

Post by *jensbrak »

Isn't "OEM`~" what you want?
Upon reading your reply I was like 'Doh, of course!' and used that. Your solution makes sense when I think of it.
However, it does not work - I suspect it is due to me not having a US keyboard layout (Swedish in my case).
Loyal TC user and former NC user. Software developer by profession and passion.
User avatar
Hacker
Moderator
Moderator
Posts: 13064
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Custom shortcut for a command using '§'/'½'-key?

Post by *Hacker »

jensbrak,
Click on the dropdown list of the keys twice (first click selects and opens it, second click closes the list but keeps it selected), then press the button you want to use, in your case §. This should select the correct entry. If it does not work you could still use it a third party tool like AutoHotkey.

HTH
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
jensbrak
Junior Member
Junior Member
Posts: 4
Joined: 2021-06-11, 06:24 UTC
Location: Sweden
Contact:

Re: Custom shortcut for a command using '§'/'½'-key?

Post by *jensbrak »

Click on the dropdown list of the keys twice (first click selects and opens it, second click closes the list but keeps it selected), then press the button you want to use, in your case §
Thanks for the suggestion. There's no '§' in the drop down. As gral suggested, the key is likely defined as OEM`~, which is in the list you mention. However, it does not work.
I've tried to manually edit the wincmd.ini file too, with entry for the '§' key. Adding entries in this file is what the dialog in Settings > Misc > Shortcuts does, so it's the same thing - just limited to the options in the drop down you mention.

I am not keen on installing autohotkey or similar software. It's not THAT important, after all we do have Ctrl+U for it. Was just curious if I missed something. Still, many thanks for your suggestions. Much appreciated.

BR,
Jens
Loyal TC user and former NC user. Software developer by profession and passion.
User avatar
Hacker
Moderator
Moderator
Posts: 13064
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Custom shortcut for a command using '§'/'½'-key?

Post by *Hacker »

jensbrak,
There's no '§' in the drop down.
That does not matter. Please note, I wrote "press the button" (on the keyboard), not "click the correct entry in the list".

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: 14793
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Custom shortcut for a command using '§'/'½'-key?

Post by *petermad »

2jensbrak

It works for me with Danish keyboard if I assign the command to OEM_US\|

Swedish and Dansish keyboard is almost the same, but in Danish pressing the §-button equals ½, while Shift+§ equals § - it is the opposite in Swedish, but since it is the same physical key it should work for Swedish keybord with OEM_US\|
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
jensbrak
Junior Member
Junior Member
Posts: 4
Joined: 2021-06-11, 06:24 UTC
Location: Sweden
Contact:

Re: Custom shortcut for a command using '§'/'½'-key?

Post by *jensbrak »

I wrote "press the button" (on the keyboard), not "click the correct entry in the list".
Roman, my apologies. I was sloppy reading your instructions, clearly. That was one of the most unintuitive inputs I've seen but hey, it works like a charm. Which leads me to the suggestion from petermad:
It works for me with Danish keyboard if I assign the command to OEM_US\|
Yes, that did the trick. I did some research and the OEM keys are mapped a little differently depending on keyboard layout/manufacturer it seems. When following Romans instruction on how to define keys by reading input - that very key is selected.

I humbly thank you for your kind help. I'll update the topic and first post in the thread.

All the best,

Jens
Loyal TC user and former NC user. Software developer by profession and passion.
User avatar
Hacker
Moderator
Moderator
Posts: 13064
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: [Solved] Custom shortcut for a command using '§'/'½'-key?

Post by *Hacker »

jensbrak,
Glad it works ;)

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