Browse Source

Add mouse scrolling

master
Tovi Jaeschke-Rogers 3 years ago
parent
commit
f2dec3e0f5
1 changed files with 14 additions and 8 deletions
  1. +14
    -8
      config.h

+ 14
- 8
config.h View File

@ -166,17 +166,23 @@ static unsigned int defaultattr = 11;
*/
static uint forcemousemod = ShiftMask;
const unsigned int mousescrollincrement = 5;
/*
* Internal mouse shortcuts.
* Beware that overloading Button1 will disable the selection.
*/
static MouseShortcut mshortcuts[] = {
/* mask button function argument release */
{ ShiftMask, Button4, kscrollup, {.i = mousescrollincrement} },
{ XK_ANY_MOD, Button4, kscrollup, {.i = mousescrollincrement} },
{ ShiftMask, Button5, kscrolldown, {.i = mousescrollincrement} },
{ XK_ANY_MOD, Button5, kscrolldown, {.i = mousescrollincrement} },
{ XK_ANY_MOD, Button2, selpaste, {.i = 0}, 1 },
{ ShiftMask, Button4, ttysend, {.s = "\033[5;2~"} },
{ XK_ANY_MOD, Button4, ttysend, {.s = "\031"} },
{ ShiftMask, Button5, ttysend, {.s = "\033[6;2~"} },
{ XK_ANY_MOD, Button5, ttysend, {.s = "\005"} },
// { ShiftMask, Button4, ttysend, {.s = "\033[5;2~"} },
// { XK_ANY_MOD, Button4, ttysend, {.s = "\031"} },
// { ShiftMask, Button5, ttysend, {.s = "\033[6;2~"} },
// { XK_ANY_MOD, Button5, ttysend, {.s = "\005"} },
};
/* Internal keyboard shortcuts. */
@ -199,10 +205,10 @@ static Shortcut shortcuts[] = {
{ TERMMOD, XK_Num_Lock, numlock, {.i = 0} },
{ ShiftMask, XK_Page_Up, kscrollup, {.i = -1} },
{ ShiftMask, XK_Page_Down, kscrolldown, {.i = -1} },
{ MODKEY, XK_k, kscrollup, {.i = 1} },
{ MODKEY, XK_j, kscrolldown, {.i = 1} },
{ MODKEY, XK_Up, kscrollup, {.i = 1} },
{ MODKEY, XK_Down, kscrolldown, {.i = 1} },
{ MODKEY, XK_k, kscrollup, {.i = 1} },
{ MODKEY, XK_j, kscrolldown, {.i = 1} },
{ MODKEY, XK_Up, kscrollup, {.i = 1} },
{ MODKEY, XK_Down, kscrolldown, {.i = 1} },
};
/*


Loading…
Cancel
Save