mouse shortcuts: allow same functions as kb shortcuts

Previously mouse shortcuts supported only ttywrite.

This required adding an "Arg" function ttysend - which does what the
original mouse shortcuts did.
This commit is contained in:
Avi Halachmi (:avih)
2019-10-10 23:02:26 +03:00
committed by Hiltjo Posthuma
parent 2b8333f553
commit ba7f4d69af
3 changed files with 18 additions and 9 deletions

View File

@ -155,9 +155,9 @@ static unsigned int defaultattr = 11;
* Beware that overloading Button1 will disable the selection.
*/
static MouseShortcut mshortcuts[] = {
/* button mask string */
{ Button4, XK_ANY_MOD, "\031" },
{ Button5, XK_ANY_MOD, "\005" },
/* mask button function argument */
{ XK_ANY_MOD, Button4, ttysend, {.s = "\031"} },
{ XK_ANY_MOD, Button5, ttysend, {.s = "\005"} },
};
/* Internal keyboard shortcuts. */