commit a1303a881129f8e06604e57ff514d1316a92c95d
parent a44ac5937fc2d6f9714a7cd3364219fcfb15c8a2
Author: bakkeby <bakkeby@gmail.com>
Date: Sat, 8 May 2021 16:57:59 +0200
Adding delkey patch ref. #21
Diffstat:
3 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
@@ -15,7 +15,7 @@ Refer to [https://st.suckless.org/](https://st.suckless.org/) for details on the
### Changelog:
-2021-05-08 - Added blinking cursor, undercurl, desktopentry, netwmicon and osc_10_11_12_2 patches
+2021-05-08 - Added blinking cursor, delkey, undercurl, desktopentry, netwmicon and osc_10_11_12_2 patches
2021-05-07 - Added xresources reload patch
@@ -90,6 +90,9 @@ Refer to [https://st.suckless.org/](https://st.suckless.org/) for details on the
- this patch allows you to select and copy the last URL displayed with Mod+l
- multiple invocations cycle through the available URLs
+ - [delkey](https://st.suckless.org/patches/delkey/)
+ - return BS on pressing backspace and DEL on pressing the delete key
+
- [desktopentry](https://st.suckless.org/patches/desktopentry/)
- adds a desktop entry for st so that it can be displayed with an icon when using a graphical launcher
- this patch only applies to the Makefile and is enabled by default, remove if not needed
diff --git a/config.def.h b/config.def.h
@@ -455,7 +455,11 @@ static Key key[] = {
{ XK_KP_Delete, ControlMask, "\033[3;5~", +1, 0},
{ XK_KP_Delete, ShiftMask, "\033[2K", -1, 0},
{ XK_KP_Delete, ShiftMask, "\033[3;2~", +1, 0},
+ #if DELKEY_PATCH
+ { XK_KP_Delete, XK_ANY_MOD, "\033[3~", -1, 0},
+ #else
{ XK_KP_Delete, XK_ANY_MOD, "\033[P", -1, 0},
+ #endif // DELKEY_PATCH
{ XK_KP_Delete, XK_ANY_MOD, "\033[3~", +1, 0},
{ XK_KP_Multiply, XK_ANY_MOD, "\033Oj", +2, 0},
{ XK_KP_Add, XK_ANY_MOD, "\033Ok", +2, 0},
@@ -523,7 +527,11 @@ static Key key[] = {
{ XK_Delete, ControlMask, "\033[3;5~", +1, 0},
{ XK_Delete, ShiftMask, "\033[2K", -1, 0},
{ XK_Delete, ShiftMask, "\033[3;2~", +1, 0},
+ #if DELKEY_PATCH
+ { XK_Delete, XK_ANY_MOD, "\033[3~", -1, 0},
+ #else
{ XK_Delete, XK_ANY_MOD, "\033[P", -1, 0},
+ #endif // DELKEY_PATCH
{ XK_Delete, XK_ANY_MOD, "\033[3~", +1, 0},
{ XK_BackSpace, XK_NO_MOD, "\177", 0, 0},
{ XK_BackSpace, Mod1Mask, "\033\177", 0, 0},
diff --git a/patches.def.h b/patches.def.h
@@ -72,6 +72,11 @@
*/
#define COPYURL_HIGHLIGHT_SELECTED_URLS_PATCH 0
+/* Return BS on pressing backspace and DEL on pressing the delete key.
+ * https://st.suckless.org/patches/delkey/
+ */
+#define DELKEY_PATCH 0
+
/* This patch adds the option of disabling bold fonts globally.
* https://st.suckless.org/patches/disable_bold_italic_fonts/
*/