Add / Change Function key labels

You have encountered a problem using Far Manager? Here you can get help.
Post Reply
Marton
Posts: 18
Joined: Mon 27 Apr, 2009 06:42

Add / Change Function key labels

Post by Marton » Fri 05 Jul, 2019 19:34

I think this probably has been answered before, or maybe I am missing something, but I tried many searches and could not find anything related in the forum, strangeously.
The question is how can I change/add text to the bottom function keys panel?
For example, I have a macro for Shift-F7 to use the LiveFileSearch plugin, and I want to add the label "LiveFS" to the button for Shift-F7, which now shows empty but of course works.
After adding some macros to AltGr-F1-F12, I can't remember them all after not using them for a while. When I press AltGr I see the empty panel, so I want to add some label of what they do to each one of the buttons. Is this possible somehow?

User avatar
DrKnS
Posts: 5427
Joined: Thu 04 Aug, 2005 06:44
Location: Kyiv
Has thanked: 6 times
Been thanked: 250 times

Add / Change Function key labels

Post by DrKnS » Fri 05 Jul, 2019 21:58

Create a file named "fareng.lng.custom" in either %farhome% or %farprofile% directory with the following content:

Code: Select all

//[MShiftF7]
"LiveFS"
- and restart Far. You can find other identifiers in FarEng.lng.

AltGr translates to CtrlAlt, so use //[MCtrlAltF1], //[MCtrlAltF2] etc.

Yegor
Posts: 1035
Joined: Mon 04 Apr, 2005 13:41
Location: San Ramon, CA / Kharkov, UA
Has thanked: 8 times
Been thanked: 20 times

Add / Change Function key labels

Post by Yegor » Fri 05 Jul, 2019 23:43

DrKnS, А это еще в силе?

Code: Select all

svs 26.04.2012 17:50:01 +0400 - build 2644

1. Mantis#0001620: Полные названия в линейке клавиш
   "Напощупать".
   Реализован вариант "Основа|окончание1|окончание2|окончание3".
   Формируется в зависимости от длины (чтобы максимально поместилось).

   Имеем "Просм|отр|отреть". В зависимости от ширины знакоместа под лейбак получаем один из 3-х вариантов:
   "Просм"          = "Просм"
   "Просм" + "отр"  = "Просмотр"
   "Просм"+"отреть" = "Просмотреть"
   т.е. первая часть будет по любому.

   Память под конкретную метку выделяется динамически (нет ограничения на 16 символов).

   Прежде чем кидаться лопатить farlang.templ.m4, подстаривая лейбаки для подобного поведения,
   имеет смысл "потренироваться на кошках":

   <?xml version="1.0" encoding="UTF-8" ?>
   <farconfig>
       <generalconfig>
           <setting key="KeyBarLabels.English.Shell" name="AltF4" type="text" value="Edit|..|Ext| Extern| External" />
           <setting key="KeyBarLabels.English.Shell" name="F4" type="text" value="Edit| File" />
       </generalconfig>
   </farconfig>
Мы не можем ждать милостей от Фара, взять их у него — наша задача! (C) Мичурин

User avatar
DrKnS
Posts: 5427
Joined: Thu 04 Aug, 2005 06:44
Location: Kyiv
Has thanked: 6 times
Been thanked: 250 times

Add / Change Function key labels

Post by DrKnS » Sat 06 Jul, 2019 11:28


User avatar
John Doe
Бюрократ
Posts: 12527
Joined: Wed 27 Apr, 2005 20:42
Has thanked: 33 times
Been thanked: 234 times

Add / Change Function key labels

Post by John Doe » Sat 06 Jul, 2019 12:35

There is also macro-way to label f-keys: viewtopic.php?p=115594#p115594 (russian)

Marton
Posts: 18
Joined: Mon 27 Apr, 2009 06:42

Add / Change Function key labels

Post by Marton » Sat 06 Jul, 2019 22:50

@DrKnS: right on the spot. Worked first try. Thanks for the tip on AltGr translation as well! :good:

Marton
Posts: 18
Joined: Mon 27 Apr, 2009 06:42

Add / Change Function key labels

Post by Marton » Sat 06 Jul, 2019 22:55

@John Doe: macro method also worked. Thank you as well! Too bad I can't search the russian part of the forum due to my language limitations :D

Post Reply

Return to “Support and Troubleshooting”