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

Acid Bubbles

Invaluable member
Developer
Featured Contributor
Messages
1,362
Reactions
5,418
Points
173
Website
github.com
Twitter
acidbubblesanon
Patreon
acidbubbles
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! ❤
 
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
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
 
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