Keyboard Shortcut: how to remap the "End" Key ?
Moderators: Hacker, petermad, Stefan2, white
Keyboard Shortcut: how to remap the "End" Key ?
Recently purchased a new compact keyboard and now I don't have an "End" key without hitting the "Fn" key which doesn't come naturally.
I installed AutoHotKey and remapped the End Key to the Insert Key, works as expected.
Expect for in TC it seems? Not sure why. When I hit the INS key in TC it selects the file/directory as normal.
So I was thinking I could remap the INS key in TC then?
I have remapped a few keys in TCV over the years, but these remapping's are all to invoke "cm_XXX" commands.
How can I change the Insert key to End in TC? I am happy using something like Alt+INS or F12 (nothing by default I see in the Help) , but I can't seem to figure it out. Options -> Misc -> Remapping. But Once I click the magnifying glass I can only get lists of commands, not keys.
What am I doing wrong here?
Any help would be greatly appreciated.
Unkis
I installed AutoHotKey and remapped the End Key to the Insert Key, works as expected.
Expect for in TC it seems? Not sure why. When I hit the INS key in TC it selects the file/directory as normal.
So I was thinking I could remap the INS key in TC then?
I have remapped a few keys in TCV over the years, but these remapping's are all to invoke "cm_XXX" commands.
How can I change the Insert key to End in TC? I am happy using something like Alt+INS or F12 (nothing by default I see in the Help) , but I can't seem to figure it out. Options -> Misc -> Remapping. But Once I click the magnifying glass I can only get lists of commands, not keys.
What am I doing wrong here?
Any help would be greatly appreciated.
Unkis
Re: Keyboard Shortcut
Are you running TC as administrator and the AutoHotkey script as user? If so, then that's very likely the reason why it doesn't work in TC - or any other program running as admin. Avoid running TC as admin except where it's really necessary (that's good advice regardless of this issue).unkis17 wrote: 2025-01-27, 20:39 UTCExpect for in TC it seems? Not sure why. When I hit the INS key in TC it selects the file/directory as normal.
In TC, keys or key combinations can only be remapped to commands, not to other keys.But Once I click the magnifying glass I can only get lists of commands, not keys.
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Re: Keyboard Shortcut
An em_command (without spaces) is needed here.
Configuration > Options... > Misc. > Select hotkey > Click on the magnifying glass
... > Category: usercmd.ini >
New... > em_EndKEY (em_command without spaces!) >
e.g. Command: %COMMANDER_PATH%\Tools\AutoHotkey\AutoHotkey.exe %COMMANDER_PATH%\Tools\AutoHotkey\xxx.AHK > OK > OK >
click on the "Save"-Button:
> OK - DONE!
Configuration > Options... > Misc. > Select hotkey > Click on the magnifying glass
New... > em_EndKEY (em_command without spaces!) >
e.g. Command: %COMMANDER_PATH%\Tools\AutoHotkey\AutoHotkey.exe %COMMANDER_PATH%\Tools\AutoHotkey\xxx.AHK > OK > OK >
click on the "Save"-Button:
Re: Keyboard Shortcut
2unkis17
You need to think ten times before buying a non-standard keyboard with Fn, etc. or have both options for different needs.
You need to think ten times before buying a non-standard keyboard with Fn, etc. or have both options for different needs.
Overquoting is evil! 👎
Re: Keyboard Shortcut
@Tuska,
Today I tried your example using F12, which is not mapped and this does NOT work. In fact it locks up TC! My CPU fan ramps up and the TaskMgr says TC is now clocking the CPU at 20%???
I reopened TC, removed F12 mapping, tried again with Ctrl+D (no default mapping on my system) and same result.
I copied "em_EndKEY" directly from the post so I am not sure if this doesn't work or if it is not the correct command.
Not sure if I did something wrong per your instructions.
Image: https://imgur.com/a/OgnOY3x
Today I tried your example using F12, which is not mapped and this does NOT work. In fact it locks up TC! My CPU fan ramps up and the TaskMgr says TC is now clocking the CPU at 20%???
I reopened TC, removed F12 mapping, tried again with Ctrl+D (no default mapping on my system) and same result.
I copied "em_EndKEY" directly from the post so I am not sure if this doesn't work or if it is not the correct command.
Not sure if I did something wrong per your instructions.
Image: https://imgur.com/a/OgnOY3x
Re: Keyboard Shortcut
As i see, description for your "em_EndKEY" is "em_EndKEY", so you just created a kind of loop.
This cannot work. Create a valid user command.
Follow the instructions of tuska and adjust the paths to the program and AHK script
This cannot work. Create a valid user command.
Follow the instructions of tuska and adjust the paths to the program and AHK script
Re: Keyboard Shortcut: how to remap the "End" Key ?
Ah, I think I see now.
TC is not going to send the "End" keystroke. We created a hotkey to send the keystroke from the remapping that AHK is doing for me.
I will try that once I get back to that PC later today. Hopefully I can execute this correctly this time.
TC is not going to send the "End" keystroke. We created a hotkey to send the keystroke from the remapping that AHK is doing for me.
I will try that once I get back to that PC later today. Hopefully I can execute this correctly this time.
Re: Keyboard Shortcut: how to remap the "End" Key ?
2unkis17
If you have followed these step-by-step instructions,
then the following should have taken place as a result (example).
without following the step-by-step instructions. It is essential to note that the section names may only appear once!
Note:
Changes to the em_command can also be made as follows:
See also: FAQs: User-Defined Command (UDC) (usercmd.ini) em_command
Restart TC
I'm not sure whether it is necessary to restart Total Commander after setup.
If you have followed these step-by-step instructions,
then the following should have taken place as a result (example).
- In the file "usercmd.ini" in %COMMANDER_PATH% *), the following code should be added for the em_command:
Attention: Path to AHK script must be adjusted!
In this example, I have added some text in the ‘Tooltip’ field.*) %COMMANDER_PATH% is the path in which the TOTALCMD.EXE and/or TOTALCMD64.exe files are located.Code: Select all
[em_EndKEY] button= cmd=%COMMANDER_PATH%\Tools\AutoHotkey\AutoHotkey.exe %COMMANDER_PATH%\Tools\AutoHotkey\xxx.AHK menu=em_EndKEY - F12 || Keyboard Shortcut: how to remap the "End" Key ? | https://www.ghisler.ch/board/viewtopic.php?p=467752#p467752
Pseudo environment variables
- F12: File "wincmd.ini" - section [Shortcuts] –-- Where is the wincmd.ini file located? -> Menu "Help" > "About Total Commander..."
Code: Select all
F12=em_EndKEY
without following the step-by-step instructions. It is essential to note that the section names may only appear once!
Note:
Changes to the em_command can also be made as follows:
- Press BUTTON "CommandBrowser" (Ignore point 2. (Filter: 4006) --> only in the linked post(!))
- Category: usercmd.ini (bottom left) ...
See also: FAQs: User-Defined Command (UDC) (usercmd.ini) em_command
Restart TC
I'm not sure whether it is necessary to restart Total Commander after setup.
BUTTON with command: cm_exit 9
Code: Select all
TOTALCMD#BAR#DATA
cm_exit 9
TOTALCMD.EXE,25
cm_exit 9|1: Exit and restart Total Commander|8: Pass current left and right directory and file under cursor to new instance|https://www.ghisler.ch/board/viewtopic.php?p=446794#p446794
0
-1
Create a Button in the BUTTONBAR (copy/paste CODE)
- Click on "SELECT ALL" (to the right of CODE:), then press CTRL+C (copy to clipboard).
- Right-click on any place in the button bar, then click on "Paste".
⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺ - Option1: Point to the new button (slightly longer): 'Tooltip' is shown (-> description to the button).
A maximum of 259 characters is allowed for the tooltip. | = create line break, || = create | as separator character. - Option2: Button bar - "Tooltip" field: A single space deactivates the display of the tooltip.
If the "Tooltip" field is empty, the content of the "Command" field is displayed. - Option3: See FAQs and explanation: Button-code (TOTALCMD#BAR#DATA) <-- <Ctrl+click on the link...>
Re: Keyboard Shortcut: how to remap the "End" Key ?
I wanted to report back.
@Tuska - Your instructions were PERFECT, I did it all again verbatim this morning, checked my ini files and everything was correct. However it didn't give me the result I wanted. It did however launch AHK with the script I called. So your method was accurate.
Turns out @Dalai was correct with checking about running TC as Admin.
I WAS running TC this way. I changed that and immediately my existing AHK script worked!
I did change my AHK to use Ctrl+INS to send End because I do use INS in TC to select directories.
@Tuska thank you for your additional links. I have been using TC for +20yrs now, but rarely am I trying anything "new." I have been using it so long I kind of have things setup the way I need. I like learning "new to me" features as I don't know anyone in my life who uses this program. Always helpful to have a whole community here willing to help and teach. Thanks again
Unkis
@Tuska - Your instructions were PERFECT, I did it all again verbatim this morning, checked my ini files and everything was correct. However it didn't give me the result I wanted. It did however launch AHK with the script I called. So your method was accurate.
Turns out @Dalai was correct with checking about running TC as Admin.
I WAS running TC this way. I changed that and immediately my existing AHK script worked!
I did change my AHK to use Ctrl+INS to send End because I do use INS in TC to select directories.
@Tuska thank you for your additional links. I have been using TC for +20yrs now, but rarely am I trying anything "new." I have been using it so long I kind of have things setup the way I need. I like learning "new to me" features as I don't know anyone in my life who uses this program. Always helpful to have a whole community here willing to help and teach. Thanks again
Unkis
Re: Keyboard Shortcut: how to remap the "End" Key ?
By default you can also select files and folders in TC with the Space key. And if you want TC to jump to the next file after selecting with Space (like Ins does), then you can add SpaceMovesDown=1 to the [Configuration] section of your wincmd.ini file:I did change my AHK to use Ctrl+INS to send End because I do use INS in TC to select directories.
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
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
Re: Keyboard Shortcut: how to remap the "End" Key ?
@petermad,
Thanks for the tip! The "move down" feature was the whole reason I kept INS by default. I might just change this now that I know I can add this.
unkis
Thanks for the tip! The "move down" feature was the whole reason I kept INS by default. I might just change this now that I know I can add this.
unkis