FreeJoy icon indicating copy to clipboard operation
FreeJoy copied to clipboard

Feature request: Fast encoder as mouse

Open robcazzaro opened this issue 5 years ago • 3 comments

I just discovered FreeJoy, really amazing.

I was planning to build my own USB interface for Retropie/Mame. A single Blue Pill with USB HID implementing both a joystick and optical rotary encoder. The rotary encoder to be used for old arcade games like Tempest and Arkanoid.

Usually all optical encoders for arcade emulators work as a mouse, sending an x-axis (or y-axis) increment for every encoder step. I see that FreeJoy sends button events instead, because it's been implemented as a joystick profile.

Do you think you will ever have any interest in adding a USB mouse HID profile and using encoders as a mouse? It would also work as trackball (but only if there is a way to implement another fast encoder for the other axis)

robcazzaro avatar Sep 13 '20 19:09 robcazzaro

Hi, I'm going to add support for mouse but not sure how it will be implemented yet. I will back to this question when I start development of this feature

vostrenkov avatar Sep 14 '20 06:09 vostrenkov

Great, I'll keep an eye on this.

Other solutions simply send a Mouse.move(1, 0) when the encoder increments by one, Mouse.move(-1, 0) when the decoder decrements by one.

I tried putting together a mouse library and an encoder library, and the simple code above works just fine

robcazzaro avatar Sep 14 '20 16:09 robcazzaro

I want to bind mouse to axis to be able to control by an analog ministick. Encoder also ok but I haven't thought yet how all these features should be implemented

vostrenkov avatar Sep 14 '20 20:09 vostrenkov