BOLL7708 / OpenVR2Key

Simulates key presses from SteamVR input
133 stars 16 forks source link

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

Closed Mindawga closed 2 years ago

Mindawga commented 2 years ago

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!

BOLL7708 commented 2 years ago

I'm not sure if I understand exactly what is going on 🤔

  1. The application will not list active keys when pressed on the keyboard, it will list active inputs from the VR controller that can be set to trigger a virtual key.
  2. The application registers global hotkeys, so it can simulate keys for any application that has focus, only one application can register a specific global hotkey though so if you rely on multiple applications to trigger the same hotkey it will conflict.
  3. I'm not sure what issue you describe and in which video, are you talking about the clips linked in the readme?
Mindawga commented 2 years ago

I'm not sure if I understand exactly what is going on 🤔

  1. The application will not list active keys when pressed on the keyboard, it will list active inputs from the VR controller that can be set to trigger a virtual key.
  2. The application registers global hotkeys, so it can simulate keys for any application that has focus, only one application can register a specific global hotkey though so if you rely on multiple applications to trigger the same hotkey it will conflict.
  3. I'm not sure what issue you describe and in which video, are you talking about the clips linked in the readme?
  1. The application lists controller inputs from real controllers, however, it does not list imputs from keyboard to virtual controller. You are correct.
  2. I don't believe I am using multiple applications. It's just the game, a few drivers for controllers and steam vr. Nothing else.
  3. I am referring to this video, which I used as a tutorial: link
BOLL7708 commented 2 years ago

Ah, in that video I got one of the issues that is now well known in the community by now. If SteamVR is running for long enough, 1-2 hours for me, one of the backend components will stop working. This component handles loading of controller bindings, UI element sin the dashboard, the whole bindings interface, the web console. The only fix I know of so far is to simply restart SteamVR.

That video was a live stream where I tried to have it work for the purpose I made it for, but SteamVR screwed me over 😅

Mindawga commented 2 years ago

That's not the issue though. I used that issue as an example to illustrate my issue. A component fails to send inputs from keyboard to controller, but I don't think it has anything to do with the bindings themselves. The bindings seem to work. It has to be a problem with the element that sends inputs from keyboard. Whenever I click the keyboard keys nothing is registered on VR, I tried restarting, reinstalling and changing settings of things, but there doesn't seem to be any meaningful solution. I have a pretty bare bones config and I don't believe that another component or application is interfering. I also don't get any errors. I don't know any other way I could try to fix it.

BOLL7708 commented 2 years ago

Without seeing an actual video of what is going on I'm not sure I can help. Your description is confusing me even more, allow me to elaborate.

A component fails to send inputs from keyboard to controller, but I don't think it has anything to do with the bindings themselves. The bindings seem to work. It has to be a problem with the element that sends inputs from keyboard.

This applications simulates pressing keyboard keys from input on your VR controllers. What you describe here makes it sound like you are trying to use a keyboard to simulate VR input, which is the opposite direction, and not supported. The only keyboard input is when registering what keys to simulate in the application.

Whenever I click the keyboard keys nothing is registered on VR, I tried restarting, reinstalling and changing settings of things, but there doesn't seem to be any meaningful solution. I have a pretty bare bones config and I don't believe that another component or application is interfering. I also don't get any errors. I don't know any other way I could try to fix it.

Again, this makes it sound like you are trying to trigger VR input from pressing keys on the keyboard, that is not what this application does.

Mindawga commented 2 years ago

Oh yes. It seems I had a fundamental misunderstanding of what the program does and was complaining about a non-issue. The program was working correctly after all. My mistake and sorry for the trouble.

LonleyViper commented 2 years ago

Yeah but boll......what IF we could simulate VR inputs with a keypress? THATS GENIUS!

Mindawga commented 2 years ago

Yeah but boll......what IF we could simulate VR inputs with a keypress? THATS GENIUS!

That's the kind of program that I was looking for. I think I found one called 'Driver4VR' on steam, but it's a paid only program. Not a free one and I did have problems with it too that I'm yet to troubleshoot.

BOLL7708 commented 2 years ago

If it was easy to do, I would totally make that application too, as my problematic hands would love an auto-fire feature in some games 😅 So far I think it needs driver injection/faking being a controller, unless there is some interface I haven't found. Might be different with OpenXR which I have not explored at all, but that might happen in the future.