Search Unity

[Released] cInput 2 - Unitys custom inputmanager got improved !

Discussion in 'Assets and Asset Store' started by Roidz99, Apr 4, 2012.

  1. Chaosgod_Esper

    Chaosgod_Esper

    Joined:
    Oct 25, 2012
    Posts:
    295
    okay...
    i'll try to write my own Name wrapper to show "Enter" instead of "Return" in the GUI (and for all others too)
     
  2. digO

    digO

    Joined:
    Mar 20, 2014
    Posts:
    23
    Im having some problem, im trying to make my character to move when the user click with the mouse right button.
    So i did that in my setup script:
    cInput.SetKey("Player Move Click", Keys.MouseRight);
    And in the character script im doing that:
    if (cInput.GetKeyDown("Player Move Click")) {move character}
    But he is moving even when the right click is not clicked.
    If i use the unity input it works perfect. "if(Input.GetMouseButtonDown(1)){move character}"

    I just bought the asset today, so maybe im doing something wrong, i read all the manual but i couldnt find what im doing wrong. :/
     
  3. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    707
    Try Keys.Mouse1. Keys.MouseRight is not right click. It is the positive value of the mouse X axis. Or in other words, if the mouse is moving right.
     
  4. digO

    digO

    Joined:
    Mar 20, 2014
    Posts:
    23
    Thanks, it worked now.
     
  5. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    707
    Hi folks,

    An update to cInput has been submitted to the Asset Store. If you bought cInput from the Asset Store then the update should be live within a few (business) days. If you bought cInput from our website, then the update is available immediately.

    cInput changes:

    v2.7.8
    • Expanded cross-platform Xbox 360 controller mappings in the Keys class to all buttons/axes. (Thanks Phi)
    • ChangeKey now warns if you try to change an invalid input. (Thanks Foxxis)
    • cGUI will no longer warn about cSkin if cGUI isn't being used. (Thanks Walter)
     
  6. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,620
    Hey, just checking out cInput for the first time.

    It looks like things will be pretty neat after I've got it set up properly. I have a question about the setup script we have to supply, though, where we call Init() then configure all of the keys, axes, etc. It got me thinking... why not make cInput a Singleton rather than a class with a bunch of static stuff, and also make all of this config stuff a chunk of data that it loads?

    Being a Singleton would mean that we don't have to worry about calling Init() up front, because you could easily do that for us the first time we grab a value.

    Having the config stuff as data (in addition to allowing the current code interface) would mean that you could make an editor for it, like a more powerful version of the existing InputManager, and would save us from hand-writing this config code in most cases. (Probably not all cases, which is why you'd want to keep the code option around.)

    Between those two things, cInput would then be a lot more like using Unity's built-in system, only with an extra 'c' when checking values and a more powerful InputManager.

    Even without that, though, I'm pretty sure it's already saved me a few hours. :D
     
  7. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    707
    You actually don't need to call Init(). cInput will handle that for you in most cases. But there are some rare cases where you might want to call Init() first, thus it is there on the chance you need it.

    Using a Singleton is a good idea. However, it may require a lot of fundamental changes to cInput so I can't say when or if that will happen.

    As for using data or having an editor config, @Roidz99 was doing some work on something similar, so it may not be too far away.

    Thanks!
     
    angrypenguin likes this.
  8. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,620
    Sweet. I was thinking of doing the data bit myself and sharing it.

    Under what circumstances do you need or not need to call Init()?
     
  9. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    707
    @angrypenguin:

    I can't remember exactly what the case was, but here's what it boiled down to:

    It sometimes takes a frame for cInput to instantiate itself and set itself up. So if you absolutely need to access some value/reference that won't be there until the next frame, it's best to call Init() first to make sure everything is ready before you try to access it.

    In the ~2.5 years since cInput 2.x has been released, we've only heard from one person who needed to use Init(), as it wasn't originally a public method. (Of course, not hearing from anybody else could be because we exposed Init so anyone who needed it just used it without asking for support about it.)

    The point is that most likely you'd be safe not calling it. But it's also smart enough that if you call Init() multiple times, it will only run it the first time. So it's pretty much safe either way, thus we recommend people call it first just in case.
     
  10. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,620
    Makes sense. My approach has been to make an input init component that runs in Awake, checks if it has been run before, and if not it calls Init and then sets up all the input. I'll then shove this on everything that uses input, or might even roll it into a base class that all of my input consumers derive from.

    To be honest, as long as you have to do the bindings in code anyway it makes little difference whether you have to call Init or not. But a combination of specifying bindings as data along with not needing to set stuff up in code would mean workflow nearly identical to that of the built in system.
     
  11. Ennothan

    Ennothan

    Joined:
    Oct 17, 2013
    Posts:
    51
    Hey there,
    I don't know if this is a bug from Unity itself or cInput, sometimes when I change scene holding a key, it stops recognizing that key is still pressed, getKeyDown and getKey doesn't trigger, even when I release it the getKeyUp doesn't trigger too.
    if I release it and press it again, then there is no problem at all from there, just when another scene is loaded.

    This problem doesn't happen always, sometimes it recognizes, other ones no.
    I don't know what to do to solve this, do you have any idea?
     
  12. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    707
    I guess one way to find out if it is a problem with Unity or with cInput is to test it using the Input class instead of cInput and see if it has the same issues. If you encounter the same issues with the Input class, then you may want to submit a bug report to Unity to see if they want to fix that. If you only encounter it with cInput, then that's something we need to look more into to figure out why it's happening and how to fix it.
     
  13. Ennothan

    Ennothan

    Joined:
    Oct 17, 2013
    Posts:
    51
    The problem is with unity, I reported the bug, hope they fix it because I have no idea on how bypass it.

    Thanks!
     
  14. BuckeyeStudios

    BuckeyeStudios

    Joined:
    Oct 24, 2013
    Posts:
    104
    has anybody made a ngui version this
     
  15. Chaosgod_Esper

    Chaosgod_Esper

    Joined:
    Oct 25, 2012
    Posts:
    295
    i made a ngui input setup window with this
    it's very easy to understand.

    all you need is a grid, and a UIButton as Prefab, that changes its UILabel on Start to the Input Texts.
    So eith NGUITools.AddChild() you add each Button for Keys to the Grid.
    On Button Hit, you call cInputs changing methods to change the Bindings.
     
  16. BuckeyeStudios

    BuckeyeStudios

    Joined:
    Oct 24, 2013
    Posts:
    104
    Nice I'll have to give it a try when I get home thanks for the help
     
  17. BuckeyeStudios

    BuckeyeStudios

    Joined:
    Oct 24, 2013
    Posts:
    104
    i tried the following code just to try to get it to work i have a Grid and 1 button prefab. I got 5 errors can u plz help.
    Thanks
    Code (CSharp):
    1.  
    2. using UnityEngine;
    3. using System.Collections;
    4.  
    5. public class uilistviewscript : MonoBehaviour {
    6.     public GameObject UIButtonInput;
    7.     // Use this for initialization
    8.     void Start () {
    9.         var grid = GetComponent<UIGrid> ();
    10.         var findUILabel = UIButtonInput.GetComponentsInChildren<UILabel> ();
    11.  
    12.         for (int n = 0; n < cInput.length; n++) {
    13.             var addtext = findUILabel.SetValue (NGUIText, (cInput.GetText(n,1)));
    14.             //            test
    15.             NGUITools.AddChild (grid.gameObject, addtext);
    16.         }
    17.        
    18.         grid.Reposition ();
    19.     }
    20.    
    21. }
    22.  
     
  18. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    707
    What errors are you getting?
     
  19. Chaosgod_Esper

    Chaosgod_Esper

    Joined:
    Oct 25, 2012
    Posts:
    295
    first try to put line 10 and 13 AFTER adding the button to the Grid.

    Second, Reposit the Grid only after the Loop, cause the Reposition code is really heavy. One call after the loop is enough ;)

    Last but not Least: Post your Errors from the Console.
     
  20. BuckeyeStudios

    BuckeyeStudios

    Joined:
    Oct 24, 2013
    Posts:
    104
    Added line 10 and 13 after the add child and inserted the public game object into the add child instead of add text it took my errors down to 3 picture of errors is attached
    Thanks for the help
     

    Attached Files:

    Last edited: Dec 21, 2014
  21. BuckeyeStudios

    BuckeyeStudios

    Joined:
    Oct 24, 2013
    Posts:
    104
    Never mind i fixed it so now it can display everything i will post my code also the prefab is a panel with the UIPanel component removed then a label and 2 buttons added to it. If anyone want to help make it functional we can share the code on here.
    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. public class uilistviewscript : MonoBehaviour {
    5.     public GameObject myGrid;
    6.     public GameObject myCellPrefab;
    7.  
    8.     // Use this for initialization
    9.     void Start () {
    10.  
    11.  
    12.         for (int n = 0; n < cInput.length; n++){
    13.             string key_name = cInput.GetText(n, 0);
    14.             string key_one = cInput.GetText(n, 1);
    15.             string key_two = cInput.GetText(n, 2);
    16.  
    17.             GameObject item = NGUITools.AddChild(myGrid, myCellPrefab);
    18.             item.name = key_name;
    19.             item.GetComponentInChildren<UILabel>().text = key_name;
    20.  
    21.             myGrid.transform.FindChild(key_name).GetChild(1).GetComponentInChildren<UILabel>().text = key_one;
    22.             myGrid.transform.FindChild(key_name).GetChild(2).GetComponentInChildren<UILabel>().text = key_two;
    23.        
    24.         }
    25.         myGrid.GetComponent<UIGrid>().Reposition();
    26.  
    27.         }
    28.        
    29.        
    30.     }
     

    Attached Files:

    • ss1.png
      ss1.png
      File size:
      60.6 KB
      Views:
      801
    • ss2.png
      ss2.png
      File size:
      77.1 KB
      Views:
      822
  22. Roidz99

    Roidz99

    Joined:
    Jul 8, 2010
    Posts:
    198
    Hey guys,

    I just wanted to let everyone know we've updated our cInput4UFPS package to fix the EXIT/ESCAPE bug.
    This is only important to people who use UFPS and like to use the bridge to implement cInput a bit faster/easier.

    It can take a few days for the asset store to accept our submission, if anyone needs the fix asap please contact us through the support email or use the support form on our website.

    Here's the link to the UFPS bridge: https://www.assetstore.unity3d.com/en/#!/content/25471
     
  23. BuckeyeStudios

    BuckeyeStudios

    Joined:
    Oct 24, 2013
    Posts:
    104
  24. Rtyper

    Rtyper

    Joined:
    Aug 7, 2010
    Posts:
    452
    Nice product - I'm in the middle of integrating it into my project and it seems to be going well so far! One question though, I couldn't find any reference in your docs to preserving rebound keys/axes when the game is closed. Am I right in assuming that cInput.SetKey sets up the key for the buttons specified, and I'll need to program some reading/writing to playerprefs to save key bindings?

    That makes sense to me, I just wanted to check that there wasn't some built in functionality for that first!
     
  25. Chaosgod_Esper

    Chaosgod_Esper

    Joined:
    Oct 25, 2012
    Posts:
    295
    the cInput module does all PlayerPrefa for you by itself!
     
  26. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    707
    As Chaosgod_Espér said, saving the customized controls is such an integral part of cInput that we never even considered having to mention it in the docs or anything. It's all taken care of for you. (c:
     
  27. Rtyper

    Rtyper

    Joined:
    Aug 7, 2010
    Posts:
    452
    Oh brilliant! I bought it just for the ability to rebind keys, It's even better than I expected then xD
     
  28. dumbfire

    dumbfire

    Joined:
    Dec 11, 2013
    Posts:
    3
    I really like cInput for handling input. I am finding a need for some kind of inputManager to handle inputs from various devices and apply those inputs only to certain actors in a scene (multi-player). Are there any existing packages that have this functionality and work with cInput available for purchase?

    I realize I could build this myself but I would rather use a trusted set of tested code if it exists.

    Thanks!
     
  29. devandart

    devandart

    Joined:
    Jun 7, 2013
    Posts:
    144
  30. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    707
    @dumbfire Sorry for not responding sooner, I somehow missed your post until now. I'm not aware of any existing packages on the Asset Store that do what you're asking.

    @devandart That looks pretty slick! Thanks.
     
    devandart likes this.
  31. Zelek

    Zelek

    Joined:
    Jun 12, 2010
    Posts:
    87
    I'm trying to use cInput in a 4.6 GUI, but nothing happens when I call cInput.ChangeKey() as a result of a button press. Any chance we could get a demo scene using a 4.6 GUI to change key bindings?

    Edit: Looks like this was because of the way that I was creating buttons in code and assigning OnClick listeners at runtime. I reworked my button creation code and now it's interacting with cInput correctly.
     
    Last edited: Jan 21, 2015
  32. EdGrooverGames

    EdGrooverGames

    Joined:
    Jan 23, 2015
    Posts:
    4
    Is there a way to cancel scanning from script after calling cInput.ChangeKey()? I have set up a GUI button that I want to mimic what happens when you press the Escape key, but I can't figure out any way to do it. I tried calling ChangeKey() again with values to manually set the keybinds back to what they started as, but that didn't work. cInput continues to scan after the second call to ChangeKey()...
     
  33. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    707
    @Zelek: I'm glad to hear you got it working. We haven't yet done a 4.6 GUI with cInput because we don't want to require people to upgrade to 4.6 to download cInput. Some folks are still using older version of Unity for compatibility (I think Xbox/Playstation builds require 4.3). But we will make a 4.6 GUI soon-ish.

    @EdGrooverGames: Right now there is no way to cancel scanning from code. The reason why calling ChangeKey twice doesn't stop scanning is because the ChangeKey function where you set the keys manually via code don't set the scanning variable to false (since normally it wouldn't have been set to true in the first place).

    If you have cInput Pro (and therefore can edit the source) you can fix this quickly by editing line 49 of cInput.cs as so:

    Code (csharp):
    1. // change this:
    2. //public static bool scanning { get { return _scanning; } } // scanning is read-only
    3. // to this:
    4. public static bool scanning { get { return _scanning; } set { _scanning = value; } }
    And that will allow you to use cInput.scanning = false to cancel scanning. Or I suppose you could just make the private variable "_scanning" public and set that directly. If you don't have access to the source code, please email us your order number if purchased on the Asset Store or email address if purchased from itch.io and I can get a DLL build for you with this change.
     
  34. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,620
    Hey there... is this still the case?
     
  35. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    707
    Yes.

    1. & 2. cInput comes with a built-in GUI menu (pre-4.6 GUI). This way you can quickly prototype/work on your game with the included menu. And it also exposes the proper functions and information needed to customize/create your own UI so that it matches the style and theme of your game.

    3. cInput only allows primary and secondary buttons/joysticks per "action" similar to how the Unity Input Manager only allows the main and alt controls per action. See Replies #90 & #91 for more deta
     
  36. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    707
    I don't recognize anything from those screen shots, and the error message isn't giving any details about cInput. From what I can tell, something, somewhere, is still trying to access the Input Manager even though it should be trying to use cInput instead. This leads me to believe that this problem is most likely related to the PlayMaker plugin.

    Though, it raises another question: When you say you bought the "playmaker plugin" do you mean you bought PlayMaker? Or do you mean that you bought PlayMaker Actions for cInput? One way or another you're going to need actions to get cInput to work with PlayMaker. I'm assuming that you bought the PlayMaker Actions for cInput, and if so, I think this is where the issue is. I suggest you contact the creator of that asset for support. According to the Asset Store listing, the following address can be used for support: contact@devandart.de
     
  37. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,620
    I just recently added support for more than two buttons/axes hooked up to the same thing in my game. What I did was:

    1. Create separate actions in my cInput setup script for each of my controller types. So I'd have "KBConfirm" and "JSConfirm", for instance, each with a primary and secondary input binding.

    2. Create a static class cInputHelper. This has arrays of associated input actions, such as an array allConfirmInputs which contained "KBConfirm" and "JSConfirm".

    3. Added a static method to that class "AnyConfirmInputDown()", which iterates over the allConfirmInputs and asks cInput if they're down, returning true the first time it finds one or false if it finds none.

    I also added methods that get the biggest input from a set of axes. For instance, I'd do steps 1 and 2 above for all horizontal and vertical inputs, then have a LargestHorizontalInput and LargestVerticalInput method. (Remember you want to check for size based on the absolute value with Mathf.Abs() or similar, but return the unchanged value.)
     
  38. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    707
    Good thinking. That's another valid way to get around the 2 inputs limit. (c:

    How are you trying to use the EventSystem? Directly, with the UI? Or via PlayMaker and its actions?
     
  39. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    707
    It looks like you're trying to do something like cInput.GetKey("9") when you haven't defined a "9" key using SetKey(). Same with 8 and 0.

    But I can't tell for sure without seeing some of your code and/or the full error message(s).

    The PlayMaker actions probably aren't set up to use cInput instead of the Input Manager. You should talk to whoever made the PlayMaker Actions for cInput that you're using and ask them if they will make actions that use cInput instead of the Input Manager when dealing with UGUI stuff. We haven't made any PlayMaker Actions for cInput, so we can't provide support for them.
     
  40. yvesgrolet

    yvesgrolet

    Joined:
    Jan 22, 2014
    Posts:
    10
    It looks like you have a little bug: XBox Dpad axis on windows is 7, not 8.
     
  41. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    707
    You're right. Thanks! Looks like it was a copy/paste error on my part. We'll get that fixed in the next update.
     
    Last edited: Feb 7, 2015
  42. Petethegoat

    Petethegoat

    Joined:
    Jun 12, 2013
    Posts:
    39
    I have an issue with modifier keys. I have the latest asset store version of cInput Pro.
    The issue is that despite calling SetKey() with a modifier defined (that has been added correctly, as far as I know), the key still works without the modifier key held. Holding the modifier makes no difference to it's function in this case.

    I've tried using a different key for the modifier, and I've tried calling Clear() and Init() before setting up my own keys, but neither made any difference.

    Here is my test code:
    Code (CSharp):
    1. using UnityEngine;
    2.  
    3. public class Player : MonoBehaviour
    4. {
    5.     void Start()
    6.     {
    7.         cInput.AddModifier(Keys.LeftAlt);
    8.         cInput.SetKey("Left", Keys.ArrowLeft, Keys.None, Keys.LeftAlt, Keys.None);
    9.         cInput.SetKey("Right", Keys.ArrowRight, Keys.None, Keys.LeftAlt, Keys.None);
    10.         cInput.SetAxis("Horizontal", "Left", "Right");
    11.     }
    12.  
    13.     void Update()
    14.     {
    15.         transform.Translate(Vector3.right * cInput.GetAxis("Horizontal"));
    16.     }
    17. }
    Any help would be much appreciated!
     
  43. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    707
    Modifier Keys don't work with Axes. I see that this isn't mentioned in our documentation (which I'll correct), but this is working as intended.

    If you get the value of cInput.GetKey("Left") without using the modifier key, it should return false no matter if the left arrow key is pressed or not. But if you use "Left" in an axis, the axis won't care if the modifier key is pressed or not.
     
    Petethegoat likes this.
  44. Sindiewen

    Sindiewen

    Joined:
    Nov 3, 2012
    Posts:
    2
    Hello, I have quite an interesting issue regarding cInput 2 purchased off the website. I'm using both Unity 4.6.2f1 and Unity 5 RC1 (64bit) for this.

    My project works fine before importing cInput, but after importing, replacing inputmanager.asset, I try to compile just any script and mono opens up the cInput.cs class and gives me the "Default parameter specifiers are not permitted" to 13 lines in that class.

    I'm at a loss right now and I can't figure this out. I tried forcing target framework to 4.0 and it breaks my code, tried unchecking "build project in Monodevelop" and I can't run the game because errors. If I remove the cInput assets it all works fine.

    Any help would be appreciated! Thank you.
     
  45. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    707
    This issue is caused by MonoDevelop sometimes getting the project settings wrong.

    Instructions on how to fix this can be found here:

    http://answers.unity3d.com/questions/176305/default-parameter-specifiers-are-not-permitted.html

    This may also help (found from the above link):

    http://forum.unity3d.com/threads/monodevelop-problems-with-default-parameters.67867/#post-898994
     
  46. Sindiewen

    Sindiewen

    Joined:
    Nov 3, 2012
    Posts:
    2
    Hey Deozaan! Thank you for the help. I truly appreciate it!

    I decided to switch to VS 2013 from Mono and suddenly it all works wonders right now! Got a couple key bindings working with the Unity 4.6 GUI tools in a test project and they work flawlessly! Such an amazing toolset that's really easy to get working.

    Now to incorporate them into my main project. And again, thank you so much!
     
  47. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    707
    Hi folks,

    An update to cInput has been submitted to the Asset Store. If you bought cInput from the Asset Store then the update should be live within a few (business) days. If you bought cInput from our website, then the update is available immediately.

    cInput changes:

    v2.8.0
    • Fixed Xbox 360 DPad up/down axis on Windows in Keys class. (Thanks yvesgrolet)
    • Updates to documentation.
    • Updates to demo scene for compatibility with Unity 5.

    v2.7.9
    • Added public setter for scanning variable. (Thanks Ed)
    • Increased the limit on inputs from 99 to 250. (Thanks Chris)
    • Fixed cGUI being transparent when cGui.bgColor isn't set properly.
     
  48. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    I've just bought cInput 2 from the asset store, and in trying to follow step one of the directions (using the "Replace Input Manager.asset File", I got the following error in the console:

    IOException: Failed to Copy File / Directory from 'Assets/cMonkeys/cInput/Editor/cInput.dat' to '/Users/jstrout/Dropbox/Strout-and-Sons/Projects/HighFrontier/HighFrontier/ProjectSettings/InputManager.asset'.
    UnityEditor.FileUtil.ReplaceFile (System.String src, System.String dst)
    cInputSetup.ReplaceInputManagerAssetFile () (at Assets/AssetStore/cInput/Editor/cInputSetup.cs:24)

    Looks ominous to me. Any ideas?

    EDIT: I figured it out (by actually paying attention to the error!). The script is assuming I've left the cInput folder in the default location, but I move all my third-party assets into a subfolder to keep the top level of my project neat. So, it simply couldn't find the cInput.dat file where it expected. I manually copied and renamed this as the error indicates it was trying to do, and everything works great now.
     
    Last edited: Feb 24, 2015
  49. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    707
    I'm glad you got it figured out. :)
     
  50. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    OK, now I do appear to be stuck.

    I need to handle mouse drags. I previously used code like Input.GetAxis("Mouse Horizontal"). How do I convert this to cInput?

    Of course not having such an axis defined doesn't work. But neither does this:
    Code (CSharp):
    1.         hMouseHor = cInput.SetAxis("Mouse Drag (Horizontal)", "Mouse Left", "Mouse Right");
    ...because it causes the error "Can't define Axis named: Mouse Drag (Horizontal). Please define 'Mouse Left' with SetKey() first."

    But I don't want to define 'Mouse Left' with SetKey(); it's not a key, it's leftward motion of the mouse. The manual lists 'Mouse Left' among the various mouse inputs (along with Right, Up, and Down), but doesn't provide any examples or explanation of how to use them that I can find.