Git Product home page Git Product logo

openvr2key's Introduction

OpenVR2Key

Simulate key presses on your Windows desktop from SteamVR input, download the latest release here.

Applicatioun window

How does it work?

It uses the SteamVR input system to listen to VR controller input and maps that to keyboard input that it then simulates.

The application comes with ear tagged key actions, 1-16 for left and right respectively and 1-8 for chords, these are mapped against whatever you configure inside this application.

Key configurations can be automatically loaded for the running title, but the SteamVR input bindings stay the same regardless.

To get the application to launch with SteamVR, have the application and SteamVR running, go into the SteamVR settings > Startup / Shutdown > Choose Startup Overlay Apps, and toggle OpenVR2Key to On.

How do I use it?

Steam Library

To get OpenVR2Key to show up in the list of applications with bindings, you need to add it to your Steam library as an external application and flag it as a VR application.

  1. In the Steam client, in the bottom left corner, click: ADD A GAME then Add a Non-Steam Game...
  2. Click Browse... and locate the executable on your machine, then click ADD SELECTED PROGRAMS
  3. Search for OpenVR2Key in your Steam library, in the list, right click it and choose Properties...
  4. In the properties window check Include in VR Library and then close the window. That should be it!

SteamVR Input

Clip - To get started, we begin in SteamVR, open the Settings from the hamburger menu in the SteamVR status window, then navigate to...

Settings > Controller Options > Manage Controller Bindings

Here locate OPENVR2KEY in the drop down, then switch the Active Controller Binding to CUSTOM and click EDIT THIS BINDING. This will open the Controller Binding interface.

Controller Binding

Clip - The application currently only comes with Index controller bindings, because that is what I use and have tested with. It should in theory work with any controllers that are recognized by the input system.

When editing the default bindings you'll see that most inputs have a button option added to it, even if the click and touch events are not registered to anything. This is to have the inputs show up in the chord interface which otherwise would be empty.

To bind a key, simply click any of the available events and pick a key. Alternatively, and what should be most useful, click the Add Chords button in the center and add a chord. These are button combinations that will be harder to trigger by mistake.

Key Mapping

Clip - Inside the application there's not much to do really. The main interface is the list at the bottom, where we do the actual key mapping.

The row label to the left denotes which action this maps to in SteamVR, it can be benefitial to have both interfaces open at the same time if you have a lot of keys bound.

On the row you want to configure, click the big button to start registering keys, now press the keys you want to be in the mapping. As long as you don't let all keys go you can add more without holding down all the previous ones, it will restart the current registration if you press any key after letting go of all them. To finish the registration click the row again. That's it!

Example of keys being triggered

Notes

I've tried to add support for as many keys as possible, report anything you feel is missing as I have to match codes from input to output, they are not the same.

Keep in mind that the key presses act just as if you typed on your keyboard, what will happen depends on where the application focus is. The base use for this was to either control things in the current game or to trigger global hotkeys.

openvr2key's People

Contributors

boll7708 avatar charliehuddleston avatar jeppevinkel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openvr2key's Issues

Active Keys not working

My active keys says unblocked but when I click a button on my quest 2 controller nothing happens.

Doesn't work with Virtual Desktop

Doesn't work with Virtual Desktop, when the application is opened in Steam, the configuration is simply deactivated or does not work.
(Oculus rift S)

Mouse keys

Hey there, love this tool.
One thing I'd like to have is mouse keys. I usually use mouse 4 for push to talk, so if that would be possible to add that would be nice.

doesnt work

in the active keys it says unblocked and i cant see what button is active when pressing. any solution?

app not working. bug

Whenever i try to open the file/folder it only directs me to code. what do i do?

OpenVR2Key Installation trouble

