docs: mention differences to Vim's key notation (#2417)

This commit is contained in:
CatsDeservePets authored and GitHub committed 2026-03-05 02:31:25 +01:00
1 parent 0bbeae73df
commit 941866b62f
3 files changed
+38 -4

No files matched your search

+10 -1
View File
@@ -1566,7 +1566,7 @@ Angle brackets can be assigned with their special names:
map <lt> down
map <gt> down
Function keys are prefixed with `f` character:
Function keys are prefixed with an `f` character:
map <f-1> 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 <enter> down # not <Enter>, <Return> or <CR>
map <f-1> down # not <F1>
map <a-j> down # not <A-j> or <M-j> (Meta)
map <m-2> open # not <RightMouse>
map <m-up> down # not <ScrollWheelUp>
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.
+12 -1
View File
@@ -1721,7 +1721,7 @@ Angle brackets can be assigned with their special names:
map <lt> down
map <gt> down
Function keys are prefixed with f character:
Function keys are prefixed with an f character:
map <f-1> 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 <enter> down # not <Enter>, <Return> or <CR>
map <f-1> down # not <F1>
map <a-j> down # not <A-j> or <M-j> (Meta)
map <m-2> open # not <RightMouse>
map <m-up> down # not <ScrollWheelUp>
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
+16 -2
View File
@@ -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 <lt> down
map <gt> 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 <f\-1> down
@@ -1589,6 +1589,20 @@ map <a\-enter> 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 <enter> down # not <Enter>, <Return> or <CR>
map <f\-1> down # not <F1>
map <a\-j> down # not <A\-j> or <M\-j> (Meta)
map <m\-2> open # not <RightMouse>
map <m\-up> down # not <ScrollWheelUp>
.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