Will we get the ability to change keybindings on the Oculus Touch — Oculus
New to the forums? Click here to read the "How To" Guide.

Developer? Click here to go to the Developer Forums.

Will we get the ability to change keybindings on the Oculus Touch

SamaDuuneSamaDuune Posts: 6
NerveGear
edited January 2017 in General
TL;DR: I'm just wondering if a future patch/update for the Rift will have menu options to allow us to map the Touch buttons to keys on the keyboard.


This is actually a feature that I was hoping would be a default part of the Touch setup when it was released.  Did a lot of searching before they came out and couldn't find anything on it at all.  But got them anyway, and I do really like them, for the games that are made for them anyway.  I dislike so far that if a game isn't designed to work for them they don't function at all, this is a large negative for me. I know the Xbox controller has 12 buttons and 2 analog sticks, and the Touch only has 8 buttons and 2 analog sticks.  But there are plenty of games that don't use all 12 buttons and just don't need the tracking part at all.  I'll use The Vanishing of Ethan Carter as an example.  It's a VR game that uses only like 2-3 buttons and 1 analog stick on the Xbox controller. Could easily have the same inputs on just your right hand Touch controller.  I know the game developer could make it work that way if they wanted to as well, but why limit it to only the game developer.

There are tons of games out there that would work just fine in VR if we were just able to map button X with any keyboard button. I find the Touch controllers to be more comfortable than the Xbox controller (I'm actually not a fan of any console's controller really, but the Touch is nice.  Having my hands to the sides rather than directly in front of me is quite comfortable).  The Logitech Game Controllers/Keyboard application for remapping keys on their products is a great example of a starting point to do this in my opinion.  Something very similar could be made in the Rift to do this exact thing.

I have done searches to see if other have asked this question as well, and I do find a few (not nearly as many as I thought though) asking on various sites about this same type of functionality.  The main roadblock being that the Touch doesn't show up in Windows as a Game Controller since it connects to the Rift itself and not to the PC.  I'm sure there are advantages to this method.  If it was a Game Controller this would have been an available feature on day one. I'm hoping that if this isn't a planned function or feature of the Touch that at some point someone who is better with programming and DLL's and what not than I am makes an app to do this.  I'd gladly pay a few dollars for this type of functionality. Of course, if it was built into the Rift system itself I'm sure it would be a lot more stable and easier to distribute.
Tagged:

