Universal Control Remapper (UCR) - v0.1.22 28th Oct 2018

Post gaming related scripts
User avatar
evilC
Posts: 4822
Joined: 27 Feb 2014, 12:30

Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017

19 Oct 2017, 04:07

When you run the code, a tooltip should appear on the screen saying "Axis Value: <Number>"
<Number> should change when you move the pedal.

But I am unsure that "JoyZ" would be right.

What is the label for the pedal axis in joy.cpl?
Image
If it is "Slider" or "Dial", then AHK cannot read those axes (Axes 7 and 8).

The AHK names for the axes are:
X: JoyX
Y: JoyY
Z: JoyZ
X Rot: JoyR
Y Rot: JoyU
Z Rot: JoyV

So plug the correct name for the axis into that code and run it - as long as you see the tooltip on screen updating with current value of the pedal, then AHK can see it and the problem is something else

eg if the "X Rotation" axis in joy.cpl moves when you press the pedal, use GetKeyState("1JoyR") in the script I gave you.
keem85
Posts: 25
Joined: 03 Aug 2016, 03:14

Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017

19 Oct 2017, 11:02

Hi there :) Still loving your app. Using it every day. How do I bind mouse scroll? When I scroll the mouse, it will not bind, unless I push a button afterwards. Then it will become "mousewheel + lbutton" for example.
I'm using Button to Button profile.
User avatar
evilC
Posts: 4822
Joined: 27 Feb 2014, 12:30

Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017

19 Oct 2017, 11:29

Ack, I thought I fixed that :(
Mouse Wheel is unique insofar as it has a press, but not a release event.

The "Bind" routine waits for a release event, hence the problem. I did put code in to work around this, but I guess it is not working.

Are you sure you are using the latest release of UCR? I just tested it on my PC and it seems to work.

The relevant code is here: https://github.com/evilC/UCR/blob/maste ... d.ahk#L144
You could try replacing InputEvent (In Threads/BindModeThread.ahk) with this version:

Code: Select all

		InputEvent(e, i){
			;~ OutputDebug % "UCR| BindMode KBM IO Event: " e ", Code: " i ", IOClass: " this.ReturnIOClass
			this.Callback.Call(e, i, 0, this.ReturnIOClass)
			if (i == 158 || i == 159){
				Tooltip % "Firing fake MouseWheel release event for i==" i
				; Mouse wheel only has a down event, simulate an up event so that bind mode properly ends
				this.Callback.Call(0, i, 0, this.ReturnIOClass)
			}
		}
When you roll the mouse wheel in Bind Mode, you should see a tooltip appear on the screen saying that it is firing the fake MouseWheel release event
keem85
Posts: 25
Joined: 03 Aug 2016, 03:14

Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017

19 Oct 2017, 14:46

Hmm. I'm using the latest one yes, but it does not seem to work with me. I'll see if it works when replacing input event
keem85
Posts: 25
Joined: 03 Aug 2016, 03:14

Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017

19 Oct 2017, 14:55

Doesn't seem to work :/

EDIT: Wait, I seem to have 1.16. I downloaded the latest.. But topic says 1.17

EDIT2: It works with the 1.17 alpha.. Sorry I thought 1.16 was the latest. Had to get 1.17 from github :)
ghamantorr

Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017

19 Oct 2017, 19:21

first thanks for the great app.

i need to press a keyboard button when i press a joy button and press the same keyboard button when i release the joy button.

is that possible?

didnt find a way to do that

thanks
User avatar
evilC
Posts: 4822
Joined: 27 Feb 2014, 12:30

Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017

20 Oct 2017, 05:12

@ghamantorr Currently there is nothing in UCR to do that, but it could be done with a custom plugin.

It seems to me that this is probably most easily solved by extending the Code Runner plugin to allow running some code on button release

Save to Plugins\Core and overwrite:

Code: Select all

/*
Demos persistent guicontrols / callbacks for change of value for a guicontrol
Binds a hotkey to a snippet of AHK code
*/
class CodeRunner extends _UCR.Classes.Plugin {
	Type := "Code Runner"
	Description := "Runs AHK code when you press an Input Button"
	Init(){
		Gui, Add, Text, y+10, % "Input Button"
		this.AddControl("InputButton", "MyHk1", 0, this.MyHkChangedState.Bind(this), "x200 yp-2 w200")
		
		Gui, Add, Text, xm, % "Run this AHK code on button press"
		this.AddControl("Edit", "MyEdit1", this.MyEditChanged.Bind(this), "x200 h100 yp-2 w450")
		
		Gui, Add, Button, xm yp+20 hwndhButtonPress, Test Code
		this.hButtonPress := hButtonPress
		fn := this.MyHkChangedState.Bind(this, 1)
		GuiControl +g, % this.hButtonPress, % fn
		
		Gui, Add, Text, xm, % "Run this AHK code on button release"
		this.AddControl("Edit", "MyEdit2", this.MyEditChanged.Bind(this), "x200 h100 yp-2 w450")
		
		Gui, Add, Button, xm yp+20 hwndhButtonRelease, Test Code
		this.hButtonRelease := hButtonRelease
		fn := this.MyHkChangedState.Bind(this, 0)
		GuiControl +g, % this.hButtonRelease, % fn
	}
	