Hi! I have been trying to install this application but due to some weirdness, things are not operating properly. For example, the file named OpenVR2Key is a "Microsoft Visual Studio Solution" file for me??? (I am not sure but I don't think it is supposed to be that type of file.) And whenever I open Steam VR and try to locate the app through the controller settings it is undetected - The instructions seemed vague on how to install the application properly. Any help is appreciated, thank you!

Open2VRKey

Can someone please help me out .... when I open open2vrkey.exe - it shows all white and I can't see any numbers or letters.
Screenshot 2023-05-29 220611

Crashes on directory creation failure

I installed this program by putting it in my Program Files\OpenVR2Key directory, then ran it as a normal user. When I tried to create a binding, the app crashed. Event viewer shows this:

Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.UnauthorizedAccessException
   at System.IO.__Error.WinIOError(Int32, System.String)
   at System.IO.Directory.InternalCreateDirectory(System.String, System.String, System.Object, Boolean)
   at System.IO.Directory.InternalCreateDirectoryHelper(System.String, Boolean)
   at OpenVR2Key.MainModel.StoreConfig(System.Collections.Generic.Dictionary`2<System.String,System.Windows.Input.Key[]>, System.String)
   at OpenVR2Key.MainModel.RegisterBinding(System.String, System.Collections.Generic.HashSet`1<System.Windows.Input.Key>)
   at OpenVR2Key.MainController.ToggleRegisteringKey(System.String, System.Object, System.Object ByRef)
   at OpenVR2Key.MainWindow.Label_RecordSave_Click(System.Object, System.Windows.Input.MouseButtonEventArgs)
   at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
   at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)
   at System.Windows.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(System.Windows.Input.InputEventArgs)
   at System.Windows.Input.InputProviderSite.ReportInput(System.Windows.Input.InputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr, System.Windows.Input.InputMode, Int32, System.Windows.Input.RawMouseActions, Int32, Int32, Int32)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr, MS.Internal.Interop.WindowMessage, IntPtr, IntPtr, Boolean ByRef)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
   at System.Windows.Application.RunDispatcher(System.Object)
   at System.Windows.Application.RunInternal(System.Windows.Window)
   at OpenVR2Key.App.Main()

I was able to work around the problem by running it as admin, which allowed it to create the directory, but it would be nice if the app didn't crash with no explanation when directory creation fails.

Will not switch configurations for different apps.

I am receiving the following error in the log window. Not sure if the error is the reason for not loading individual app configurations.

The default configuration works great. But it does not switch when I switch apps.

Screenshot 2022-09-13 010048

Support for Vive Controller

I guess this is not implemented or tested right?

When I choose the openvr binding I do not see any KeyX names to choose..

This application is already running.

When I try to open OpenVR it gives me a pop up message that says This application is already running. This makes me unable to map out the bindings. Is there a way to open it so i can map out my keys?

"The action manifest for OpenVR2Key was not found."

Hello Andreas! I recently installed OpenVR2Key on a new computer, and when I tried to access the controller binding via the old binding UI, and I keep on getting this message. Any thoughts on what might be causing this? Any help is greatly appreciated!

actionmanifest

Oculus

Will there ever be a way to use this without steam vr I have tried running the game and steam vr at the same but won’t work

Can bind chest trackers, but not camera trackers

This is an awesome tool, i tried it out yesterday and looks like i can control OBS now using buttons on the tracked camera – neat! There's only one downside: I have to set the tracker to be a Chest tracker, Waist tracker, or some other destination that OpenVR2Key supports. If i set it to be a camera tracker (under "manage trackers")… i can set bindings, but they won't work. So it looks like not all tracker "types" are supported. Can these be added please?

This sounds easily doable to me but skimming the code i didn't find it immediately. Might take another look in a bit and submit a pull request if i can find it, but i bet it can be done quicker by someone who is familiar with the codebase and already has the dev setup setup ^^

Using 58 trying to use launcher

I have a launcher I'm using and when it first loads up - if I'm very fast I can get a couple key presses out of it but then it loads with an error -- GetRunningApplicationid error: InvalidParameter Anything I can do?

Can this have detection for Index Headset? (The singular button on the bottom of the headset - System button).

Was just an additional binding that would be cool to add custom binding for. Is it possible?

'Controllers' > 'Show Old Binding UI' > 'VR Dashboard' > Change Current Controller to 'Index Headset' (or others) > Edit Config...
QuxUpXp

This 'controller' only shows up in VR Dashboard.

