sobrinho/ESP32-BLE-Abs-Mouse

How to do scroll ?

iKK001 opened this issue · 0 comments

How can I do scrolling with this library ?

I tried to estimate how the code would look like for scrolling. But I failed miserably since I do not have enough knowledge of what is really going on under the hood.

Here my trial (that does not work yet):

void BleAbsMouse::scroll(int8_t v_Wheel, int8_t h_Wheel)
{
  this->isPressed = false;
  if (this->isConnected())
  {
    uint8_t m[5];
    m[0] = 0;
    m[1] = 0;
    m[2] = 0;
    m[3] = v_Wheel;
    m[4] = h_Wheel;
    this->inputAbsMouse->setValue(m, 5);
    this->inputAbsMouse->notify();
  }
}

How would I have to call setValue in order to make a vertical up/down scroll. And how for left/right scroll ?