From 941866b62fe3feb40d1325d4225b068d0129fe9b Mon Sep 17 00:00:00 2001 From: CatsDeservePets <145048791+CatsDeservePets@users.noreply.github.com> Date: Thu, 5 Mar 2026 02:31:25 +0100 Subject: [PATCH] docs: mention differences to Vim's key notation (#2417) --- doc.md | 11 ++++++++++- doc.txt | 13 ++++++++++++- lf.1 | 18 ++++++++++++++++-- 3 files changed, 38 insertions(+), 4 deletions(-) diff --git a/doc.md b/doc.md index 85e92c36..2125cc36 100644 --- a/doc.md +++ b/doc.md @@ -1566,7 +1566,7 @@ Angle brackets can be assigned with their special names: map down map down -Function keys are prefixed with `f` character: +Function keys are prefixed with an `f` character: map down @@ -1592,6 +1592,15 @@ It is possible to combine special keys with modifiers: Combining multiple modifiers (e.g. `Ctrl+Shift+Space`) is not supported. +Note that lf's key mapping syntax is similar to Vim's, but not identical. +Some special keys and modifiers use different names and separators, and key names are matched literally (i.e. no case-folding, no aliases), so some familiar forms will not work: + + map down # not , or + map down # not + map down # not or (Meta) + map open # not + map down # not + WARNING: Some key combinations will likely be intercepted by your OS, window manager, or terminal. Other key combinations cannot be recognized by lf due to the way terminals work (e.g. `Ctrl+h` combination sends a backspace key instead). The easiest way to find out the name of a key combination and whether it will work on your system is to press the key while lf is running and read the name from the `unknown mapping` error. diff --git a/doc.txt b/doc.txt index 1b7c8184..41eb0144 100644 --- a/doc.txt +++ b/doc.txt @@ -1721,7 +1721,7 @@ Angle brackets can be assigned with their special names: map down map down -Function keys are prefixed with f character: +Function keys are prefixed with an f character: map down @@ -1750,6 +1750,17 @@ It is possible to combine special keys with modifiers: Combining multiple modifiers (e.g. Ctrl+Shift+Space) is not supported. +Note that lf's key mapping syntax is similar to Vim's, but not +identical. Some special keys and modifiers use different names and +separators, and key names are matched literally (i.e. no case-folding, +no aliases), so some familiar forms will not work: + + map down # not , or + map down # not + map down # not or (Meta) + map open # not + map down # not + WARNING: Some key combinations will likely be intercepted by your OS, window manager, or terminal. Other key combinations cannot be recognized by lf due to the way terminals work (e.g. Ctrl+h combination sends a diff --git a/lf.1 b/lf.1 index 2dc1fbb8..1e24c352 100644 --- a/lf.1 +++ b/lf.1 @@ -1,6 +1,6 @@ .\" Automatically generated by Pandoc 3.7.0.2 .\" -.TH "LF" "1" "2026\-03\-04" "r41" "DOCUMENTATION" +.TH "LF" "1" "2026\-03\-05" "r42" "DOCUMENTATION" .SH NAME lf \- terminal file manager .SH SYNOPSIS @@ -1545,7 +1545,7 @@ map down map down .EE .PP -Function keys are prefixed with \f[CR]f\f[R] character: +Function keys are prefixed with an \f[CR]f\f[R] character: .IP .EX map down @@ -1589,6 +1589,20 @@ map down Combining multiple modifiers (e.g. \f[CR]Ctrl+Shift+Space\f[R]) is not supported. .PP +Note that lf\(aqs key mapping syntax is similar to Vim\(aqs, but not +identical. +Some special keys and modifiers use different names and separators, and +key names are matched literally (i.e. +no case\-folding, no aliases), so some familiar forms will not work: +.IP +.EX +map down # not , or +map down # not +map down # not or (Meta) +map open # not +map down # not +.EE +.PP WARNING: Some key combinations will likely be intercepted by your OS, window manager, or terminal. Other key combinations cannot be recognized by lf due to the way