UCR does not support two non-modifier key hotkeys.
To work around this, you could make a custom plugin with double the number of input bindings.
Universal Control Remapper (UCR) - v0.1.22 28th Oct 2018
Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017
I gave it a go, and to my surprise I was able to figure it out!evilC wrote:UCR does not support two non-modifier key hotkeys.
To work around this, you could make a custom plugin with double the number of input bindings.
My solution isn't the prettiest, but it works for me.
Basically, I used the ButtonsToAxis core plugin as the base of the custom one, and changed this part:
Code: Select all
if (this.AxisButtonStates[1] == this.AxisButtonStates[2]){
out := this.MidPoint
} else {
if (this.AxisButtonStates[1]){
out := this.DeflectionValues[1]
} else {
out := this.DeflectionValues[2]
}
}
Code: Select all
if (this.AxisButtonStates[1] = false){
out := this.MidPoint
}
else if (this.AxisButtonStates[2] = false){
out := this.MidPoint
} else {
if (this.AxisButtonStates[1] && this.AxisButtonStates[2]){
out := this.DeflectionValues[1]
} else {
return
}
}
Hacky fix, but seems to work just perfect. Thanks for pointing me in the right direction!
Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017
Glad you figured it out!
FYI, if (this.AxisButtonStates[1] = false){ could also be written as if (!this.AxisButtonStates[1]){
FYI, if (this.AxisButtonStates[1] = false){ could also be written as if (!this.AxisButtonStates[1]){
-
- Posts: 74
- Joined: 09 Apr 2017, 14:05
Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017
Hi,
I did a little testing of Mouse Axis to Joystick Axis with vJoy and works nice with two mice.
I have an Arcade Cab with 2 lightguns, as you probably already know, and this might be pretty interesting for me as my guns are pretty old crt ones, and only can use a driver that see them as mice not as joys like most modern IR ones (like Aimtraks)
I did a little testing of Mouse Axis to Joystick Axis with vJoy and works nice with two mice.
I have an Arcade Cab with 2 lightguns, as you probably already know, and this might be pretty interesting for me as my guns are pretty old crt ones, and only can use a driver that see them as mice not as joys like most modern IR ones (like Aimtraks)
so the question is, can it take care about position? to make the joysticks axes coincide with my aiming?Remaps mouse to joystick using Delta mouse information (Does not care about cursor position or if cursor hits edge of screen)
Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017
UCR is designed only for "Relative" (CHANGE in position is reported) whereas AFAIK most light guns report as "Absolute" (Actual position).
It's kind of like the difference between how a mouse and a touch-screen would report.
UCR currently only supports relative mode for mice.
I am currently re-writing UCR with a guy who is a cabinet owner (And I may well put one together when I get my new flat, I have had an X-Arcade stick gathering dust for years), and we intend to have better support for mice in the new version.
How much are these light guns? I don't own any absolute mouse devices, so should probably add them to my (insane) collection of sticks
I would also search around in this forum, as someone else has already gotten this working I think.
IIRC correctly, the solution he found was Interception.
The new version of UCR currently uses Interception for the keyboard / mouse support.
It's kind of like the difference between how a mouse and a touch-screen would report.
UCR currently only supports relative mode for mice.
I am currently re-writing UCR with a guy who is a cabinet owner (And I may well put one together when I get my new flat, I have had an X-Arcade stick gathering dust for years), and we intend to have better support for mice in the new version.
How much are these light guns? I don't own any absolute mouse devices, so should probably add them to my (insane) collection of sticks
I would also search around in this forum, as someone else has already gotten this working I think.
IIRC correctly, the solution he found was Interception.
The new version of UCR currently uses Interception for the keyboard / mouse support.
-
- Posts: 74
- Joined: 09 Apr 2017, 14:05
Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017
I use crt ps2 guns with Ems topgun driver, so mine about 4$, but people use Aimtraks (IR) with flat screens and I think they costs about 50$ each one.
I used interception to delay the trigger to be pressed after a screen flash crt guns needs to correcltly locate the shot, because they arent read over dark screen zones.
But do you think with interception I can do a mouse to joystick mapping? may I need vjoy?
I used interception to delay the trigger to be pressed after a screen flash crt guns needs to correcltly locate the shot, because they arent read over dark screen zones.
But do you think with interception I can do a mouse to joystick mapping? may I need vjoy?
Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017
i tried to remap joy1.btn1 to joy2.btn1, but not work in game.
Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017
And it works when not in game?
The lights in UCR do NOT mean that it is working, merely that UCR is trying to send output to vJoy.
Use the vJoy Monitor application that comes with vJoy to test if it is actually working
The lights in UCR do NOT mean that it is working, merely that UCR is trying to send output to vJoy.
Use the vJoy Monitor application that comes with vJoy to test if it is actually working
Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017
Hey,
can you please add an gamepad autodetect mode? Becuase sometimes i need to eject usb devices. After replugin or restarts of windows 7, the gamepad need to be reconfigured in your tool.
Btw if someone already asked that quest im sorry because i didnt red the whole thread.
can you please add an gamepad autodetect mode? Becuase sometimes i need to eject usb devices. After replugin or restarts of windows 7, the gamepad need to be reconfigured in your tool.
Btw if someone already asked that quest im sorry because i didnt red the whole thread.
Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017
when i close and reopen UCR it deletes all of my profiles, even when i press "save settings" what is causing this and how do i prevent it?
Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017
@wgf4242
Joystick ID 1 is typically vJoy stick 1. In that screenshot, I am guessing UCR is configured to remap vJoy #1 -> vJoy #2, which will probably do nothing.
Use PJP JoyIDs to find out the IDs of your sticks.
@Fusselkroete
This functionality will not make it into the current iteration of UCR.
It should be possible in the new version that we are writing.
@Maniac of Doom
When you click save, it is meant to save changes to UCR.ini in your UCR folder.
Maybe the file is set to read-only or something and it cannot update it?
Try opening UCR.ini in Notepad++, then in UCR, make a change (eg move the window) and click "Save Settings", then tab back to Notepad++
Does the file get updated?
Joystick ID 1 is typically vJoy stick 1. In that screenshot, I am guessing UCR is configured to remap vJoy #1 -> vJoy #2, which will probably do nothing.
Use PJP JoyIDs to find out the IDs of your sticks.
@Fusselkroete
This functionality will not make it into the current iteration of UCR.
It should be possible in the new version that we are writing.
@Maniac of Doom
When you click save, it is meant to save changes to UCR.ini in your UCR folder.
Maybe the file is set to read-only or something and it cannot update it?
Try opening UCR.ini in Notepad++, then in UCR, make a change (eg move the window) and click "Save Settings", then tab back to Notepad++
Does the file get updated?
Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017
Hi,
Need some help, been tinkering for several hours now and cannot merge my clutch and accelerator pedals on my logitech g29 to use as a rudder axis in FSX.
I managed to do this successfully yesterday with UJR, but then unplugged everything from my laptop. Plugged everything back in this morning and it would not work. No matter which stick and axis ID I chose, the pedal presses are not recognised. I have now downloaded and tried again with UCR with the same results. I cannot figure out why it worked fine yesterday but now the pedals do not seem to be recognised?
Any help would be greatly appreciated. Thanks
Need some help, been tinkering for several hours now and cannot merge my clutch and accelerator pedals on my logitech g29 to use as a rudder axis in FSX.
I managed to do this successfully yesterday with UJR, but then unplugged everything from my laptop. Plugged everything back in this morning and it would not work. No matter which stick and axis ID I chose, the pedal presses are not recognised. I have now downloaded and tried again with UCR with the same results. I cannot figure out why it worked fine yesterday but now the pedals do not seem to be recognised?
Any help would be greatly appreciated. Thanks
Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017
Do the pedals show up in joy.cpl?
With my PC, often when windows reboots it "upgrades" to a bad driver, breaking my G27
With my PC, often when windows reboots it "upgrades" to a bad driver, breaking my G27
Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017
Yes, I have them plugged in through the wheel (no bodnar adapter) and it is recognised in joy.cpl
Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017
Did you try using PJP JoyIDs to find out the ID of the pedals?
Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017
I have indeed, its says the g29 is Id#1, my saitek yoke id#2, and vJoy device Id#3. So in the UCR axismerger tab I set both input axis 1 and 2 to stick 1 and the output virtual axis to stick 3. None of the sliders are moving though?
Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017
Can you read the pedal axis with an AHK script?
eg
(You may need to tweak "1JoyZ" to a different axis, depending on what axis the pedal registers as)
eg
Code: Select all
Loop {
Tooltip % "Axis Value: " GetKeyState("1JoyZ")
Sleep 50
}
Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017
I'm not sure how to do that unfortunately. I assume I do that in the code runner tab? In that case do I press either the gas or the clutch where it says select an input button? Or am I totally missing the point?
Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017
No I meant just a regular AHK script.
UCR is written in AHK, so I want to see if AHK can see the stick moving...
UCR is written in AHK, so I want to see if AHK can see the stick moving...
Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017
Ok, here is what I have done now, I copied your code into a text file and saved it as a .ahk in UTF-8 and ran it, it returned a bunch of text that ended like this:
003: ToolTip,"Axis Value: " GetKeyState("1JoyZ") (0.03)
004: Sleep,50 (0.05)
005: }
003: ToolTip,"Axis Value: " GetKeyState("1JoyZ")
004: Sleep,50 (1.75)
Using "1JoyX" :
003: ToolTip,"Axis Value: " GetKeyState("1JoyX")
004: Sleep,50 (0.05)
005: }
003: ToolTip,"Axis Value: " GetKeyState("1JoyX")
004: Sleep,50 (1.28)
Using "1JoyY" :
003: ToolTip,"Axis Value: " GetKeyState("1JoyY")
004: Sleep,50 (0.05)
005: }
003: ToolTip,"Axis Value: " GetKeyState("1JoyY")
004: Sleep,50 (1.19)
Sorry but programming is not my thing, I'm not really sure what I am supposed to be looking out for. thanks for the help thus far!
003: ToolTip,"Axis Value: " GetKeyState("1JoyZ") (0.03)
004: Sleep,50 (0.05)
005: }
003: ToolTip,"Axis Value: " GetKeyState("1JoyZ")
004: Sleep,50 (1.75)
Using "1JoyX" :
003: ToolTip,"Axis Value: " GetKeyState("1JoyX")
004: Sleep,50 (0.05)
005: }
003: ToolTip,"Axis Value: " GetKeyState("1JoyX")
004: Sleep,50 (1.28)
Using "1JoyY" :
003: ToolTip,"Axis Value: " GetKeyState("1JoyY")
004: Sleep,50 (0.05)
005: }
003: ToolTip,"Axis Value: " GetKeyState("1JoyY")
004: Sleep,50 (1.19)
Sorry but programming is not my thing, I'm not really sure what I am supposed to be looking out for. thanks for the help thus far!
Return to “Gaming Scripts (v1)”
Who is online
Users browsing this forum: No registered users and 11 guests