/mouse2joystick_custom_CEMU

An AutoHotkey Script to allow the use of Mouse and Keyboard control in CEMU. This uses vJoy and provides several additional features over regular keyboard control, like: the ability to control the camera with the mouse, toggle walking speed, in BotW use MouseWheel to change weapons, a separate Toggle key for ZL useful for locking onto a target in BotW.

Primary LanguageAutoHotkey

Not Being Maintained

Script last updated on May 20, 2020.

Version 0.4.1.4

  • Added ability to map the mouse wheel to keys in the keylist helper
    • Wheel keys can't be used to hold down buttons, since wheels don't send an UP keystroke like all the other keys.
  • Added a Save button to the settings, so you can save and apply your settings without closing the window. This should make it easier to tweak and play with settings while testing.
  • Added ability to adjust the walking speed, no longer set to 50%. Keybinds work on the fly as you are moving.
    • You can change the speed by setting and pressing the + and - keybinds
  • I believe I have finally fixed the controller profiles for the Wii U Pro Controller for both vJoy and vXbox.

 

Older Changes:

  • Completely re-wrote settings code
    • Allows me to more easily manage adding and/or changing the settings for the script
  • Added ability to save keylists, in pretty much the exact way CEMU lets you manage Controller Profiles
  • From this version on 64bit is required, this shouldn't' be an issue since CEMU already has that requirement.
  • Updated included ScpVBus, as the version I had was outdated, and probably 32bit.

I highly recommend deleting your settings.ini file when upgrading to this version. Things have moved, and one section changed names ever so slightly. The way this works shouldn't cause any actual issues, but still the file will be cleaner if you: make note your settings -> delete the file -> re-input your changes.

 

[Updated Video - April 5, 2018] BSoD Gaming made a video that shows how to set this up. It is incomplete, but for the most part it shows the initial process very well. It doesn't get into details about anything, and while it recommends using the alternate mouse movement detection be aware that this is still experimental and already implemented slightly different from the version used in the video. Also, changing your mouse sensitivity will only really have an effect with this experimental mode, not really on the normal mode. Along the same lines, the sensitivity he has in the settings are invalid (negative values make no sense with how it is implemented and might even cause issues), but again since he is using the alternate method they have zero effect on the program.


Initial Setup (Updated to include vXBox images)


  1. Install the latest vJoy
  2. Run the vJoy Configuration (Not necessary if you only plan on using vXBox)
    • Set it up so it has at least 18 Buttons, I set mine to 32.
  3. Download controller profiles for CEMU > 1.9.0      (Also included in GitHub release zip)
  4. Then open CEMU and goto the input settings

 

  • For vJoy devices -- The input setup should look like this

  • For vXBox devices -- The input setup should look like this

    • Note: feel free to manually remap the blow mic and showscreen buttons here, as the vXBox controller doesn't have enough buttons for them to be included.

If it doesn't look like this, you are going to have a problem


Using the Script and changing the key mapping


  1. Visit the GitHub release page and download the latest release (0.4.1.4 currently)
  2. Launch the script:
    • Double click the .ahk file if you have AutoHotKey installed.
    • Run the exe if you don't.
  3. IF you don't want to customize anything you are ready to use the Script.
    • Press F1 to toggle the controller ( CEMU and Script must be running )

Mapping your keys

  • Open the script settings by right clicking on the controller icon in your system tray (Bottom Right) and choose 'settings'
  • Goto the Mouse2Joystick->Keys page:
    • You can set the KeyList here
      • This is a comma separated list of AHK valid keys in order of vJoy Buttons
        • The first key is mapped to Button 0 and so on.
      • Manually setting the list has an advantage in that you can add more than one key to the same button (New as of 0.2.0.3)
        • This is accomplished by adding the keys together using the | symbol.
          • i.e. you'll notice Xbutton1|e, is what I have set for A -- allowing Mouse4 and e to both work.
      • I recommend setting up the keys with the Helper as below, then adding in any desired secondary keys manually.
    • KeyList Helper
      • This is an interface that closely matches CEMU input layout, which will make it easy to create your KeyList.
      • You just need to click each box and then press the key you would like to use
        • Can be mouse buttons
      • AutoCycle will go through each key one by one allowing you to quickly set the keys
      • When you click save you will see the KeyList string update itself with any changes you've made.
        • If you'd like to add secondary keys now is a great time to do it.

