HID scrollMouse #4882
Replies: 1 comment
-
Posted at 2020-03-03 by Mrbbp it works like that
where sens is equal 1 or -1 for scrollup or down Posted at 2020-03-04 by Mrbbp How to get mouse position (coords x,y) and not mouse mouvement? regards Posted at 2020-03-04 by @gfwilliams Thanks for posting up how to send the scrollup/down - that's great. You're asking how to send Absolute Position? Much like a tablet/touchscreen? I think what you need is USBTablet: http://www.espruino.com/USB#tablet However I don't think that supports a wheel by default! To get that you'll have to make your own HID report descriptor by mashing the wheel's descriptor into the tablet bit... https://github.com/espruino/EspruinoDocs/blob/master/modules/USBMouse.js#L38 But at that point my knowledge is at an end - you'll have to consult Google and use some trial and error to figure out what will work. Posted at 2020-03-05 by Mrbbp Thanxs @gfwilliams for the HIDtablet... which event do i listen? regards Posted at 2020-03-05 by Mrbbp i tested chrome app with Serial connection... thanks for your help regards ps: i'm looking for a "simple way" to introduce "tangible interface" (input from real world) for graphic design's students (with html5 and js bases NO Processing.org)... i'm testing chrome-app ... it's not the best way but the "easiest". (for my pov to combine : cheap hardware +html5/css/js (webtech) + newb. Posted at 2020-03-06 by @gfwilliams Honestly I'm not sure about the USBTablet stuff - it may be it wasn't recognised by your PC? Wow, first I've come across that 'connect to espruino' example. I can't get it to work either - but to be honest those hosted Chrome apps are being removed by Google soon anyway. How about trying this: https://github.com/espruino/EspruinoWebTools#uartjs It should be just what you want - it'll work off any HTTPS page as long as you view in an up to date Chrome web browser. Right now you have to enable it in chrome://flags (https://codelabs.developers.google.com/codelabs/web-serial/#2) but in a few months that won't be needed. You can use the Web Serial API directly, but the uart.js wrapper should provide a nice interface around it. Posted at 2020-03-06 by Mrbbp Gorgeous! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2020-03-03 by Mrbbp
Hello i'm trying to simulate a mouse with a HC-sr04.
it works well with the x,y coord for the mouse from the example
in the report descriptor from here, there is line for x, y and mouseScroll 0x038
description commented found on sparkfun's forum
How to send a mousescroll ? and which value should i send?
best regards
é.
Beta Was this translation helpful? Give feedback.
All reactions