]> git.armaanb.net Git - st.git/commitdiff
Add terminfo entries for backspace mode
authorRoberto E. Vargas Caballero <k0ga@shike2.com>
Fri, 10 Apr 2020 20:50:23 +0000 (22:50 +0200)
committerHiltjo Posthuma <hiltjo@codemadness.org>
Sat, 11 Apr 2020 13:23:23 +0000 (15:23 +0200)
St used to use backspace as BS until the commit 230d0c8, but due
to general lack of knowledge of lusers, we moved to the most common
configuration in linux to avoid answering the same question 3 times
per month. With the most common configuration we have a backspace
that returns a DEL, and we have a Delete key that doesn't return a
DEL character neither a BS.

When dealing with devices connected using a serial line (or even
with Plan9) it is more common Backspace as BS and Delete as DEL. For
this reason, st is not always the best tool when you talk with a
serial device.

This patch adds new terminfo entries for Backspace as BS and Delete
as DEL. A patch for confg.h is also added, to make easier switch
between both configurations.

st.info

diff --git a/st.info b/st.info
index 78ffd3035215cdcfc03db6457bbd04e76b261999..1df490b476ab26d7f300421e1f5b30ed2afa9f90 100644 (file)
--- a/st.info
+++ b/st.info
@@ -220,3 +220,13 @@ st-meta-256color| simpleterm with meta key and 256 colors,
        smm=\E[?1034h,
        rs2=\E[4l\E>\E[?1034h,
        is2=\E[4l\E>\E[?1034h,
+
+st-bs| simpleterm with backspace as backspace,
+       use=st,
+       kbs=\010,
+       kdch1=\177,
+
+st-bs-256color| simpleterm with backspace as backspace and 256colors,
+       use=st-256color,
+       kbs=\010,
+       kdch1=\177,