Jump to content
The simFlight Network Forums

Recommended Posts

Hi, I was wondering whether this was possible:

 

Basically I wanted to know if I could assign my mouse yoke (X-axis) to control the rudder (and hence the steering) whilst holding down/pressing a specific key, much like the "space-bar" mouse look option.

 

The reason being is that whilst the "auto-rudder" option does this to some extent, when taking off and travelling at speeds above 100 knots, the plane starts to bank when trying to keep it centre on the runway, because the inputs still go to the ailerons.

 

I wanted to ask this here because I hope your FSUIPC module can offer this funtionality that obviously FSX alone cannot.  

 

Thanks

Link to post
Share on other sites
Basically I wanted to know if I could assign my mouse yoke (X-axis) to control the rudder (and hence the steering) whilst holding down/pressing a specific key, much like the "space-bar" mouse look option.

 

I'm afraid there are no general "axis" type assignments available for the mouse, only the specific facilities of mouse look, mouse move and mouse trim already pre-programmed.  Whilst a more generic assignment might be useful, the applications for such have, so far, been very very rarely requested. So much so yours is the first, really, in all these years.

 

I would not want to add such a facility as a normal option. The most I would probably consider would be added Lua plug-in functions to allow mouse events such as left/right/up/down and wheel and button actions. Certainly with such you could program it as you wished.

 

However, whilst this would cerainly be a possibility, it is not a trivial job and I can't consider it for a few weeks, with too many other things occupying me. However, i will add the idea to my list -- but for FSUIPC4 and Wideclient only. I'm not wanting to change FSUIPC3 (for FS9 and earlier) further.

 

Regards

Pete

Link to post
Share on other sites
  • 2 weeks later...
The most I would probably consider would be added Lua plug-in functions to allow mouse events such as left/right/up/down and wheel and button actions. Certainly with such you could program it as you wished.

 

 

Okay, it is done. Version 4.908 of FSUIPC4 includes full support for Lua plug-ins to see mouse events and act upon them.

 

Please download and install 4.908, and also get the latest Lua plug-ins package. You'll find them in the Download Links subforum.

 

The example I've done is especially aimed at your requirement. It is the plug-in called 'mrudder.lua' inside the Examples zip file. Just put that into your FS Modules folder then edit your FSUIPC4.INI file adding:

 

[Auto]

1=Lua mrudder

 

(or a later number if you already have this section with entries).

 

Then load up FS. When everything is up and ready, go into FSUIPC options and assign a button or keypress to "LuaToggle mrudder" in the dropdown. This button or key will switch the whole action on or off. With it off you can use all facilities of the mouse as usual.

 

When it is on, the right mouse button will turn the mouse into a rudder control. It will move the mouse pointer to the current rudder position (left/right position on screen -- centre screen = centred rudder), and movement of the mouse left and right will move the rudder and the mouse pointer to match. The up/own movement isn't relevant.

 

When you release the right button, the mouse pointer will go back to its position before you pressed it.

 

If you look at the mrudder.lua file in a text ditor you will see how it works and can change it to more suit your needs if you like.

 

Have fun!

 

Regards

Pete

Link to post
Share on other sites
  • 2 years later...

Hi Pete.

 

I was trolling around the web looking for something that the OP was asking for, just to try out.  I found this post, and wanted to say thank you for adding the function.

I know it's been a couple of years or so (very close actually), and the OP I think got busy when he got your gift.

Thank you for all that you've done for us through the years.

Link to post
Share on other sites
  • 2 months later...

Okay, it is done. Version 4.908 of FSUIPC4 includes full support for Lua plug-ins to see mouse events and act upon them.

 

Please download and install 4.908, and also get the latest Lua plug-ins package. You'll find them in the Download Links subforum.

 

The example I've done is especially aimed at your requirement. It is the plug-in called 'mrudder.lua' inside the Examples zip file. Just put that into your FS Modules folder then edit your FSUIPC4.INI file adding:

 

[Auto]

1=Lua mrudder

 

(or a later number if you already have this section with entries).

 

Then load up FS. When everything is up and ready, go into FSUIPC options and assign a button or keypress to "LuaToggle mrudder" in the dropdown. This button or key will switch the whole action on or off. With it off you can use all facilities of the mouse as usual.

 

When it is on, the right mouse button will turn the mouse into a rudder control. It will move the mouse pointer to the current rudder position (left/right position on screen -- centre screen = centred rudder), and movement of the mouse left and right will move the rudder and the mouse pointer to match. The up/own movement isn't relevant.

 

When you release the right button, the mouse pointer will go back to its position before you pressed it.

 

If you look at the mrudder.lua file in a text ditor you will see how it works and can change it to more suit your needs if you like.

 

Have fun!

 

Regards

Pete

 

 

Hi Pete.

 

I was trolling around the web looking for something that the OP was asking for, just to try out.  I found this post, and wanted to say thank you for adding the function.

I know it's been a couple of years or so (very close actually), and the OP I think got busy when he got your gift.

Thank you for all that you've done for us through the years.

 

Dear Pete

 

Thanks for adding this functionality. Im sorry this has been almost 2 years late. I had actually found a neat program that can make your keyboard into a joystick. This allowed me to use the left and right arrow keys as an "axis" that auto-centered if I released the keys. Therefore I got caught on this and never checked my original post. I appreciate your work however to implementing this. 

 

Ironically that "neat program" is no longer compatible with Win 10 and P3D v3, and unfortunately that brings me back to square one. This is probably the first time I've been back to this support thread!

 

Thanks

Link to post
Share on other sites
  • 2 years later...

My FSUIPC5.ini looks like:

 

[Auto]
1=Lua mrudder
[LuaFiles]
1=mrudder
[Keys]
1=82,8,L1:R,0 	-{R: Press=Lua mrudder }-

and here the FSUIPC5.log:

 

117500 === DLLStop called ...
   117500 === Closing external processes we started ...
   118500 === About to kill any Lua plug-ins still running ...
   118640 Lua threads being terminated:
   118640       0 = "C:\P3D\Modules\mrudder.lua"
   118797 LUA: "C:\P3D\Modules\mrudder.lua": killed
   118797 === Closing global Lua thread
   119812 === About to kill my timers ...
   120015 === Restoring window procs ...
   120015 === Unloading libraries ...
   120015 === stopping other threads ...
   120015 === ... Button scanning ...
   120109 === ... Axis scanning ...

Hope this helps!

Link to post
Share on other sites
45 minutes ago, Andreas Gücklhorn said:

Unfortunately, the LUA script was killed:

But it was killed in the normal process of closing down the Sim, as clearly shown in the Log! All threads started by FSUIPC must be closed to allow P3D to close down tidily! If you want the thread to continue running, then so must FSUIPC and P3D!

Pete

 

 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.