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 »

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: 6114
Joined: Thu 04 Aug, 2005 06:44
Location: Kyiv
Has thanked: 12 times
Been thanked: 426 times

Add / Change Function key labels

Post by DrKnS »

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: 1326
Joined: Mon 04 Apr, 2005 13:41
Location: San Ramon, CA / Kharkov, UA
Has thanked: 32 times
Been thanked: 61 times

Add / Change Function key labels

Post by Yegor »

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: 6114
Joined: Thu 04 Aug, 2005 06:44
Location: Kyiv
Has thanked: 12 times
Been thanked: 426 times

Add / Change Function key labels

Post by DrKnS »

User avatar
John Doe
Бюрократ
Posts: 13807
Joined: Wed 27 Apr, 2005 20:42
Has thanked: 73 times
Been thanked: 426 times
Contact:

Add / Change Function key labels

Post by John Doe »

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 »

@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 »

@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”