Flightsim.to
    MouseYoke for MSFS - Fly using your mouse in Microsoft Flight Simulator 2020! - Image 2

    Description

    MouseYoke for MSFS (github)

    This is a small script written in Python that lets you fly with your mouse in Microsoft Flight Simulator 2020. (Why is this not implemented in the game yet?).

    How does it work?

    The script is always listening for the mouse position and it transforms that into an xbox controller input. It also listens for the scroll wheel position, that way, you can use it as a throttle.

    Installation

    You MUST have Python installed on your computer to run the script. You can find Python here.

    Even though the process is relatively straightforward, I made a video showing step-by-step how to install the script. Have a look at it here! 

    But if you prefer to read...
    1. To run the script, just open the file run.bat. The first time you open the file, it will take 1-2 minutes because it will install some dependencies that are necessary for it to run properly. After the first time, it will open almost instantly.
    2. Set the bindings in the game. When you're doing so, make sure to remove ALL bindings that are set by default for xbox controllers, and leave only the axes that you need (which are only three). #Refer to picture 2.
    3. Clear all the "filters" that the game adds to the xbox controller under the sensitivity tab. Leave it as raw as you can. #Refer to picture 3.

    Done!

    You can modify the "master_key" key inside config.json to turn on or off the script. Currently, it doesn't support key combinations such as shift+s.

    // config.json
    
    {
      "master_key": ",",
      "throttle_sensitivity": 20
    }

    You will also find "throttle_sensitivity". It lets you set how many steps your throttle will have. The default value is 20, so each step would equal 5% of thrust.

    Note: This script doesn't require any external software, like vJoy or Virtual Controller.

     


    Future updates:

    - Making an in-game tool (widget) is currently being analized. 

     

    If you enjoy the stuff that I do and you want this mod to be updated over time, you can always buy me a coffee! Donate on PayPal     Buy me a coffee

     

    Happy flying!

    Comments(24)

    Log in to join the discussion

    Log In
    A

    over 1 year ago

    it says python not found when i installed it
    j

    over 1 year ago

    BATCH file init
    Trying to update pip...
    Trying to install dependencies...
    Running mouse_yoke.py...
    a

    over 1 year ago

    Doesn't seem to work anymore. I installed everything and run the script, activate it with "," and it says "active" - but it doesn't register mouse movements and can't calibrate it. Have seen comments on youtube instruction videos saying the same thing...
    k

    almost 2 years ago

    hey, when i run the bat file it get close in 1 sec everytime when I run that bat file need help this is log is showing
    BATCH file init
    Trying to update pip...
    Requirement already satisfied: pip in c:\users\vatsa\appdata\local\programs\python\python312\lib\site-packages (24.2)
    Trying to install dependencies...
    Requirement already satisfied: pynput==1.7.6 in c:\users\vatsa\appdata\local\programs\python\python312\lib\site-packages (from -r ./requirements.txt (line 1)) (1.7.6)
    Requirement already satisfied: vgamepad==0.0.6 in c:\users\vatsa\appdata\local\programs\python\python312\lib\site-packages (from -r ./requirements.txt (line 2)) (0.0.6)
    Requirement already satisfied: pyautogui==0.9.53 in c:\users\vatsa\appdata\local\programs\python\python312\lib\site-packages (from -r ./requirements.txt (line 3)) (0.9.53)
    Requirement already satisfied: reprint==0.6.0 in c:\users\vatsa\appdata\local\programs\python\python312\lib\site-packages (from -r ./requirements.txt (line 4)) (0.6.0)
    Requirement already satisfied: six in c:\users\vatsa\appdata\local\programs\python\python312\lib\site-packages (from pynput==1.7.6->-r ./requirements.txt (line 1)) (1.16.0)
    Requirement already satisfied: pymsgbox in c:\users\vatsa\appdata\local\programs\python\python312\lib\site-packages (from pyautogui==0.9.53->-r ./requirements.txt (line 3)) (1.0.9)
    Requirement already satisfied: PyTweening>=1.0.1 in c:\users\vatsa\appdata\local\programs\python\python312\lib\site-packages (from pyautogui==0.9.53->-r ./requirements.txt (line 3)) (1.2.0)
    Requirement already satisfied: pyscreeze>=0.1.21 in c:\users\vatsa\appdata\local\programs\python\python312\lib\site-packages (from pyautogui==0.9.53->-r ./requirements.txt (line 3)) (1.0.1)
    Requirement already satisfied: pygetwindow>=0.0.5 in c:\users\vatsa\appdata\local\programs\python\python312\lib\site-packages (from pyautogui==0.9.53->-r ./requirements.txt (line 3)) (0.0.9)
    Requirement already satisfied: mouseinfo in c:\users\vatsa\appdata\local\programs\python\python312\lib\site-packages (from pyautogui==0.9.53->-r ./requirements.txt (line 3)) (0.1.3)
    Requirement already satisfied: backports.shutil-get-terminal-size in c:\users\vatsa\appdata\local\programs\python\python312\lib\site-packages (from reprint==0.6.0->-r ./requirements.txt (line 4)) (1.0.0)
    Requirement already satisfied: colorama in c:\users\vatsa\appdata\local\programs\python\python312\lib\site-packages (from reprint==0.6.0->-r ./requirements.txt (line 4)) (0.4.6)
    Requirement already satisfied: pyrect in c:\users\vatsa\appdata\local\programs\python\python312\lib\site-packages (from pygetwindow>=0.0.5->pyautogui==0.9.53->-r ./requirements.txt (line 3)) (0.2.0)
    Requirement already satisfied: pyperclip in c:\users\vatsa\appdata\local\programs\python\python312\lib\site-packages (from mouseinfo->pyautogui==0.9.53->-r ./requirements.txt (line 3)) (1.9.0)
    Running mouse_yoke.py...
    P

    almost 2 years ago

    simple and reliable, however i would add a better interface to the commands, as well as give the ability to switch between rudder and yoke controls y pressing some other key or holding onto the set key...
    I

    about 2 years ago

    Hello there, and thank you very much for this addon. But, I have a problem. I did everything explained in the video but mouse yoke works only if i select it over the Microsoft Flight Simulator. For example, in control options it won't recognize it unless I AltTab to run.bat. And when I enter back in the game, it just doesnt work. Any solution for that? Thanks
    A

    over 2 years ago

    THanks for making this! Im broke and dont have money for a flightstick, and this has saved me.
    My only problem is that the throttle also pans the world map and it doesnt reset back to 50. Maybe change the throttle axis to the former rudder control?
    I'm currently looking for some other options. If the ingame one comes out i will more than likely switch back :)
    C

    over 2 years ago

    Hi there. I have set everything and it's works as intended, but now i only have one problem and others have it too for sure. If you run the game [it's doesn't matter if it's full screen or windowed] the scripts goes in background and you can't use the bindings of the scripts you have to put the game in background for it to work, how can i fix this? Or for now the only method is to play the game in background and the script in foreground? Thanks! :)
    G

    over 2 years ago

    Error: mouse_yoke.py is not reachable. Is it in the same path as run.bat?
    A

    over 2 years ago

    is it solved?
    D

    over 2 years ago

    Once I activate the joke, I can no longer deactivate it, so i cant even use it as i cant configure it
    b

    over 2 years ago

    it crashed
    L

    over 2 years ago

    It's possible to make feature like in bettermouseyoke in x-plane to switch beetwen aileron, elevator control and rudder control?
    P

    almost 3 years ago

    you forgot to tell us how to enable the script 3:27
    k

    almost 3 years ago

    hello i just want to ask how to activate the mouseyoke plss
    m

    almost 3 years ago

    Hi, the default key is the comma (,). You can change this by opening the config.json file.
    Z

    almost 3 years ago

    Hello, I have been getting a problem with the script, will help me lot if you please provide me with the solution. So the problem is that I am not able to use the script in the background. The command box has to be in the msfs window and doesn't work in the background. It doesn't listen to the keys and mouse once the window is minimized.

    M

    about 3 years ago

    Hi

    It helps me a lot as disabled who cannot use a joystick. I basically use your script 1h a day since 3 months :) Thanks a lot


    But I m having trouble flying level whenever I resume after any "script pause" (virtual cockpit buttons mouse use, using the GTN750, LittleNavMap, FSRealistic, VAC charts...). When I resume the script it sends a new value input, different to the one it had few seconds before (when I pressed the key for pausing).


    Can you please try to work around it ?

    Getting a second key to reset to zero the axis ?


    My html/css knowledge is light to tackle it efficiently, and I m not sure I m ready to try chat gpt on that either ;D


    Thank you again

    Me

    m

    about 3 years ago

    Hi Mistral33, thank you so much for leaving a comment and for your feedback! It's super heartwarming to hear the use case you have :)


    Let me tell you that I am currently working on releasing a new, more polished version of the mod with cleaner code, a nice UI, and various additions based on user feedback. However, the development is progressing slowly due to other commitments I have to attend to.


    As it is for now: I edited the mod by adding a way to reset the axes to zero, and also now the mouse cursor remembers its last position. Remember to edit the config.json file and assign a hotkey for centering them.


    Hope you find it useful :)


    Best,

    Matias

    p

    over 3 years ago

    Hi Would it be possible to use the mouse as collective yoke axis for helicopters ?

    MSFS 2020MSFS 2024

    MouseYoke for MSFS - Fly using your mouse in Microsoft Flight Simulator 2020!

    Fly using your mouse in Microsoft Flight Simulator 2020 with MouseYoke - a Python script that transforms mouse movements into xbox controller inputs. Easily install the script and set up your bindings for a unique flying experience. No external software required, just install Python and start flying with your mouse!

    Downloads6K
    Version0.4b
    File Size3.17 KB
    Published3 years ago
    Updated2 years ago

    User Reviews

    4.0

    6 reviews

    5
    50%
    4
    33%
    3
    0%
    2
    0%
    1
    17%

    More Information

    Simulator
    MSFS2020
    CategoryUtilities
    Sub-CategoryApplications

    Version History

    - Implemented a way to center all positional axes (x, y) by a hotkey. - Now the last position that the yoke had is remembered. This option can be enabled/disabled in config.json. - Bug fix: previously, any space in the folder structure would make the mod to fail. That bug is now solved.