Comments

  • TwoHedWlfTwoHedWlf Posts: 2,234 Valuable Player
    That would be up to the developers of each app, I would think.
  • SamaDuuneSamaDuune Posts: 6
    NerveGear
    TwoHedWlf said:
    That would be up to the developers of each app, I would think.
    I know that each developer could allow for button configurations in the game itself, though so far I haven't personally seen any that do yet.  I'm just saying why limit it to only the developer.  If being able to change the button keybinding as part of the device it becomes a much more powerful tool.
  • nalex66nalex66 Posts: 4,530 Volunteer Moderator
    edited January 2017
    If it could be globally remapped, then there would be a never-ending flood of Support requests complaining that the controls don't work in (x) game.

    A global option to emulate the gamepad might work, as long as a game doesn't require the D-pad (most Rift games seem to duplicate input between the D-pad and the left thumbstick, so this wouldn't be an issue for any Rift games that I can think of).
    i7 5820K @ 4.25 GHz | EVGA GTX 1080 SC | Gigabyte GA-X99-UD4 | Corsair DDR4 3000 32 GB | Corsair HX 750W
    Corsair Hydro H100i | Samsung SSDs: 860 Evo 1 TB, 850 Evo 1 TB, 840 Evo 1 TB | Seagate BarraCuda HDD 3 TB
  • kojackkojack Posts: 5,294 Volunteer Moderator
    I've just been playing around a little. I've made a C dll that wraps around the oculus sdk and provides access to the state of the touch controllers (not tracking, just buttons/triggers/sticks). I'm then calling it from AutoHotKey, a program that can use scripts to inject keyboard/mouse events.

    So far I've got my touch controllers controlling the windows mouse cursor using the left thumb stick, left click with the left index trigger and the abxy buttons sending key events ("ABXY"). Not too bad for a little hack.

    It's not doing up/down events yet, so holding touch A is like rapidly hitting keyboard A instead of holding it. I do have up/down working for mouse, just not buttons yet.

    Hehe, autohotkey is quite powerful. I just made it control the windows volume using the right touch thumbstick x axis. :)

    Sadly while autohotkey can read joystick events, it can't send them. But I've got an idea for that I'll look at later tonight.

    (Note: all this is without even touching (no pun intended) the hmd. My cv1 is just sitting on the desk)
    (Note 2: this probably wouldn't work with a VR game, since I need to open a hmd to get access to touch state, and it might not like two apps doing vr at once. I haven't tried yet)

  • kojackkojack Posts: 5,294 Volunteer Moderator
    Now I've got the oculus remote controlling Spotify. :)
  • SamaDuuneSamaDuune Posts: 6
    NerveGear
    Interestingly this weekend I just found out that VorpX released an update that does this exact thing.  I haven't opened VorpX in about a week, week and a half maybe, and when I opened it, it started to run an updated.  And last night when I opened it up to run around in Skyrim SE for a little while BOOM I have touch controllers while in game now and the buttons are key mapped to whatever I want them to be on the keyboard.  

    On the note of AutoHotKey, that is the 2nd half of what I wanted.  If I could get the Touch buttons to be key mapped to a keystroke on the keyboard, I could then redo that keystroke with AutoHotKey to do pretty much whatever I want it to do.  

    After seeing that update I right away went it to several other games (Skyrim, Doom, WoW, hell even X-com 2, and a few others) just to see what they keymapping was like in them.  Taking a bit of getting used to (Don't recommend X-com in VR, meh) but the other games were really fun using the Touch as a normal controller while in those games. And because VorpX has game profiles each game can have its own keymap without changing it every time.  Bit of extra setup time the 1st time you play a game, but fun in the end. 

    On a side note, even though the games themselves don't use the motion tracking of the Touch, the VorpX app still overlays visuals of the Touch controllers into the game if you hold your hands in front of you and it shows you what keys you have mapped to what buttons so if you forgot what is mapped where you can just look at your hands
  • kojackkojack Posts: 5,294 Volunteer Moderator
    SamaDuune said:

    On the note of AutoHotKey, that is the 2nd half of what I wanted.  If I could get the Touch buttons to be key mapped to a keystroke on the keyboard, I could then redo that keystroke with AutoHotKey to do pretty much whatever I want it to do.  

    Here's an example from my current AutoHotkey script. This is the bit that does left mouse button pressing with the left index trigger.
    	t:=DllCall("autotouch\getTrigger","Int",0,"Int",0,"Float")
    if (t>0.8) and (old<0.8)
    Send, {LButton down}
    if (t<0.8) and (old>0.8)
    Send, {LButton up}
    old:=t

    The getTrigger function returns the floating point value of a trigger (index or hand, left or right).
    There's other ones for thumbsticks and buttons (all buttons are returned in an int as bit flags).
    The downside to this method is that it's not event based, it need to poll the touch in a loop. It's not exactly the same as the way you normally specify what happens when a key is pressed. It works fine for a quick hack though.

    I'll do a bit more work on it then release something.

    My second method should work better (and be suited to games), but I'll start on that later today.
  • cyberealitycybereality Posts: 26,156 Oculus Staff
    I love it. 
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i
    Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
  • kojackkojack Posts: 5,294 Volunteer Moderator
    @cybereality Well if you loved that, my next one is on the way.

    I've just been playing Devil May Cry using Touch. No VR, just on a monitor.

    My second project of the day is vJoy Touch  (not ready for release just yet).

    vJoy is a virtual joystick emulator (not by me). It uses feeder programs to inject joystick values which it then applies to virtual direct input devices. To make a joystick driver in 64 bit windows requires driver signing by MS, and that used to cost tens of thousands of dollars. So making custom drivers was out of the reach of indies. But vJoy does the driver part, then anybody can use their sdk to inject data.

    My vJoy Touch program injects Touch values into vJoy. It's a little command line app.

    If you play direct input games, it should work fine. My first test was playing Tumiki Fighters (a side scrolling bullet hell shooter).
    But 90% of games these days ignore direct input and use xinput. These only work with Xbox 360 and Xbox One controllers.
    Luckily another program comes to the rescue: X360CE. It allows you to map a direct input device to a virtual 360 controller. It lets you control the mapping of every button/axis individually, plus add deadzones (which MS don't provide!).

    With vJoy, X360CE and my vJoy Touch, I can play xbox controller games with Touch.

    This won't work with Lucky's Tale, starting any VR app while vJoy Touch is running will shut it down. (Only one app can access the rift at once).

    I'm tired, need sleep. I'll release something later.
    This one needs a lot of work still, I need to add configuration support to specify how Touch controls are mapped to direct input, and I skipped a bunch of error checking code. :)
    But it runs.

    (Some games also suck at input. Dark Souls, Rayman, etc, will refuse to run correctly if they see any usb controllers that isn't a 360/one controller)
  • kojackkojack Posts: 5,294 Volunteer Moderator
    Instead of sleep, I did a little experiment. I now have orientation tracking working too. I currently have the left and right xbox thumbsticks controller by the pitch and yaw of the left and right touch. :)

    When the HMD isn't visible for more than maybe 10 seconds, Touch controllers lose all position tracking, even if the sensors can see them. But their orientation (using the IMUs) always works. They might need a drift correction button, but tracking their rotation isn't hard.

    Although currently this is using my personal vector/quaternion math classes, which I'm not ready to make public. So I need to replace it with GLM or something before release.

  • SamaDuuneSamaDuune Posts: 6
    NerveGear
    Can't wait to try this out, might get some time this weekend to take a look at it :)
  • billyismsbillyisms Posts: 12
    NerveGear
    edited February 2017
    Hey kojack this is very exciting work! I was wondering if you have heard of Universal Control Remapper (UCR).
    https://autohotkey.com/boards/viewtopic.php?f=19&t=12249

    When combined with vJoy, it can create a virtual Xbox 360 controller for Windows. I am just guessing that using UCR instead of X360CE could simplify being able to use the Touch controllers for games which require an Xbox controller.

    UCR uses AHK so people would only need to install vJoy to use your vJoy Touch with a game which requires an Xbox controller.

    edit: I believe people will also need to install a driver called ScpVbus which comes with UCR. This driver allows virtual Xbox 360 controllers to be installed on Windows
  • DibelabbesDibelabbes Posts: 79
    Hiro Protagonist
    Wow, this is awesome. I already have a great usecase for this -> Pinball games like the VR mod for Future Pinball. Playing those with the small XBone controller feels strange (since its not even close to the width of a pinball machine) and a bit uncomfortable while standing.


    EDIT: NOOOOOoooo. There is no way to have both this running and at the same time a VR application, is there? Damn
  • konstantin_lozevkonstantin_lozev Posts: 185
    Hiro Protagonist
    For some reason I cannot use x360ce with Lucky's Tale (while I have no problems with Herobound, Adr1ft, etc).I have the error log here https://drive.google.com/file/d/0B_7L0fiUQpSYU0sxcC1HZGIzNFU/view?usp=sharing

  • konstantin_lozevkonstantin_lozev Posts: 185
    Hiro Protagonist
    I got it working. I uninstalled a wiimote that was still registering, even though it was long disconnected from the bluetooth. And I also copied the .dll and .ini from my other PC that used to run Lucky's Tale in the past. Either of the two must have fixed it, since now can play it no problem.
  • KillCardKillCard Posts: 1,078
    Wintermute
    edited July 2017
    kojack said:
    Ok, time to release something. :)
    Here's Auto Oculus Touch.

    Binary release: https://github.com/rajetic/auto_oculus_touch/releases/download/0.1.1/auto_oculus_touch_v0.1.1.zip
    Source repo: https://github.com/rajetic/auto_oculus_touch

    It requires the 64 bit version of Autohotkey. (Oculus libraries are 64 bit anyway, so not much choice)

    Unzip the archive where ever you want. It contains a dll and an autohotkey script. As long as the dll is in the path or in the directory with the script, they should work anywhere.

    No documentation yet, but the script shows every function in use.

    Hopefully it won't set any hmds on fire. :)

    All buttons and triggers of the touch and remote are supported. No touching touch events (the proximity sensors) yet, but I can add that later.

    The current sample has the following behaviour:
    Right touch stick controls the mouse cursor.
    Right touch index trigger is the left mouse button.
    Left touch X button is also left mouse button. (I put two things on left mouse to show the difference between buttons and triggers)
    Oculus remote up and down cycle media (in spotify, etc).

    I should note: untested in games. I'm just using it on the desktop.
    Also, you don't need to wear the cv1 or have the touch visible to cameras. But you might need to press the A or X buttons to power them up before the thumbsticks work.

    Dude I've just used this, it is amazing!

    Thank you so much for writing this, it allows me to use LiveSplit while speed-running in VR so I can use the Touch Controller to trigger the timer and move to the next segment within a run.

    I don't know how extensive your know-how is, is it possible for you to make the same thing for Vive?

    Even though I'm on Oculus, the speed running community for the game I'm playing is cross compatible and it would be nice to be able to give the same feature to the Vive users in our community as well. If it's beyond your ability, any ideas where such they could get a similar script/functionality? (I realise its a long shot, but I have to ask)

    Either way, excellent script man! You've opened up a lot of doors for VR Speed running with this!
  • Dr-DDr-D Posts: 1
    NerveGear
    kojack said:
    Ok, time to release something. :)
    Here's Auto Oculus Touch.

    Binary release: https://github.com/rajetic/auto_oculus_touch/releases/download/0.1.1/auto_oculus_touch_v0.1.1.zip
    Source repo: https://github.com/rajetic/auto_oculus_touch

    It requires the 64 bit version of Autohotkey. (Oculus libraries are 64 bit anyway, so not much choice)

    Unzip the archive where ever you want. It contains a dll and an autohotkey script. As long as the dll is in the path or in the directory with the script, they should work anywhere.

    No documentation yet, but the script shows every function in use.

    Hopefully it won't set any hmds on fire. :)

    All buttons and triggers of the touch and remote are supported. No touching touch events (the proximity sensors) yet, but I can add that later.

    The current sample has the following behaviour:
    Right touch stick controls the mouse cursor.
    Right touch index trigger is the left mouse button.
    Left touch X button is also left mouse button. (I put two things on left mouse to show the difference between buttons and triggers)
    Oculus remote up and down cycle media (in spotify, etc).

    I should note: untested in games. I'm just using it on the desktop.
    Also, you don't need to wear the cv1 or have the touch visible to cameras. But you might need to press the A or X buttons to power them up before the thumbsticks work.


    Had to sign in to say you're quite possibly my favourite person in the world right now. Was pulling my hair out trying to figure a way to control things like push-to-talk or OBS with the headset and without looking at the desktop. A few beginner's tweaks here and there and I can do it all using the Touch. You're the besht!! Seriously you're the best.
  • GraicGraic Posts: 1
    NerveGear
    kojack said:
    @cybereality Well if you loved that, my next one is on the way.

    I've just been playing Devil May Cry using Touch. No VR, just on a monitor.

    My second project of the day is vJoy Touch  (not ready for release just yet).

    vJoy is a virtual joystick emulator (not by me). It uses feeder programs to inject joystick values which it then applies to virtual direct input devices. To make a joystick driver in 64 bit windows requires driver signing by MS, and that used to cost tens of thousands of dollars. So making custom drivers was out of the reach of indies. But vJoy does the driver part, then anybody can use their sdk to inject data.

    My vJoy Touch program injects Touch values into vJoy. It's a little command line app.

    If you play direct input games, it should work fine. My first test was playing Tumiki Fighters (a side scrolling bullet hell shooter).
    But 90% of games these days ignore direct input and use xinput. These only work with Xbox 360 and Xbox One controllers.
    Luckily another program comes to the rescue: X360CE. It allows you to map a direct input device to a virtual 360 controller. It lets you control the mapping of every button/axis individually, plus add deadzones (which MS don't provide!).

    With vJoy, X360CE and my vJoy Touch, I can play xbox controller games with Touch.

    This won't work with Lucky's Tale, starting any VR app while vJoy Touch is running will shut it down. (Only one app can access the rift at once).

    I'm tired, need sleep. I'll release something later.
    This one needs a lot of work still, I need to add configuration support to specify how Touch controls are mapped to direct input, and I skipped a bunch of error checking code. :)
    But it runs.

    (Some games also suck at input. Dark Souls, Rayman, etc, will refuse to run correctly if they see any usb controllers that isn't a 360/one controller)
    Any progress on this? Sounds like it would work for turning the touch controllers into a xbox controller.
  • Laz4rusLaz4rus Posts: 4
    NerveGear
    Just commenting here so I get notified when kojack drops more awesomeness upon the world.  I'm personally looking forward to the touch events :)
  • TheBaymonsterTheBaymonster Posts: 3
    NerveGear
    Hate to revive a dead post, but is there anyway someone could provide a super quick tutorial of sorts on this? I play flight sims and am trying to remap the touch controller's "X" button to the "shift" key on my keyboard, and the "Y" button to the "F", but am a bit lost. It seems simple enough, but autohotkey is apparently the only way to keymap touch controls. 
Sign In or Register to comment.