From 37a220634713344c4a1fe4453fc4f36dc0a30148 Mon Sep 17 00:00:00 2001 From: James Laird-Wah Date: Mon, 5 Dec 2016 10:40:31 +1100 Subject: [PATCH] Support horizontal scroll with mouse wheel --- constants.h | 2 ++ xkeymap.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/constants.h b/constants.h index b60aae4..85e1cec 100644 --- a/constants.h +++ b/constants.h @@ -245,6 +245,8 @@ enum RDP_INPUT_DEVICE #define MOUSE_FLAG_BUTTON3 0x4000 #define MOUSE_FLAG_BUTTON4 0x0280 #define MOUSE_FLAG_BUTTON5 0x0380 +#define MOUSE_FLAG_BUTTON6 0x0580 +#define MOUSE_FLAG_BUTTON7 0x0480 #define MOUSE_FLAG_DOWN 0x8000 /* Raster operation masks */ diff --git a/xkeymap.c b/xkeymap.c index 240e31d..c68dead 100644 --- a/xkeymap.c +++ b/xkeymap.c @@ -889,6 +889,10 @@ xkeymap_translate_button(unsigned int button) return MOUSE_FLAG_BUTTON4; case Button5: /* wheel down */ return MOUSE_FLAG_BUTTON5; + case 6: /* wheel left */ + return MOUSE_FLAG_BUTTON6; + case 7: /* wheel right */ + return MOUSE_FLAG_BUTTON7; } return 0;