Add support for End key

- Shift + End : Delete until end of line.
    - Control + End : Delete until end of screen.

When  the End  key is  pressed  without any  modifier is  not generated  the
correct sequence for it  (going to the end of the  screen), because the size
of the  terminal is not known,  so it is  not possible write a  sequence for
this purpouse.
---
 config.def.h |   10 ++++++++--
 st.info      |    2 ++
 2 files changed, 10 insertions(+), 2 deletions(-)
This commit is contained in:
Roberto E. Vargas Caballero 2012-11-25 22:13:29 +01:00
parent 7c34ff1703
commit d5994b43ca
2 changed files with 10 additions and 2 deletions

View file

@ -121,7 +121,10 @@ static Key key[] = {
{ XK_KP_Prior, ShiftMask, "\033[5;2~", 0, 0, 0}, { XK_KP_Prior, ShiftMask, "\033[5;2~", 0, 0, 0},
{ XK_KP_Prior, XK_ANY_MOD, "\033[5~", 0, 0, 0}, { XK_KP_Prior, XK_ANY_MOD, "\033[5~", 0, 0, 0},
{ XK_KP_Begin, XK_ANY_MOD, "\033[E", 0, 0, 0}, { XK_KP_Begin, XK_ANY_MOD, "\033[E", 0, 0, 0},
{ XK_KP_End, ShiftMask, "\033[1;2F", 0, 0, 0}, { XK_KP_End, ControlMask, "\033[J", -1, 0, 0},
{ XK_KP_End, ControlMask, "\033[1;5F", +1, 0, 0},
{ XK_KP_End, ShiftMask, "\033[K", -1, 0, 0},
{ XK_KP_End, ShiftMask, "\033[1;2F", +1, 0, 0},
{ XK_KP_End, XK_ANY_MOD, "\033[4~", 0, 0, 0}, { XK_KP_End, XK_ANY_MOD, "\033[4~", 0, 0, 0},
{ XK_KP_Next, ShiftMask, "\033[6;2~", 0, 0, 0}, { XK_KP_Next, ShiftMask, "\033[6;2~", 0, 0, 0},
{ XK_KP_Next, XK_ANY_MOD, "\033[6~", 0, 0, 0}, { XK_KP_Next, XK_ANY_MOD, "\033[6~", 0, 0, 0},
@ -196,7 +199,10 @@ static Key key[] = {
{ XK_Home, ShiftMask, "\033[1;2H", 0, 0, 0}, { XK_Home, ShiftMask, "\033[1;2H", 0, 0, 0},
{ XK_Home, XK_ANY_MOD, "\033[H", 0, -1, 0}, { XK_Home, XK_ANY_MOD, "\033[H", 0, -1, 0},
{ XK_Home, XK_ANY_MOD, "\033[1~", 0, +1, 0}, { XK_Home, XK_ANY_MOD, "\033[1~", 0, +1, 0},
{ XK_End, ShiftMask, "\033[1;2F", 0, 0, 0}, { XK_End, ControlMask, "\033[J", -1, 0, 0},
{ XK_End, ControlMask, "\033[1;5F", +1, 0, 0},
{ XK_End, ShiftMask, "\033[K", -1, 0, 0},
{ XK_End, ShiftMask, "\033[1;2F", +1, 0, 0},
{ XK_End, XK_ANY_MOD, "\033[4~", 0, 0, 0}, { XK_End, XK_ANY_MOD, "\033[4~", 0, 0, 0},
{ XK_Prior, XK_NO_MOD, "\033[5~", 0, 0, 0}, { XK_Prior, XK_NO_MOD, "\033[5~", 0, 0, 0},
{ XK_Next, ShiftMask, "\033[6;2~", 0, 0, 0}, { XK_Next, ShiftMask, "\033[6;2~", 0, 0, 0},

View file

@ -49,6 +49,8 @@ st| simpleterm,
invis=\E[8m, invis=\E[8m,
is2=\E[4l\E>, is2=\E[4l\E>,
it#8, it#8,
kel=\E[1;2F,
ked=\E[1;5F,
ka1=\E[1~, ka1=\E[1~,
ka3=\E[5~, ka3=\E[5~,
kc1=\E[4~, kc1=\E[4~,