diff --git a/CHANGELOG.md b/CHANGELOG.md index 1105a416..939a2967 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), ### Added - Emoji sequences containing Zero Width Joiner characters are now displayed as a single combined glyph (#2286). +- Key combinations such as `` and `` can now be distinguished when supported by the terminal (#2286) (#2496). - A new field `.All` is added to the `ruler` file to display the number of all files (i.e. visible + hidden) in the current working directory (#2376). - A new option `numbercursorfmt` is added to further customize the appearance of line numbers (#2395). - A new option `terminalcursor` is added to customize the appearance of the terminal cursor (#2441). diff --git a/doc.md b/doc.md index 72f30b05..a6c5df8d 100644 --- a/doc.md +++ b/doc.md @@ -1613,7 +1613,7 @@ Some special keys and modifiers use different names and separators, and key name 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). +Other key combinations may not be distinguishable by lf, depending on how the terminal reports them (e.g. `Ctrl+h` may be reported as `backspace` 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. Mouse buttons are prefixed with an `m` character: diff --git a/doc.txt b/doc.txt index 48fc1b48..fd53fe01 100644 --- a/doc.txt +++ b/doc.txt @@ -1772,11 +1772,12 @@ no aliases), so some familiar forms will not work: 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. +window manager, or terminal. Other key combinations may not be +distinguishable by lf, depending on how the terminal reports them (e.g. +Ctrl+h may be reported as backspace 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. Mouse buttons are prefixed with an m character: diff --git a/key.go b/key.go index cd5a3985..ef51564a 100644 --- a/key.go +++ b/key.go @@ -105,9 +105,12 @@ var gKeyVal = map[tcell.Key]string{ tcell.KeyCtrlE: "", tcell.KeyCtrlF: "", tcell.KeyCtrlG: "", + tcell.KeyCtrlH: "", + tcell.KeyCtrlI: "", tcell.KeyCtrlJ: "", tcell.KeyCtrlK: "", tcell.KeyCtrlL: "", + tcell.KeyCtrlM: "", tcell.KeyCtrlN: "", tcell.KeyCtrlO: "", tcell.KeyCtrlP: "", diff --git a/lf.1 b/lf.1 index 9e84bb9d..998c8c2e 100644 --- a/lf.1 +++ b/lf.1 @@ -1,6 +1,6 @@ .\" Automatically generated by Pandoc 3.7.0.2 .\" -.TH "LF" "1" "2026\-03\-21" "r42" "DOCUMENTATION" +.TH "LF" "1" "2026\-04\-08" "r42" "DOCUMENTATION" .SH NAME lf \- terminal file manager .SH SYNOPSIS @@ -1615,9 +1615,9 @@ map down # not .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 -terminals work (e.g. -\f[CR]Ctrl+h\f[R] combination sends a backspace key instead). +Other key combinations may not be distinguishable by lf, depending on +how the terminal reports them (e.g. +\f[CR]Ctrl+h\f[R] may be reported as \f[CR]backspace\f[R] 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 \f[CR]unknown mapping\f[R] error.