2023-04-02 16:10:13 +02:00
|
|
|
// clicks
|
|
|
|
enum {
|
|
|
|
clickwindow,
|
|
|
|
clickprompt,
|
|
|
|
clickinput,
|
|
|
|
clicklarrow,
|
2023-04-04 02:28:05 +02:00
|
|
|
clickitem,
|
|
|
|
clickselitem,
|
2023-04-02 16:10:13 +02:00
|
|
|
clickrarrow,
|
|
|
|
clicknumber,
|
2023-04-20 21:22:45 +02:00
|
|
|
clickcaps,
|
2023-04-02 16:10:13 +02:00
|
|
|
clickmode,
|
|
|
|
};
|
|
|
|
|
2023-04-25 16:42:15 +02:00
|
|
|
typedef struct {
|
|
|
|
unsigned int click;
|
|
|
|
unsigned int mask;
|
|
|
|
unsigned int button;
|
|
|
|
void (*func)(Arg *arg);
|
|
|
|
Arg arg;
|
|
|
|
} Mouse;
|
|
|
|
|
2023-04-25 17:58:50 +02:00
|
|
|
#if USECONFIG
|
2023-04-25 16:42:15 +02:00
|
|
|
typedef struct {
|
|
|
|
char *click;
|
|
|
|
unsigned int button;
|
|
|
|
} ButtonType;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
char *tclick;
|
|
|
|
unsigned int click;
|
|
|
|
} ClickType;
|
|
|
|
|
|
|
|
static ButtonType btp[] = {
|
2023-04-25 17:52:52 +02:00
|
|
|
{ "Left Click", Button1 },
|
|
|
|
{ "Middle Click", Button2 },
|
|
|
|
{ "Right Click", Button3 },
|
|
|
|
{ "Scroll Up", Button4 },
|
|
|
|
{ "Scroll Down", Button5 },
|
2023-04-25 16:42:15 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
static ClickType ctp[] = {
|
|
|
|
{ "clickwindow", clickwindow },
|
|
|
|
{ "clickprompt", clickprompt },
|
|
|
|
{ "clickinput", clickinput },
|
|
|
|
{ "clicklarrow", clicklarrow },
|
|
|
|
{ "clickitem", clickitem },
|
|
|
|
{ "clickselitem", clickselitem },
|
|
|
|
{ "clickrarrow", clickrarrow },
|
|
|
|
{ "clicknumber", clicknumber },
|
|
|
|
{ "clickcaps", clickcaps },
|
|
|
|
{ "clickmode", clickmode },
|
|
|
|
};
|
2023-04-25 17:58:50 +02:00
|
|
|
#endif
|
2023-04-25 16:42:15 +02:00
|
|
|
|
|
|
|
static Mouse cbuttons[256];
|
2023-03-08 17:20:32 +01:00
|
|
|
static void buttonpress(XEvent *e);
|