Page 1 of 1

Add / Change Function key labels

Posted: Fri 05 Jul, 2019 19:34
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?

Add / Change Function key labels

Posted: Fri 05 Jul, 2019 21:58
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.

Add / Change Function key labels

Posted: Fri 05 Jul, 2019 23:43
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>

Add / Change Function key labels

Posted: Sat 06 Jul, 2019 11:28
by DrKnS

Add / Change Function key labels

Posted: Sat 06 Jul, 2019 12:35
by John Doe
There is also macro-way to label f-keys: viewtopic.php?p=115594#p115594 (russian)

Add / Change Function key labels

Posted: Sat 06 Jul, 2019 22:50
by Marton
@DrKnS: right on the spot. Worked first try. Thanks for the tip on AltGr translation as well! :good:

Add / Change Function key labels

Posted: Sat 06 Jul, 2019 22:55
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