Note: you can still keep KeyList strings for different games saved to a text file locally, and just paste it in (like it used to have to be done)


Other Settings Overview

  • Open the script settings by right clicking on the controller icon in your system tray (Bottom Right) and choose 'settings'
    • On the General page:
      • Input Destination
        • If you changed the name of your cemu executable enter it here
      • Activate Executable
        • Choose to have the script automatically activate cemu when controller is toggled on
      • vJoy Device
        • Choose which vJoy device to control, if you have more than one set up.
    • On the General->Setup page:
      • Sensitivity
        • Controls how far the mouse needs to move to tilt the stick
        • Lower values are more sensitive, I recommend 30-100
      • Non-Linear Sensitivity
        • Lower values cause the sensitivity to be raised near the center
      • Deadzone
        • Can be set very close to 0, I recommend setting to the smallest possible value where your camera doesn't wander.
      • Mouse Check Frequency
        • This is how often the mouse position is checked and reset back to the center.
    • On the General->Hotkeys page:
      • Quit Application
        • A Master Hotkey to quit out of the script immediately
      • Toggle the controller on/off
        • Set the key to choose the Toggle for the controller (Default F1)
    • On the Mouse2Joystick->Axes page:
      • Invert Axis, is self explanatory
        • Apparently I initally mapped my y-axis as inverted, so 'Yes' here means 'No' (Sorry)
    • On the Mouse2Joystick->Keys page:
      • This is the Most important page as it is where you change your assigned keys
        • Covered in more detail above
    • On the KeyboardMovement->Keys page:
      • Keyboard Movement
        • Set your movement keys here.
      • Extra Keyboard Keys
        • Set your Toggle Walk, ZL Lock, Gyro keys here
    • On the Extra Settings page:
      • Enable BotW MouseWheel Weapon Change Feature
        • Choose yes if you would like to be able to use the mouse wheel to change weapons in BotW
          • Should be off for all other games obviously
      • Enable ZL Lock Key Feature
        • Also for BotW, will allow you use a separate key to toggle ZL On, until pressed again.
          • Pressing the regularily assigned ZL key will always toggle from current state
      • Cursor
        • Choose if you would like cursor hidden
          • Sometimes useful for troubleshooting to make it visible again.

Script Downloads


GitHub Releases will be the best place to find the latest version of the script

Alternate Direct Download


Extra Reminders


  • Changing your keys within CEMU isn't recommended as it is tedious and finicky. The script allows you to easily change which key is assigned to which vJoy button. Then the button assignment in CEMU doesn't matter at all as long as each key has something.

  • Note that the in-game camera settings affect the camera speed the most, so try changing there if camera speed is your only issue.

  • If you run CEMU as an admin, then you need to run the script as an admin as well.


Please feel free to comment here for help, or send me a PM.

 

 

Instructions for rpcs3 (or any non CEMU XInput use):

  • Install the latest version of vJoy
  • Run the downloaded program (or AutoHotkey script if you download the source)
  • Open the program settings by on the controller icon in your system tray (Bottom Right) and choose 'settings'
  • Choose to use vXBox. AND Choose "No" under the "Activate Executable" Section - Press "Ok" to reload the script with the option enabled.
  • If the first time, a prompt will come up asking to install ScpVBus, Press Yes, then on the security prompt to run DevCon Press Yes again.
  • The script will reload and connect a virtual XBox controller, drivers may be installed automatically on Windows10, or you will need them pre-installed on Windows7.
  • To remap your keys Open the settings and goto the "Mouse2Joystick -> Keys" section.
  • Press the KeyList Helper Button
  • You can map your keys on this screen, read the ReadMe for how to add a second key to the same button
  • Set your movement keys on the "KeyboardMovement -> Keys" settings screen. (Clear the Toggle ZL Lock and Toggle Gyro keys by clicking them and pressing Backspace - they aren't needed in rpcs3)
  • In rpcs3, set your controller to use XInput
  • When you want to use the controller Press "F1" (default but customizable) to toggle using the virtual Controller.

That should be it, your mouse should now control the Right Analog stick, and your movement keys the Left.

I will be honest I have not done this myself, I have just helped someone else do it and they said it works perfectly just needed a quick guide on how to set it up for this.