Test controller does seem to recognize it though. Controller "%1$s". But any index knuckle when turned on takes priority on 'Test Controller' window.
Untitled

Is there a way to use meta quest 2 controllers?

I have a meta/oculus quest 2 and I was trying to use this for key binding to my soundboard but I cant bind my controller keys to it. Is it just not compatible with my controller or am I doing something wrong?

Error invalid parameter

Every time I open it up it says in the active keys section that it’s Blocked and it says in the log GetRunningAplicationld error: InvalidParameter how do I fix this

Support with oculus pc app

I've tried out this software and it works perfectly as intended, but I would enjoy if you added support with the oculus app instead of it just being exclusive to steamvr.

oculus button not working

when i press the a button on oculus it dosent work but when i press f9
it works but not the button on oculus

DPAD toggle options possible?

Hi, I am not sure if this is not possible at all due to "Hardware" limitation, or the software limitations within the SteamVR Controller Bindings itself, or better said "OpenVR".

Basically what I would like to see is an option for the Joystick, to not only have a simple "DPAD > click" or "DPAD > touch", but also an extra option to do a toggle event/function e.g "DPAD > toggle click", or perhaps you can call it "DPAD TOGGLE BUTTON > click"

See below image what I mean:

image

Why I would want this, basically I am now playing some DCS in VR, the issue right now is that normally you'd have a HOTAS, which comes with many buttons. Now what I first had in mind was to just use the left controller buttons X/Y to map it as a toggle, so they become a "Modifier" key. That way I will have 3 levels of mapping options so to speak. However if I would be able to do exactly this but with the Joystick itself, you'd have even more levels. For instance if you'd press DPAD North, it would toggle "Key right 1", which could be mapped to LeftShift (just as an example). This way with just the DPAD you would have 5 layers already, so a total of 6 layers would be possible. Now if you also included the X/Y buttons, you'd have 8 layers in total. That is a lot, because then you'd have 8*10=80 possible buttons, you'd only have buttons for the right controller, with the exception for the Grip and Trigger on your left. (this is for my controllers specifically, obviously it will differ for other controllers I guess).

Anyway, that was basically my idea, what do you think? Will something like this be possible? If not, would there be some alternative to achieve this, perhaps even in combination with some other extra piece of software.

I probably don't even need the above, but it's just an idea, and might be quite nice. I am probably OK with the X/Y toggle buttons for the time being, but DCS is so complicated, and it's nice to play the game without a HOTAS, because yeah, more immersive, since you click buttons in the cockpit with your hands. It's not great to have to put down the controllers and then switch to the HOTAS.

v57 Broke Oculus bindings for me

when I went to change bindings, it had default controller bindings, and in the bindings windows, there were two copies of the program.
the second one (not linked to by steamvr settings) had the custom bindings. v55 works fine.

WASD movement?

Is there a way to map typical FPS shooter movement keys (WASD) to either Index thumbsticks?

The action manifest for openvr2key was not found

it was working for me now idk what happend and its not. ive used to to play gorilla tag and i got banned it was still working while banned but then i got on today and it wasnt working and when i go into my heaset it says that. and when i press a button it doesnt show up on my pc. im using the quest 2.

active keys not appearing

for some reason when i go onto the steam vr home, the little button where it says active keys on the openvr2key isnt showing the button im pressing down. the active keys section isnt blocked either so i dont kno what to do :/ does anyone know what to do ?

issue

when I run the app it won't work, and current app id just says default and I don't know how to fix it.
Screenshot (97)

Mappings not configurable - "Legacy bindings" show only names of inputs

I'm not sure if your documentation isn't up to date or if something is going wrong locally, but I'm unable to configure the mappings on the SteamVR side in 0.57 and 0.61. The binding menu only shows the bindable actions by the name of what the inputs are on the SteamVR side, i. e. "Left Grip Touch" etc., not with the "L15" etc. names that are required to map them to your application's internal input slots. The binding also explicitly shows up as "Legacy binding" - not sure if that's normal, the binding UI looks different than it does in your video.

