diff -r 1423c29694f8 -r 361687fe303a cadMousePro-daemon/src/CadMouseConfig.h --- a/cadMousePro-daemon/src/CadMouseConfig.h Tue Jun 09 16:10:20 2020 +0200 +++ b/cadMousePro-daemon/src/CadMouseConfig.h Tue Jun 09 16:12:00 2020 +0200 @@ -34,6 +34,8 @@ bool liftOffDetection = true; bool smartScrolling = false; Frequency frequency = Frequency::Hz_1000; + bool remapWheelPress = true; + bool remapGestureButton = true; public: void setFrequency(Frequency frequency) { @@ -48,6 +50,22 @@ this->smartScrolling = smartScrolling; } + /** + * @param remapGestureButton whether the gesture button (the small one behind the wheel) + * should send a button signal (11) otherwise it sends no button signal + */ + void setRemapGestureButton(bool remapGestureButton) { + this->remapGestureButton = remapGestureButton; + } + + /** + * @param remapWheelPress whether the wheel pressed + * should send different button signal (10) than the middle button (2) + */ + void setWheelPressRemapped(bool remapWheelPress) { + this->remapWheelPress = remapWheelPress; + } + Packet serialize() { Packet data; data.reserve(32); @@ -80,10 +98,10 @@ data.push_back(0x0a); data.push_back(0x0b); data.push_back(0x0c); - data.push_back(0x0c); + data.push_back(remapWheelPress ? 0x0f : 0x0c); data.push_back(0x0e); data.push_back(0x0d); - data.push_back(0x2f); + data.push_back(remapGestureButton ? 0x10 : 0x2f); data.push_back(0x00); data.push_back(0x1e);