Hello, I'm new in programming in general and I need to map a mouse device to be used like a joystick or mapped to a keyboard button.
What I want:
I want to use a bluetooth mouse to work as a joystick or to emulate key presses using the delta from the mouse.
I want to use this as a controller for a game (GzDoom) that support joysticks or keyboard for movement. Because I also have a giroscopic mouse for the aiming I need to block the signal from the mouse movement on the system so I can use both mices one for movement and one for aiming.
I don't want to configure the giroscopic mouse because it's working fine for aiming.
the hardware I have is this:
https://www.amazon.in/VR-Case-Bluetooth ... B01GMDAD1Y
This is a bluetooth controller for an android device, most of it's buttons are connected to some keys that are not mapped to normal keys:
- volume up / volume down
- something else I don't remember (Tap me thinks).
Now some of it's buttons are not even recognized by windows, so i can't use the buttons for mapping to the directional keys on the keyboard, which is what I tried first (only 2 of them are functional the others are not even being recognized as keys when I try to detect the key codes).
this device also have a mouse function that works when pressing at the same time the @ button and the power button, and it's detected by the system as a mouse device.
It can emulate pure axis movement, meaning that if I move the stick in one direction only the delta on that direction changes, so it's easy to use as a joystick or a mouse. it also doesn't have a VID/ PID number so It's have been only recognized by it's handler.
I have found EvilC Warper for Interception and I have managed to program a script to map the delta to keys, it works but I don't know how to program the return to 0 on the delta of the mouse, so it stops moving when I stop pressing the handle.
I have tried using UCR to map the mouse delta to a vjoy device with the plugin that comes with this program. This works, but it have problems:
When I configure the device to work with both axis X,Y one of the axis never work (one of the axis can only move to max or min and stays there, but the other works)
If I configure the device to use a single axis the plugin works as intended. I have tried using different profiles for each axis but this present the same problem. one of the profiles works fine an the other always have max/min values.
I have also tried with the old version of UCR, now this works fine, in fact it works very well, but I couldn't find a way to disable the mouse movement. I don't know if it's even possible to do it with the old UCR.
this is the new UCR log:
If possible I would want to use UCR for doing this because of it's funcionality or if it's not possible then how can I program the stop from the mouse on interception, I have seen a script that evilC write on AHK for mouse to keys movement on an old thread on the forums of AHK, but is not using interception, I have tried to program something on interception but I can't conceptualize how is gonna listen to an event that doesn't exists and needs to be created by AHK.
this is my script:
If this can't be solved then I will try to buy another "bluetooth joystick" and try to not get scammed by the sellers again...