diff --git a/src/ChangeLog b/src/ChangeLog index 25bdfb463..8f8bd686d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2002-09-20 Pavel Roskin + * mouse.h: Define events for the mouse wheel. + * key.c (xmouse_get_event): Recognize mouse wheel events. + * command.c: (command_insert): New function - insert quoted text into the command line. * main.c: Use command_insert() instead of stuff(). This ensures diff --git a/src/key.c b/src/key.c index 1499dfb81..23ae9f303 100644 --- a/src/key.c +++ b/src/key.c @@ -324,6 +324,12 @@ xmouse_get_event (Gpm_Event *ev) case 2: ev->buttons = GPM_B_RIGHT; break; + case 64: + ev->buttons = GPM_B_UP; + break; + case 65: + ev->buttons = GPM_B_DOWN; + break; default: /* Nothing */ ev->type = 0; diff --git a/src/mouse.h b/src/mouse.h index d2f9384ac..92e182096 100644 --- a/src/mouse.h +++ b/src/mouse.h @@ -73,6 +73,10 @@ void disable_mouse (void); #define MOU_ENDLOOP 0x02 #define MOU_LOCK 0x04 +/* Mouse wheel events. GPM doesn't seem to support them yet. */ +#define GPM_B_UP 8 +#define GPM_B_DOWN 16 + #ifdef HAVE_LIBGPM /* GPM specific mouse support definitions */