• Hi Guest!

    We are extremely excited to announce the release of our first Beta1.1 and the first release of our Public AddonKit!
    To participate in the Beta, a subscription to the Entertainer or Creator Tier is required. For access to the Public AddonKit you must be a Creator tier member. Once subscribed, download instructions can be found here.

    Click here for information and guides regarding the VaM2 beta. Join our Discord server for more announcements and community discussion about VaM2.
  • Hi Guest!

    VaM2 Resource Categories have now been added to the Hub! For information on posting VaM2 resources and details about VaM2 related changes to our Community Forums, please see our official announcement here.

Completed (1.20.1.6)Ability to disable or override built-in shortcuts (quick win)

Acid Bubbles

Invaluable member
Developer
Featured Contributor
Joined
May 11, 2020
Messages
1,406
Solutions
10
Reactions
5,906
I'm currently writing a pretty powerful plugin for advanced keyboard shortcuts, but I have a small issue that should be fairly easy to solve in VaM. There's a lot of keys that are "hardcoded" in VaM, and therefore there's no way for me to "overwrite" them. That means arrow keys, F1, Tab and the letters W, S, A, D, M, F, R, E, P, N, U, T ,H and C are unavailable for key bindings. That's quite a lot, and greatly reduces the interest of having custom shortcuts. Also, VaM ignores the LeftControl key during ProcessKeyBindings, which means I cannot make shortcuts for those even with Alt or Ctrl (e.g. CTRL+S works but also moves the camera backwards ?‍♂️ )

As a quick workaround, could there be a bool in SuperController.singleton like enableKeyboardShortcuts that I could set to false? I could then proceed with re-creating those myself in my own shortcuts plugin.

The plugin would allow for advanced use cases like assigning shortcuts to actions for the currently selected atom's plugins, and having scene-specific shortcuts as well as global shortcuts.

A better option would be to have a setting for each key (kind of a built-in key binding in VaM) that I could disable per-shortcut, but just a single bool (that would behave like LookInputModule.singleton.inputFieldActive) would reduce the time investment for you.

Thank you for your consideration! ❤
 
Yeah let me throw this in for next release.
 
I have added some booleans to disable ProcessKeyBindings and ProcessKeyboardFreeNavigation. I have also fixed a bunch of the internal functions/fields/properties to be public so you can completely replicate what VaM does internally after disabling the bindings.

Attached is the sample plugin that simply replaces the internals with exact replica of what it does now. This plugin will work with the next release.
 

Attachments

  • CustomKeyBindingsSample.cs
    4.5 KB · Views: 0
Thanks, that will greatly increase the usefulness of what I'm working on, and potentially allow for other control schemes eventually! Have a great day!
 
Will there be a precompiler directive for this version? This will let me show a helpful message if installing the plugin on older versions:

The plugin is gonna be great I think :D You'll probably be interested in it yourself to quickly navigate vam using fuzzy commands search (check the screenshot's bottom right corner).

1607871996999.png
 
Yeah I'll add a specific VAM_GT_ define for this.

Looks cool what you have going there!
 
Quick question, will this also allow disabling the VR controller buttons, to customize them? I'm specifically thinking about using the x/y buttons on Oculus controllers (and whatever they are named in Steam) to bind them to other commands since they do the same things as their right counterpart.

My use case personally is to open the fuzzy find in VR, using the on-screen keyboard is faster than finding the action I'm looking in many case.

Another use case was to bind the thumbsticks to e.g. Timeline scrubber while X is being held down.

The original ask came from here: https://hub.virtamate.com/threads/ability-to-remove-atoms-in-select-menu.4474/post-11117
 
Back
Top Bottom