commit 8b38db9309f616bd9954a661685887eb2a21f6ae
parent 9bebbcf2af28fd16249ab2de19a86d9db390a9b1
Author: Jan Klemkow <j.klemkow@wemelug.de>
Date: Tue, 25 Oct 2022 23:20:12 +0200
Add support for vt-sequences for Home and Delete keys used by tmux(1)
Diffstat:
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/slackline.c b/slackline.c
@@ -197,13 +197,20 @@ sl_keystroke(struct slackline *sl, int key)
switch(key) {
case '~':
switch(sl->nummod) {
+ case '1': /* Home */
case '7':
sl_move(sl, HOME);
break;
- case '4':
+ case '4': /* End */
case '8':
sl_move(sl, END);
break;
+ case '3': /* Delete */
+ if (sl->rcur == sl->rlen)
+ break;
+ sl_move(sl, RIGHT);
+ sl_backspace(sl);
+ break;
}
sl->esc = ESC_NONE;
return 0;