Jump to content

Common Plugin keyboard shortcut management API


Recommended Posts

There so many editor-related plugins that are our favorites, yet many of them use keyboard shortcuts, so many that for some of us users there may be a conflict among one or more plugins that use same keys (i did not yet expirienced this).

So what i suggest is to add API that plugins can use to register their user interaction functions

with the game itself with desired shortcut. If key is already mapped by other plugin and approved by user (to RESOLVE, not avoid mapping collisions on each game start or scene load), then API would map this to another free key. If there are no free keys or user has set in preferences that it he/she will manually approve all keys, it will stay unbound.

Any unresolved key mappings will be presented in single GUI to streamline handling of multiple unresolved shortcut mappings. A simple clickable warning icon with current layout ID (single digit) in corner should be sufficient (present in editors, the main scenes with mapping issues) to call a mapping editor GUI. Warning icon is useful if any functions are left unmapped for a given editor scene (VAB or SPH). Warning icon should also alert user if there are mappings for same plugin in different layouts. Left click opens a mapping GUI, right click changes layouts indexed from 0 to 9. Also, user should be able to "mute" a warning for each mapping (should be a rare event but better to have it).

If all keys are exhausted, then a new shortcut layout/group is formed, and all keys are "free" for binding again. During review process, user can move/edit/swap/delete keys between functions as well between layouts.

Plugin would need to :

1. have API interface defined / declared (obviously)

2. send a mapping request with its string as function name along with a desired shortcut

3. optionally receive back from API a an actual key mapping with layout or "unresolved" tag, good for plugin developer to account for such conditions

4. user would optionally review all mappings in a list

Mapping GUI should present all requests with at least a "PluginName.Function" string to help proper identification. Double-requests (ie ones that have matching "PluginName.Function" string) would be treated as overwrite of previous shortcut binding request.

Also, the GUI should have a list with filters :

- all bindings (normal view)

- newly requested bindings

- unresolved bindings

- user string-based (for "PluginName" filtering)

- multiple requests for same "PluginName.Function" string (overwrites)

- misc warnings (ie everything else related to this binding system)

Sooo Squad, is this worth considering ? I was not sure to post it in addons forum or here in base game forum. This is doable as plugin as well, either way it needs to be addressed sooner or later, because we are near the "war of the shortcuts".

Link to comment
Share on other sites

the toolbar handles gui interfaces. its nice and all, will force mods to use a more standard interface rather than the hodgepodge of methods already used. however thats not what the op asked for.

what op wants is a standard controls interface to access keyboard keys and joystick axes/buttons that lets you map mod functions in the same way the stock game has its control bindings configurable to the user. a good example is that gatling gun mod. to bind the controls for that mod, you have to edit a cfg file. it would be so much easier if a "fire gun" button mapping appeared in the games control mapping screen while that mod is installed. this allows the player to bind that control to a button in game. you could do this in a gui window, but now you have one interface for the games controls, and another for a mods controls, and other mods might implement their own ways to do the same thing. this of course leads to confusion.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...