	MyHkChangedState(e){
		; Only run the command on the down event (e=1)
		try {
			if (e){
				script := this.GuiControls.MyEdit1.Get()
			} else {
				script := this.GuiControls.MyEdit2.Get()
			}
			if (script){
				ahkExec(script)
			}
		}
	}
	
	; In order to free memory when a plugin is closed, we must free references to this object
	OnClose(){
		GuiControl -g, % this.hButtonPress
		GuiControl -g, % this.hButtonRelease
		base.OnClose()
	}
		
}
Then you can put AHK code which sends the appropriate key(s) on press and release.

Here, I have configured it to Send the 1 key on press and release
Image

This new version of the Code Runner has been added to the repo and will be the default in the next release.
Pngwyn

Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017

24 Oct 2017, 09:31

Thanks so much for this remapper. It's working well for me, except one issue which is the trigger buttons. If I read correctly, if I want trigger buttons to work I have to use "Button to Axes" option. However when I assign it, it has a high and a low, am I supposed to assign them both the same hotkey? Right now whenever I assign either one when I go into the game the trigger will just spam after first pull instead of working once on trigger pull.

Also secondly, just wondering is there any way to get rumble to work on Joycons?
Guest

Re: Universal Control Remapper (UCR) - v0.1.16 11th Jun 2017

25 Oct 2017, 14:08

evilC wrote:@ErAzOr - What do you mean by Hardware Id? VID/PID? All Xbox controllers have the same VID/PID, so this is normal for XInput.

@jra64 - Each profile can only map an input once. It will let you map it multiple times, but only one will work.
To do what you want, you could add a child profile to your current profile and tick the "inherits from parent" checkbox.
That way, both profiles will be active, and each one can have it's own binding to L1

Sorry, I had to put my project on hold.
I try to describe my problem a little bit more (as it's not easy for me to write in english).

With Nvidia Gamestream I'm able to play games on my Nvidia Shield (or any other Moonlight Cient) on my remote machine.
On my client I connected two controllers. These controllers are recognized as Xinput devices on my remote machine.

Now I have the problem with some games or emulators are recognizing just one controller instead of two.
I'm not the only one with this problem. see here https://github.com/moonlight-stream/moo ... issues/265. Here you find more technical details.

So my hope is, that as workaround, there is something available, which wraps the xinput devices as dinput devices. With it, I would increase the compatibility for more emulators, as more most emulators support dinput.

Is something like this possible with UCR?
Crusher1509

Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017

26 Oct 2017, 13:00

My problem is when i click on a different window or minimize ucr it stops detecting the input
User avatar
evilC
Posts: 4822
Joined: 27 Feb 2014, 12:30

Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017

27 Oct 2017, 06:58

New version released

Code: Select all

0.1.18 - 27th Oct 2017
= Increased number of Titan One axes to 13
  TouchX and TouchY are now selectable.
+ Axis Splitter now has invert options for output axes
+ Added second editbox to CodeRunner plugin for code to run on button release
keem85
Posts: 25
Joined: 03 Aug 2016, 03:14

Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017

27 Oct 2017, 18:25

Hey man :)

I have a really unusual request. First thing first. I am mapping CLUTCH and GAS of my pedals to join as ONE axis, via your app and vJoy.. I'm using it as rudder..
Unfortunately today I bought Battle for Stalingrad.. And that game doesn't recognize the vJoy.. It recognizes my pedals as... pedals... And it is so annoying, because i can't play this game without rudder..

So, I see your option "axis to axis", and I'm thinking "Hmmm.. I could map my UCR merge into another physical joystick that I have.. So that pedals goes vJoy, and vJoy goes physical again.. But I see only "axis to virtual axis" in your app, not "axis to physical axis".. Would this be easy to implement?
User avatar
evilC
Posts: 4822
Joined: 27 Feb 2014, 12:30

Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017

28 Oct 2017, 06:55

I could map my UCR merge into another physical joystick that I have
That is maybe your problem right there. UCR does not map *to* a physical joystick.
It does not alter how a game sees your physical joysticks in any way.
Use WhiteKnight to hide your physical sticks from the game, and use UCR to create virtual sticks that the game takes input from.
keem85
Posts: 25
Joined: 03 Aug 2016, 03:14

Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017

28 Oct 2017, 07:56

I tried the app, but my game still sees the physical controller even though I hid it. Service is running.. Strange
When I reconnect my joystick, it spams me with the config page.. non stop. Tried to whitelist UCR, but it can't recognize my controller.. The game sees the physical controller.
User avatar
evilC
Posts: 4822
Joined: 27 Feb 2014, 12:30

Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017

29 Oct 2017, 18:57

For all those waiting on proper DualShock 4 support (Touchpad, Gyros etc) in UCR, today I managed to rip the guts out of DS4Windows to create DS4WindowsApi
I doubt this will mean proper DS4 support in the AHK version of UCR, but I have already added it to the C# rewrite of UCR.

Return to “Gaming Scripts (v1)”

Who is online

Users browsing this forum: No registered users and 26 guests