sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

st-nano-shortcuts-support-0.8.5.diff (5218B)


      1 diff --git a/config.def.h b/config.def.h
      2 index 91ab8ca..2e35192 100644
      3 --- a/config.def.h
      4 +++ b/config.def.h
      5 @@ -242,6 +242,7 @@ static uint ignoremod = Mod2Mask|XK_SWITCH_MOD;
      6   */
      7  static Key key[] = {
      8  	/* keysym           mask            string      appkey appcursor */
      9 +	{ XK_KP_Home,       ControlMask,    "\033[1;5H",     0,    0},
     10  	{ XK_KP_Home,       ShiftMask,      "\033[2J",       0,   -1},
     11  	{ XK_KP_Home,       ShiftMask,      "\033[1;2H",     0,   +1},
     12  	{ XK_KP_Home,       XK_ANY_MOD,     "\033[H",        0,   -1},
     13 @@ -258,6 +259,7 @@ static Key key[] = {
     14  	{ XK_KP_Right,      XK_ANY_MOD,     "\033Ov",       +1,    0},
     15  	{ XK_KP_Right,      XK_ANY_MOD,     "\033[C",        0,   -1},
     16  	{ XK_KP_Right,      XK_ANY_MOD,     "\033OC",        0,   +1},
     17 +	{ XK_KP_Prior,      Mod1Mask,       "\033[5;3~",     0,    0},
     18  	{ XK_KP_Prior,      ShiftMask,      "\033[5;2~",     0,    0},
     19  	{ XK_KP_Prior,      XK_ANY_MOD,     "\033[5~",       0,    0},
     20  	{ XK_KP_Begin,      XK_ANY_MOD,     "\033[E",        0,    0},
     21 @@ -266,19 +268,22 @@ static Key key[] = {
     22  	{ XK_KP_End,        ShiftMask,      "\033[K",       -1,    0},
     23  	{ XK_KP_End,        ShiftMask,      "\033[1;2F",    +1,    0},
     24  	{ XK_KP_End,        XK_ANY_MOD,     "\033[4~",       0,    0},
     25 +	{ XK_KP_Next,       Mod1Mask,       "\033[6;3~",     0,    0},
     26  	{ XK_KP_Next,       ShiftMask,      "\033[6;2~",     0,    0},
     27  	{ XK_KP_Next,       XK_ANY_MOD,     "\033[6~",       0,    0},
     28  	{ XK_KP_Insert,     ShiftMask,      "\033[2;2~",    +1,    0},
     29  	{ XK_KP_Insert,     ShiftMask,      "\033[4l",      -1,    0},
     30 +	{ XK_KP_Insert,     Mod1Mask,       "\033[2;3~",     0,    0},
     31  	{ XK_KP_Insert,     ControlMask,    "\033[L",       -1,    0},
     32  	{ XK_KP_Insert,     ControlMask,    "\033[2;5~",    +1,    0},
     33  	{ XK_KP_Insert,     XK_ANY_MOD,     "\033[4h",      -1,    0},
     34  	{ XK_KP_Insert,     XK_ANY_MOD,     "\033[2~",      +1,    0},
     35 -	{ XK_KP_Delete,     ControlMask,    "\033[M",       -1,    0},
     36 +	{ XK_KP_Delete,     ControlMask,    "\033[3;5~",    -1,    0},
     37  	{ XK_KP_Delete,     ControlMask,    "\033[3;5~",    +1,    0},
     38 +	{ XK_KP_Delete,     Mod1Mask,       "\033[3;3~",     0,    0},
     39  	{ XK_KP_Delete,     ShiftMask,      "\033[2K",      -1,    0},
     40  	{ XK_KP_Delete,     ShiftMask,      "\033[3;2~",    +1,    0},
     41 -	{ XK_KP_Delete,     XK_ANY_MOD,     "\033[P",       -1,    0},
     42 +	{ XK_KP_Delete,     XK_ANY_MOD,     "\033[3~",      -1,    0},
     43  	{ XK_KP_Delete,     XK_ANY_MOD,     "\033[3~",      +1,    0},
     44  	{ XK_KP_Multiply,   XK_ANY_MOD,     "\033Oj",       +2,    0},
     45  	{ XK_KP_Add,        XK_ANY_MOD,     "\033Ok",       +2,    0},
     46 @@ -338,18 +343,21 @@ static Key key[] = {
     47  	{ XK_Return,        XK_ANY_MOD,     "\r",            0,    0},
     48  	{ XK_Insert,        ShiftMask,      "\033[4l",      -1,    0},
     49  	{ XK_Insert,        ShiftMask,      "\033[2;2~",    +1,    0},
     50 +	{ XK_Insert,        Mod1Mask,       "\033[2;3~",     0,    0},
     51  	{ XK_Insert,        ControlMask,    "\033[L",       -1,    0},
     52  	{ XK_Insert,        ControlMask,    "\033[2;5~",    +1,    0},
     53  	{ XK_Insert,        XK_ANY_MOD,     "\033[4h",      -1,    0},
     54  	{ XK_Insert,        XK_ANY_MOD,     "\033[2~",      +1,    0},
     55 -	{ XK_Delete,        ControlMask,    "\033[M",       -1,    0},
     56 +	{ XK_Delete,        ControlMask,    "\033[3;5~",    -1,    0},
     57  	{ XK_Delete,        ControlMask,    "\033[3;5~",    +1,    0},
     58 +	{ XK_Delete,        Mod1Mask,       "\033[3;3~",     0,    0},
     59  	{ XK_Delete,        ShiftMask,      "\033[2K",      -1,    0},
     60  	{ XK_Delete,        ShiftMask,      "\033[3;2~",    +1,    0},
     61 -	{ XK_Delete,        XK_ANY_MOD,     "\033[P",       -1,    0},
     62 +	{ XK_Delete,        XK_ANY_MOD,     "\033[3~",      -1,    0},
     63  	{ XK_Delete,        XK_ANY_MOD,     "\033[3~",      +1,    0},
     64  	{ XK_BackSpace,     XK_NO_MOD,      "\177",          0,    0},
     65  	{ XK_BackSpace,     Mod1Mask,       "\033\177",      0,    0},
     66 +	{ XK_Home,          ControlMask,    "\033[1;5H",     0,    0},
     67  	{ XK_Home,          ShiftMask,      "\033[2J",       0,   -1},
     68  	{ XK_Home,          ShiftMask,      "\033[1;2H",     0,   +1},
     69  	{ XK_Home,          XK_ANY_MOD,     "\033[H",        0,   -1},
     70 @@ -360,9 +368,11 @@ static Key key[] = {
     71  	{ XK_End,           ShiftMask,      "\033[1;2F",    +1,    0},
     72  	{ XK_End,           XK_ANY_MOD,     "\033[4~",       0,    0},
     73  	{ XK_Prior,         ControlMask,    "\033[5;5~",     0,    0},
     74 +	{ XK_Prior,         Mod1Mask,       "\033[5;3~",     0,    0},
     75  	{ XK_Prior,         ShiftMask,      "\033[5;2~",     0,    0},
     76  	{ XK_Prior,         XK_ANY_MOD,     "\033[5~",       0,    0},
     77  	{ XK_Next,          ControlMask,    "\033[6;5~",     0,    0},
     78 +	{ XK_Next,          Mod1Mask,       "\033[6;3~",     0,    0},
     79  	{ XK_Next,          ShiftMask,      "\033[6;2~",     0,    0},
     80  	{ XK_Next,          XK_ANY_MOD,     "\033[6~",       0,    0},
     81  	{ XK_F1,            XK_NO_MOD,      "\033OP" ,       0,    0},
     82 diff --git a/st.info b/st.info
     83 index 8201ad6..7c9de94 100644
     84 --- a/st.info
     85 +++ b/st.info
     86 @@ -62,8 +62,10 @@ st-mono| simpleterm monocolor,
     87  	kcuf1=\EOC,
     88  	kcuu1=\EOA,
     89  	kDC=\E[3;2~,
     90 +	kDC5=\E[3;5~
     91  	kent=\EOM,
     92  	kEND=\E[1;2F,
     93 +	kEND5=\E[1;5F,
     94  	kIC=\E[2;2~,
     95  	kNXT=\E[6;2~,
     96  	kPRV=\E[5;2~,