Heerkog / MicroPythonBLEHID

Human Interface Device (HID) over Bluetooth Low Energy (BLE) GATT library for MicroPython.
GNU General Public License v3.0
204 stars 28 forks source link

Can I use absolute coordinates on Android devices? #18

Closed 422557374 closed 2 months ago

422557374 commented 2 months ago

Thank you very much for your great project, I encountered some problems during use, please answer 1.Can I use absolute coordinates on Android devices? Manually give the current device fixed resolution 2.I tried changing the report mapping item from "INPUT(1), 0x06" to "INPUT(1), 0x02", but it didn't take effect. 3.On an Android device, when I try to run "self.mouse.set_axes(x,y)", no matter what the x y value is, the pointer will shift to one side of the x-axis, while the y-axis is always fixed in the middle and unresponsive.

Heerkog commented 2 months ago

Hi,

  1. You could try by creating a new device with a custom input report. However, I feel most mouse drivers on the client side would be picky about assuming relative movement.
  2. You're on the right track, but you probably also need to set bigger report sizes for the X and Y and adjust the minimum and maximum usages (currently one byte per axis that range from -127 to 127) to cover the entire screen, and then match the code to encode and send reports of that size.
  3. I'm assuming this has to do with 2.