diff --git a/CHANGELOG.md b/CHANGELOG.md index 645b6eeb..c66a98b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -58,6 +58,9 @@ * Blinking text now uses the foreground color, but dimmed down in its off state, instead of the background color. +* Num Lock by default overrides the keypad mode. See + **foot.ini**(5)::KEYPAD, or [README.md](README.md#keypad) for + details (https://codeberg.org/dnkl/foot/issues/194). ### Deprecated diff --git a/README.md b/README.md index bcbddecd..8bf12bf8 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ The fast, lightweight and minimalistic Wayland terminal emulator. 1. [Server (daemon) mode](#server-daemon-mode) 1. [Alt/meta](#alt-meta) 1. [Backspace](#backspace) +1. [Keypad](#keypad) 1. [DPI and font size](#dpi-and-font-size) 1. [Supported OSCs](#supported-oscs) 1. [Programmatically checking if running in foot](#programmatically-checking-if-running-in-foot) @@ -270,6 +271,25 @@ Finally, pressing alt will prefix the transmitted byte with ESC. +## KEYPAD + +By default, Num Lock overrides the run-time configuration +keypad mode; when active, the keypad is always considered to be in +_numerical_ mode. This corresponds to XTerm's `numLock` option set to +`true`. + +In this mode, the keypad keys always sends either numbers (Num +Lock is **active**) or cursor movement keys (Up, +Down, Left, Right, Page +Up, Page Down etc). + +This can be disabled programmatically with `\E[?1035l` (and enabled +again with `\E[?1035h`). + +When disabled, the keypad sends custom escape sequences instead of +numbers, when in _application_ mode. + + ## DPI and font size Font sizes are apparently a complex thing. Many applications use a diff --git a/doc/foot.1.scd b/doc/foot.1.scd index e8460cc7..e3be3013 100644 --- a/doc/foot.1.scd +++ b/doc/foot.1.scd @@ -267,6 +267,23 @@ described above *cannot* be changed. Finally, pressing *alt* will prefix the transmitted byte with ESC. +# KEYPAD + +By default, *Num Lock* overrides the run-time configuration keypad +mode; when active, the keypad is always considered to be in +_numerical_ mode. This corresponds to XTerm's *numLock* option set to +*true*. + +In this mode, the keypad keys always sends either numbers (Num Lock is +active) or cursor movement keys (up, down, left, right, page up, page +down etc). + +This can be disabled programmatically with *\E[?1035l* (and enabled +again with *\E[?1035h*). + +When disabled, the keypad sends custom escape sequences instead of +numbers, when in _application_ mode. + # CONFIGURATION See *foot.ini*(5) diff --git a/foot.ini b/foot.ini index 8f8d4493..b22ed049 100644 --- a/foot.ini +++ b/foot.ini @@ -84,7 +84,6 @@ # pipe-scrollback=[sh -c "xurls | bemenu | xargs -r firefox"] none # pipe-selected=[xargs -r firefox] none - [search-bindings] # cancel=Control+g Escape # commit=Return