Right Control absent Topic is solved

You have encountered a problem using Far Manager? Here you can get help.
Post Reply
Epsteyn
Posts: 16
Joined: Sun 15 Nov, 2020 14:21
Has thanked: 2 times

Right Control absent

Post by Epsteyn »

Hello!

My new laptop does not have Right Control. Instead it has a key which has "/" and "?" symbols. I can not use the folder shortcut option because of this problem. Is there a way to make FAR use another key instead of Right Control (my laptop's "/" key, for instance)?

Thank you!
User avatar
HaRT
Moderator
Posts: 10854
Joined: Tue 30 Aug, 2005 17:21
Has thanked: 221 times
Been thanked: 358 times

Right Control absent

Post by HaRT »

Run FAR, press F1 End Enter and read docs on keyboard macros.
Фар есть инструмент, а не нянька. © 2009 DrKnS
Epsteyn
Posts: 16
Joined: Sun 15 Nov, 2020 14:21
Has thanked: 2 times

Right Control absent

Post by Epsteyn »

Thank you. I read the help FAR section about keyboard macros but I could not assign the "/" key behavior the Right Control function.
I have tried the following macro, but it does not work:

Macro {
description="";
area="Shell"; key="/";
flags="";
code="Keys(\"RCtrl\")";
}
Shmuel
Posts: 6834
Joined: Thu 23 Mar, 2006 21:36
Location: Israel
Has thanked: 41 times
Been thanked: 530 times

Right Control absent

Post by Shmuel »

Maybe try this:

Code: Select all

Macro {
  description="Folder shortcuts";
  area="Shell"; key="/RAlt[0-9]/";
  action=function()
    Keys("RCtrl"..akey(1):match(".$"))
  end;
}
Place it in a file with extension .lua
place the file into directory %farprofile%\Macros\scripts
restart Far
use RightAlt + digit.
Last edited by Shmuel on Sat 18 Dec, 2021 17:29, edited 1 time in total.
User avatar
HaRT
Moderator
Posts: 10854
Joined: Tue 30 Aug, 2005 17:21
Has thanked: 221 times
Been thanked: 358 times

Right Control absent

Post by HaRT »

Epsteyn, Far macros cannot substitute modifier keys within all shortcuts. You'd need to assign new shortcuts to individual actions you're missing, e.g. like in the above script.
Alternatively, you might wish to remap the slash key systemwide to act as the RCtrl key — IIRC, there is a Microsoft tool to create/modify keyboard layout that can be used for that. Maybe there's a simpler way to remap an individual key, I don't know.
Фар есть инструмент, а не нянька. © 2009 DrKnS
Epsteyn
Posts: 16
Joined: Sun 15 Nov, 2020 14:21
Has thanked: 2 times

Right Control absent

Post by Epsteyn »

Thank you both
Shmuel, your script works perfectly and I'm using it!
You are the creator of FastFind Enhancer, aren't you? Best plugin/script I ever used in Far.
Shmuel
Posts: 6834
Joined: Thu 23 Mar, 2006 21:36
Location: Israel
Has thanked: 41 times
Been thanked: 530 times

Right Control absent

Post by Shmuel »

Epsteyn wrote: Sun 19 Dec, 2021 13:20 You are the creator of FastFind Enhancer, aren't you? Best plugin/script I ever used in Far.
No, I'm not the author of Fast Find Enhanced, I only made some very minor corrections there.
Post Reply

Return to “Support and Troubleshooting”