Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

UJR - Universal Joystick Remapper (Using vJoy)


  • Please log in to reply
130 replies to this topic
docbrown
  • Members
  • 2 posts
  • Last active: Feb 17 2013 01:46 AM
  • Joined: 29 Jan 2013

Thanks for your work evilc, i have been tearing my hair out looking for a way to play Falcon 4 BMS with a joystick that does not have enough buttons. I have read your post on MWO online that "shift" button functionality is on your to do list.

 

This is exactly what I'm waiting for. 

 

Just downloaded UJR but yet to try. I'd like to confirm if joystick hats are recognised? If so, are they detected as buttons? And would it be possible to set up multiple shift buttons in future updates?



evilc
  • Members
  • 340 posts
  • Last active: Oct 27 2015 11:07 PM
  • Joined: 17 Nov 2005
Version 3.2 released, you can now remap the 1st hat switch.
If anyone can supply the code to read extra hat switches via dllcall or something, I will add the extra ones in.


evilc
  • Members
  • 340 posts
  • Last active: Oct 27 2015 11:07 PM
  • Joined: 17 Nov 2005

Thanks for your work evilc, i have been tearing my hair out looking for a way to play Falcon 4 BMS with a joystick that does not have enough buttons. I have read your post on MWO online that "shift" button functionality is on your to do list.

 

This is exactly what I'm waiting for. 

 

Just downloaded UJR but yet to try. I'd like to confirm if joystick hats are recognised? If so, are they detected as buttons? And would it be possible to set up multiple shift buttons in future updates?

 

No switch functionality as of yet.

I broke my arm recently so I added it in because I needed to use an xbox pad in one hand and the dpad is a hat switch - it was slow going coding with only one arm though, so dont expect any more updates for a while.

Only one hat is recognised, this is a limitation of AHK.

 

If you need a switch mode, do it in AHK code - AHK is able to remap the virtual joystick - so do code like:

 

2Joy1:

   if(state == 1){

      send a

   } else {

      send b

   }

   return

 

2Joy2:

   if (state == 0){

      state := 1

      SetScrollLockState, On

   } else {

      state := 0

      SetScrollLockState, Off

   }

   return

 

Just be sure you are remapping the virtual stick, not the real one!

To check, use "manual control" in ujr to press the virtual buttons.

 

Use this test script to find the virtual stick (Change the 1st number):

 

2Joy1::

   soundplay, *16

   return

 

You will hear a sound when button 1 is hit.

 

Good luck!



evilc
  • Members
  • 340 posts
  • Last active: Oct 27 2015 11:07 PM
  • Joined: 17 Nov 2005

Oh, btw that is for a roggle state.

 

For a shift-like state, you would want to use:

 

 

2Joy2:

      state := 1

      return

 

2Joy2 up:

   state := 0

   return

 

but this does not work - the normal remap method does not recognise key up on joystick buttons.

You have to use getkeystate instead, but this is a bit more complicated as it requires a loop to be running constantly.

 

just have a loop checking the state of the shift button, and set a global variable to reflect it's state.



Darkitow
  • Members
  • 3 posts
  • Last active: Oct 19 2013 02:33 PM
  • Joined: 27 Apr 2013

I've got one question. I'm interested on this for the game Phantasy Star Online 2, which has a more or less good gamepad support, but it has many functions that can be accessed much faster by keyboard combinations. Would this be possible with AHK and/or VJoy?

 

To give more information, I want to have certain button combinations dependng on which triggers are being held. Using an XBox style gamepad for clarification, I want to change the functions of the buttons ABXY when I hold the left trigger, when I hold the right one, or when I hold both, for a total of 16 combinations (counting the buttons themselves with no tigger being held). Would there be a way to make it work as I want?



evilc
  • Members
  • 340 posts
  • Last active: Oct 27 2015 11:07 PM
  • Joined: 17 Nov 2005

I've got one question. I'm interested on this for the game Phantasy Star Online 2, which has a more or less good gamepad support, but it has many functions that can be accessed much faster by keyboard combinations. Would this be possible with AHK and/or VJoy?

 

To give more information, I want to have certain button combinations dependng on which triggers are being held. Using an XBox style gamepad for clarification, I want to change the functions of the buttons ABXY when I hold the left trigger, when I hold the right one, or when I hold both, for a total of 16 combinations (counting the buttons themselves with no tigger being held). Would there be a way to make it work as I want?

You would use the technique above - a loop using getkeystate to check status of l and r trigger, then setting the state variable as shown in the post above.

You would not need UJR



Darkitow
  • Members
  • 3 posts
  • Last active: Oct 19 2013 02:33 PM
  • Joined: 27 Apr 2013

Thans for the reply! I'll look into it.



evilc
  • Members
  • 340 posts
  • Last active: Oct 27 2015 11:07 PM
  • Joined: 17 Nov 2005

4.2 is up

 

I cannot edit the OP, so here are the changes:

 

 

4.2
= Duplicate in profiles was always duplicating the Default profile, no matter what you had selected - fixed.
+ Added Delete Profile button
 
4.1
+ Duplicate profile added.
 
4.0
+ Profile support added.
INI file format changed, there are now two INI files - one for misc settings, one for profiles
Existing mappings are kept and moved to the default profile
Manual profile switching only for now...


zvolim
  • Members
  • 1 posts
  • Last active: Jun 14 2013 04:11 PM
  • Joined: 14 Jun 2013

Hi, any idea why only the axis worked when I tried manual control with my game?



evilc
  • Members
  • 340 posts
  • Last active: Oct 27 2015 11:07 PM
  • Joined: 17 Nov 2005

Hi, any idea why only the axis worked when I tried manual control with my game?

When you move your physical stick, does the virtual stick move in the windows control panel?

Do the sliders move in the UJR GUI when you move your physical stick?



Empardopo
  • Members
  • 91 posts
  • Last active: Feb 23 2015 08:48 AM
  • Joined: 26 Jul 2010

I get an error when I try to run this script!

When I try reg the dll, I get this

Error-UJR-02.png

 

When I try run the script, I get

 

Error-UJR.png

 

Any idea, please?

 

 

 

Thanks in advance!



evilc
  • Members
  • 340 posts
  • Last active: Oct 27 2015 11:07 PM
  • Joined: 17 Nov 2005

Neither screenshot shows any more I am afraid.

 

You do not need to register the DLL - just keep the files in the same structure as inside the zip, and run ujr.ahk



twipley
  • Members
  • 11 posts
  • Last active: May 27 2015 09:04 PM
  • Joined: 26 Jan 2011

I've been looking everywhere for such an app. Really useful, in that it works for every controller.

 

The only downside is the current lack of a mask-physical-joystick feature. Other apps need to capture the virtual joystick as a priority! (How could this be done?)

 

EDIT: oh, I think I've pretty much fixed it (under XP) going to control panel ­> game controllers > advanced > preferred device > vjoy device.



Lovelynuance
  • Members
  • 1 posts
  • Last active: Aug 05 2013 02:53 PM
  • Joined: 04 Aug 2013

I can't add more than 8 buttons, when I go through "Configure vJoy" it crashes if I change any settings :(

any ideas?



twipley
  • Members
  • 11 posts
  • Last active: May 27 2015 09:04 PM
  • Joined: 26 Jan 2011

I can't add more than 8 buttons, when I go through "Configure vJoy" it crashes if I change any settings sad.png

any ideas?

Really not sure, but perhaps try:

 

regedit deleting the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\vjoy\Parameters folder

 

be sure these are installed:

 

netframework-2_0: http://download.micr...5a/dotnetfx.exe

vcredist-2008: http://download.micr...credist_x86.exe