Mouse view with POV switch, Linux

YSFlight general discussion & everything in between
Post Reply
Stingx
Veteran
Veteran
Posts: 583
Joined: Tue Dec 04, 2012 4:31 am
Favorite Aircraft: ufo
Has thanked: 2 times
Been thanked: 27 times

Mouse view with POV switch, Linux

Post by Stingx » Wed Jun 10, 2015 7:13 pm

YS is pretty limited when it comes to joystick configurations. When you set your cursor to the X,Y camera movement, it disables the hat switch in F1 view. How I fixed the issue:

Install qjoypad and xautomation and download leanstick.

In qjoypad set the positive and negative axes for the hat switch to the keyboard views (H=Left; K=Right; M=Back; J=Up). Save as a new config, so you don't have to mess with it again.

For leanstick, create a ".leanstick" file in your home directory and paste and edit the following before running the script:

Code: Select all

axis 4 neg press delay 1000 : xte 'mousemove 960 540'

axis 4 pos press delay 1000 : xte 'mousemove 960 540'

axis 5 neg press delay 1000 : xte 'mousemove 960 540'

axis 5 pos press delay 1000 : xte 'mousemove 960 540'
Replace the 960 value with the center value of your horizontal resolution. The same with the 540 value with your vertical resolution. If your stick is different, you may have to edit the axis values to match the switch.
Run leanstick.pl

What you can do now: Use your mouse to look around in the cockpit, use the hat switch to look in any direction, and recenter the view when the switch is released.

Edit: Added "delay 1000". Without it, game fps drops a lot.

Stingx
Veteran
Veteran
Posts: 583
Joined: Tue Dec 04, 2012 4:31 am
Favorite Aircraft: ufo
Has thanked: 2 times
Been thanked: 27 times

Mouse view with POV switch, Linux

Post by Stingx » Fri Jun 26, 2015 8:49 pm

I've found out you can do much more with these little apps. I've worked out auto spoiler, quick trim, quick zoom (really helpful), and salvo/continuous fire. Anyone want how-to's for these?
Last edited by Stingx on Sat Jun 27, 2015 11:52 pm, edited 1 time in total.

User avatar
Swift
Veteran
Veteran
Posts: 807
Joined: Fri Jan 09, 2015 7:51 pm
Favorite Aircraft: Mig-21
Location: The Mün
OS: Windows 10 Home
Has thanked: 90 times
Been thanked: 318 times

Mouse view with POV switch, Linux

Post by Swift » Fri Jun 26, 2015 9:01 pm

that would be nice, but does this mouse view trick work on windows?
Image
if ( MadeBySwift )
{ cheatplane(); }

Stingx
Veteran
Veteran
Posts: 583
Joined: Tue Dec 04, 2012 4:31 am
Favorite Aircraft: ufo
Has thanked: 2 times
Been thanked: 27 times

Mouse view with POV switch, Linux

Post by Stingx » Fri Jun 26, 2015 9:49 pm

Swift wrote:that would be nice, but does this mouse view trick work on windows?
I haven't tested it on windows. You may have to try J2K or JoyToKey. IDK about mouse centering.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests