From 632637adb82af6ca4e9ab80b53fcaea3fcb6ca08 Mon Sep 17 00:00:00 2001 From: Santiago Lo Coco Date: Thu, 19 Nov 2020 15:02:54 -0300 Subject: [PATCH] Added possibility for modifying the velocity of the scrolling --- config.def.h | 14 ++++++++------ config.def.h.orig | 8 ++++---- config.h | 13 +++++++------ st | Bin 102728 -> 102776 bytes x.o | Bin 74648 -> 74696 bytes 5 files changed, 19 insertions(+), 16 deletions(-) diff --git a/config.def.h b/config.def.h index e69f093..7d6bfcc 100644 --- a/config.def.h +++ b/config.def.h @@ -171,14 +171,16 @@ static uint forcemousemod = ShiftMask; /* * Internal mouse shortcuts. * Beware that overloading Button1 will disable the selection. + * Button2: Click with the mouse wheel! For pasting! */ +const unsigned int mousescrollincrement = 3; static MouseShortcut mshortcuts[] = { - /* mask button function argument release */ - { XK_ANY_MOD, Button4, kscrollup, {.i = 1}, 0, /* !alt */ -1 }, - { XK_ANY_MOD, Button5, kscrolldown, {.i = 1}, 0, /* !alt */ -1 }, - { XK_ANY_MOD, Button2, selpaste, {.i = 0}, 1 }, - { XK_ANY_MOD, Button4, ttysend, {.s = "\031"} }, - { XK_ANY_MOD, Button5, ttysend, {.s = "\005"} }, + /* mask button function argument release */ + { XK_ANY_MOD, Button4, kscrollup, {.i = mousescrollincrement} }, + { XK_ANY_MOD, Button5, kscrolldown, {.i = mousescrollincrement} }, + { XK_ANY_MOD, Button2, selpaste, {.i = 0}, 1 }, + { XK_ANY_MOD, Button4, ttysend, {.s = "\031"} }, + { XK_ANY_MOD, Button5, ttysend, {.s = "\005"} }, }; /* Internal keyboard shortcuts. */ diff --git a/config.def.h.orig b/config.def.h.orig index 6fc6364..e69f093 100644 --- a/config.def.h.orig +++ b/config.def.h.orig @@ -173,11 +173,11 @@ static uint forcemousemod = ShiftMask; * Beware that overloading Button1 will disable the selection. */ static MouseShortcut mshortcuts[] = { - /* mask button function argument release alt */ - { XK_ANY_MOD, Button2, selpaste, {.i = 0}, 1 }, - { XK_ANY_MOD, Button4, ttysend, {.s = "\033[5;2~"}, 0, -1 }, + /* mask button function argument release */ + { XK_ANY_MOD, Button4, kscrollup, {.i = 1}, 0, /* !alt */ -1 }, + { XK_ANY_MOD, Button5, kscrolldown, {.i = 1}, 0, /* !alt */ -1 }, + { XK_ANY_MOD, Button2, selpaste, {.i = 0}, 1 }, { XK_ANY_MOD, Button4, ttysend, {.s = "\031"} }, - { XK_ANY_MOD, Button5, ttysend, {.s = "\033[6;2~"}, 0, -1 }, { XK_ANY_MOD, Button5, ttysend, {.s = "\005"} }, }; diff --git a/config.h b/config.h index e69f093..e08fcea 100644 --- a/config.h +++ b/config.h @@ -172,13 +172,14 @@ static uint forcemousemod = ShiftMask; * Internal mouse shortcuts. * Beware that overloading Button1 will disable the selection. */ +const unsigned int mousescrollincrement = 3; static MouseShortcut mshortcuts[] = { - /* mask button function argument release */ - { XK_ANY_MOD, Button4, kscrollup, {.i = 1}, 0, /* !alt */ -1 }, - { XK_ANY_MOD, Button5, kscrolldown, {.i = 1}, 0, /* !alt */ -1 }, - { XK_ANY_MOD, Button2, selpaste, {.i = 0}, 1 }, - { XK_ANY_MOD, Button4, ttysend, {.s = "\031"} }, - { XK_ANY_MOD, Button5, ttysend, {.s = "\005"} }, + /* mask button function argument release */ + { XK_ANY_MOD, Button4, kscrollup, {.i = mousescrollincrement} }, + { XK_ANY_MOD, Button5, kscrolldown, {.i = mousescrollincrement} }, + { XK_ANY_MOD, Button2, selpaste, {.i = 0}, 1 }, + { XK_ANY_MOD, Button4, ttysend, {.s = "\031"} }, + { XK_ANY_MOD, Button5, ttysend, {.s = "\005"} }, }; /* Internal keyboard shortcuts. */ diff --git a/st b/st index e43b3fd40a9f7e713533f37c2427d7af96bff5a0..43078dc04f8219094b867a7b2e61048c47dab370 100755 GIT binary patch delta 3379 zcmY+H4|L2|7RTQmhCwnjNhUIrWRek7NV2H^2P>&`6D5*Vwt~c;Ac;2dU)9nk7DfHp zWXI{HShSQVE0I(}Q>3z*v`WJ6*>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`mngjMElqjN&&7DczLSyP$~MJ8{UIgJ)t=V z2RDjSLNUM+o(4Gg)*w{0rM^)x(??VTs}Hym0~xnL{irj)G=$*c zabXw*`-G!U1)i;9-Rui*RECkC@!v;9Mt3^td>BPh8{ZFu-$!voIL>}04-co{*h6^X z^gdO-*{W}Wj+zRr=PcxSH#|izNxypMxJ>tK;mzSR7qd_Vr5VG|h#1|o#@wup>qCjL zlvq12lfI`ool1Tw(p8XE)SR+T>2LLWN+*(m_HtP^rf9C+oK2I>l)>$@aNG9QM$D#c zyTezR)aREv`_D%T)MXC0EkTdsPE>HqQk>*gI8YnkpVw*hOYYoVOUr11t@e*==m6Cw zzD3)+Val(|X^_va|18+Hfrj}s>jwv=xpv|PT5TY2{<;EUwX9Qon4Oi#4u^SSB}M%Y D5GE|# diff --git a/x.o b/x.o index ee1851d134561156b7f2d55f2eb808b5d1ede274..45cda68d7218cfff5061fd2da65013934e80aace 100644 GIT binary patch delta 273 zcmbPnoaMxEmI)e+9UC>*drfjw*qq>{!MRx>L_mg-dGf>pc_0~>C%ieOKubfLonZn4 z1h7D99v%h;K?Y`q9yD>W$qQ$QOR9opxfwL1AkrLARVI@!0%fhCvKDBvu9F#OiZl9b zmYm7QBa)k6TAW&(T$G=albM%Xl$x8GS29^`sn_P*rOg$L3$}lhWprm`oHDsEPkefS zJfi~Rgz1IyjP;BkrhkM`g$h94i|rp3822+WKA65y38=ne`cEZBb54($5cdR5w^U{{ MXPhy;P?=F301~@F1poj5 delta 260 zcmX?coMpywmI)e+5gRqvdu{&UWxzQ(!AoMZLWqFO^dGW}Je>cbfOYy?Sw?Xd5N~rr zfu4poGeZvp1h7D9Mji$RK?W8eL=_j9d~t@jq&!%bo54T|BFh0)r8b#yrnsa5R4+^v zMw@RooXN*CIb^Bl<^@X|Di{m4E6OptGcrz?T$m?5y+NK)fiYqFLV3n|#skw86~NR& s5Vd2wq9WsdM#c@(A1VRWCrsB=W;EwCm