For a practical example, this means that I can map what is predefined as L15, which is Left Grip Touch, but I can't bind Left Grip Grab - OpenVR2Key doesn't show any additional keys being pressed when the grab action triggers despite there being haptic feedback. Similarly, I can map pressed keys but not touched or held ones, axes are predefined etc. FWIW, binding and using these actions works as expected, though.

I tried purging everything related to OpenVR2Keys in Steam and downgraded from the latest pre-release to the latest stable with no effect.

It looks like this would be circumventable by manually editing the config files but that's a workaround for a workaround for a workaround for me, so not exactly a great solution.

SteamVr wont open/work

SteamVr keeps on crashing or not responding whenever I open the program. I don't know how to fix this and it is really annoying me ;-;
Please help

No OPENVR2KEY in drop down

Here locate OPENVR2KEY in the drop down, then switch the Active Controller Binding to CUSTOM and click EDIT THIS BINDING. This will open the Controller Binding interface.

I have no such app there. I have the exe added as non steam game, enabled in overlay (addon), but I still can't find it.

image

OpenVR2Key not in Binding Dropdown

Hey,
OpenVR2Key not in the binding dropdown for some reason. The only way I can edit it is in VR if I press "Show more Application". But then it does not work ingame, only in SteamVR Home.

v0.53 Chords will not release properly if order of combined keys are not reversed

Title is a mess but I'm reporting this myself, as it has caused me a lot of problems, I will need to fix this.

Chords don't seem to release properly if I release the involved buttons in the same order I pressed them, instead of the opposite order which luckily is the intuitive way of doing it, which I think is why this issue has been sporadic at best.

Steps to reproduce

  • Binding Chord 1 to Left Stick: Button Click and Right Stick: Button Click
  • Go into the application and click: Right stick, Left stick, and hold, observe C1 in the interface.
  • Now release them in order: Right stick, Left stick, and C1 will persist.
  • Performing this sequence in the reverse order has the same effect.
  • Performing the sequence as: R, L - hold L, R; will finally release the chord.

Notes

When using the Input Debugger in the settings, it can be seen that when flipping the order the input hand assignment also switches. It register CHORD IN on the Right hand but CHORD OUT on the Left hand, and I think this is something that I filter on in later version, as a friend with an old version does not get the same problem.

Fix

Clearly CHORDS specifically should not be filtered on Left/Right as that breaks if it's not the same hand that initiates and ends the chord activation.

Active keys blocked

When I open SteamVR and launch OpenVR2Key from SteamVR, it says "OpenVR status: connected" "Current app ID: default" "Active keys: Blocked" and I don't know why it says default on Current app ID when for other people it's different
image

How do I bind the menu buttons? (Index Controllers)

I'm trying to setup this program, but when I go to the bindings editing menu for SteamVR, it gives me the option to rebind everything except the menu buttons, which are the one thing I actually want to bind into a push to toggle mute for Discord. I looked at the clips on the setup instructions and it shows you can bind the menu button in the first one, but that just isn't happening for me for some reason.

Program receives presses from controllers but can't send presses to game

At first openvr2key wasn't appearing in my dropdown list, but when I did this my problem was solved.

Next I assigned keys to actions like this:
Screenshot_8

Whenver I press these keys on my controller, they are pressed on my keyboard and typed (as intended, with Active Keys displaying the correct values):
Screenshot_9

However, whenever I press these keys on my keyboard 'Active keys' says: None and the keys are not pressed on my controllers (in game).

I tested this on multiple games. In the demonstration video I saw that there was the same issue and the solution was to select a different 'openvr2key' application. I only have the one that I added and can't find any sort of fix for this. All help would be appreciated!

Key signal auto repeat

Hi!
Is there a way to set the signal on auto repeat when holding a key (like on a normal keyboard)?
The issue doesn't seem to come from my controllers as it works in video games

Using OpenVR2Key in Steamvr Dashboard

is it possible to use openvr2key with dashboard open --

it seems to work very well when dashboard is not actively open in all games.

but when looking at the desktop in dashboard it does not seem to register button/key presses.

is this a hard limit or a configuration issue on my end.

and thanks for this great piece of software.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.