ftkalcevic / GenericHID

7 stars 4 forks source link

mouse x axis emulation with an encoder #2

Open gerryc89 opened 3 years ago

gerryc89 commented 3 years ago

Hi, thanks a lot for the software, is very powerfull and simply to use, i have mounted a teensey2 in an arcade cabinet with 1ms scan and 1ms debounce, work very well, but i have necessity to emulate a mouse y axis on the interface with an optical encoder, is possible to combinate this with the keyboard buttons? Sorry but i don´t have the necessary know how to understand the hid usage pages for mouse preripherals. Thanks again. Gerry

ftkalcevic commented 3 years ago

Hi Gerry,

I’m glad you found the software helpful. As for the mouse, simply, I do not know. I can have a play and see if I can get it working, but it wont be till the weekend. From memory though, I think the mouse needs to be a separate device – you can’t just select individual usage pages.

What OS are you running for your operating system? Linux does have the ability to simulate a mouse via key strokes.

Frank

From: gerryc89 @.*** Sent: Wednesday, 31 March 2021 1:34 AM To: ftkalcevic/GenericHID Cc: Subscribed Subject: [ftkalcevic/GenericHID] mouse axix emulation with an encoder (#2)

Hi, thanks a lot for the software, is very powerfull and simply to use, i have mounted a teensey2 in an arcade cabinet with 1ms scan and 1ms debounce, work very well, but i have necessity to emulate a mouse y azis on the interface with an optical encoder, is possible to combinate this with the keyboard buttons? Sorry but i don´t have the necessary know how to understand the hid usage pages for mouse preripherals. Thanks again. Gerry

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ftkalcevic/GenericHID/issues/2 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AALFD5NDBH6CF5PNBR27AULTGHOL7ANCNFSM42CGA5IQ .Image removed by sender.

gerryc89 commented 3 years ago

Hi Frank, thanks for your reply, the os that I have used to install the machine is windows 7 64, I have tried also to put the main device configured as mouse, and only one encoder configured as Y but nothing, I can't scroll the cursor on the screen, in the generichid interface the encoder work well. Gerry

Hi Gerry, I’m glad you found the software helpful. As for the mouse, simply, I do not know. I can have a play and see if I can get it working, but it wont be till the weekend. From memory though, I think the mouse needs to be a separate device – you can’t just select individual usage pages. What OS are you running for your operating system? Linux does have the ability to simulate a mouse via key strokes. Frank

ftkalcevic commented 3 years ago

Windows has “Mouse keys” that allows you to simulate the mouse with a keyboard – part of accessibility. I don’t think that helps with generic hid because a usb keyboard is like a usb mouse, but you could add another keyboard or keypad, or even strip down one and connect your own buttons to the keys.

Mouse Keys - https://support.microsoft.com/en-us/windows/use-mouse-keys-to-move-the-mouse-pointer-9e0c72c8-b882-7918-8e7b-391fd62adf33

From: gerryc89 @.*** Sent: Wednesday, 31 March 2021 6:57 AM To: ftkalcevic/GenericHID Cc: Frank Tkalcevic; Comment Subject: Re: [ftkalcevic/GenericHID] mouse x axis emulation with an encoder (#2)

Hi Frank, thanks for your reply, the os that I have used to install the machine is windows 7 64, I have tried also to put the main device configured as mouse, and only one encoder configured as Y but nothing, I can't scroll the cursor on the screen, in the generichid interface the encoder work well. Gerry

Hi Gerry, I’m glad you found the software helpful. As for the mouse, simply, I do not know. I can have a play and see if I can get it working, but it wont be till the weekend. From memory though, I think the mouse needs to be a separate device – you can’t just select individual usage pages. What OS are you running for your operating system? Linux does have the ability to simulate a mouse via key strokes. Frank

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ftkalcevic/GenericHID/issues/2#issuecomment-810536972 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AALFD5JCQ2N3IYVURILS33DTGIUH7ANCNFSM42CGA5IQ .Image removed by sender.

gerryc89 commented 3 years ago

unfortnately i have the necessity of an rotary encoder for control the mouse y axis, the software tha i have installed for the game library isn`t much ocnfigurable, also the mame emulator, isn´t immediate to change all imput configurations for all the games. You think is possible with your software, also with two teensy if, or i have to strip an old ball mouse? :D Gerry

Windows has “Mouse keys” that allows you to simulate the mouse with a keyboard – part of accessibility. I don’t think that helps with generic hid because a usb keyboard is like a usb mouse, but you could add another keyboard or keypad, or even strip down one and connect your own buttons to the keys. Mouse Keys - https://support.microsoft.com/en-us/windows/use-mouse-keys-to-move-the-mouse-pointer-9e0c72c8-b882-7918-8e7b-391fd62adf33

ftkalcevic commented 3 years ago

I have to play around with the software to try, but I’m not confident that I can get mouse input working.

From: gerryc89 @.*** Sent: Wednesday, 31 March 2021 7:44 AM To: ftkalcevic/GenericHID Cc: Frank Tkalcevic; Comment Subject: Re: [ftkalcevic/GenericHID] mouse x axis emulation with an encoder (#2)

unfortnately i have the necessity of an rotary encoder for control the mouse y axis, the software tha i have installed for the game library isn`t much ocnfigurable, also the mame emulator, isn´t immediate to change all imput configurations for all the games. You think is possible with your software, also with two teensy if, or i have to strip an old ball mouse? :D Gerry

Windows has “Mouse keys” that allows you to simulate the mouse with a keyboard – part of accessibility. I don’t think that helps with generic hid because a usb keyboard is like a usb mouse, but you could add another keyboard or keypad, or even strip down one and connect your own buttons to the keys. Mouse Keys - https://support.microsoft.com/en-us/windows/use-mouse-keys-to-move-the-mouse-pointer-9e0c72c8-b882-7918-8e7b-391fd62adf33

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ftkalcevic/GenericHID/issues/2#issuecomment-810565205 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AALFD5IM4JNRMYXQL632VMLTGIZ23ANCNFSM42CGA5IQ .Image removed by sender.

ftkalcevic commented 3 years ago

I played around with this today, and I managed to get it to work, but, only if the generichid device is a mouse – which means you can’t have other buttons and joysticks. GenericHID isn’t smart enough to be dual devices.

To do this…

on the MCU device, set…

Usage Page = Generic Desktop Controls

Usage = Mouse

On the encoders, set…

Usage Page = Generic Desktop Controls

Usage = X or Y

Output = Relative (you can also use absolute for absolute mouse positioning).

Buttons, set…

Usage Page = Button

Usage = 1, 2, etc

When I tried it, the mouse moved very slowly using the small 16 count per revolution encoders I tested with.

Frank

From: gerryc89 @.*** Sent: Wednesday, 31 March 2021 7:44 AM To: ftkalcevic/GenericHID Cc: Frank Tkalcevic; Comment Subject: Re: [ftkalcevic/GenericHID] mouse x axis emulation with an encoder (#2)

unfortnately i have the necessity of an rotary encoder for control the mouse y axis, the software tha i have installed for the game library isn`t much ocnfigurable, also the mame emulator, isn´t immediate to change all imput configurations for all the games. You think is possible with your software, also with two teensy if, or i have to strip an old ball mouse? :D Gerry

Windows has “Mouse keys” that allows you to simulate the mouse with a keyboard – part of accessibility. I don’t think that helps with generic hid because a usb keyboard is like a usb mouse, but you could add another keyboard or keypad, or even strip down one and connect your own buttons to the keys. Mouse Keys - https://support.microsoft.com/en-us/windows/use-mouse-keys-to-move-the-mouse-pointer-9e0c72c8-b882-7918-8e7b-391fd62adf33

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ftkalcevic/GenericHID/issues/2#issuecomment-810565205 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AALFD5IM4JNRMYXQL632VMLTGIZ23ANCNFSM42CGA5IQ . https://github.com/notifications/beacon/AALFD5PB2RAS7HCNRE7JSNLTGIZ23A5CNFSM42CGA5I2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGBID4VI.gif