Jump to content
bull_a

Creating Custom Key bindings

Recommended Posts

Hi all,

I am wanting to add custom keybindings to my mod so that it appears in the Configure -> Controls menu. At the moment, I have created an UserActionGroups class but I now need to find out where the actions are defined. I have checked the obvious places such as CfgActions and CfgMovesMan -> Actions etc. but I am unable to find where they are to be stored.

If anyone knows the answer to this, or has any prior experience or knowledge, please let me know.

Regards,

Bull

Share this post


Link to post
Share on other sites

This is what Sniperwolf572 explained to me as an example:

class UserActionGroups {
class yourClass {
	name = "Project"; // Category name
	group[] = {"User13","User14"}; // Actions that go into this category
};
};

So any of these can be assigned under custom controls:

"User1", "User2", "User3", "User4", "User5", "User6", "User7", "User8", "User9", "User10", "User11", "User12", "User13", "User14", "User15", "User16", "User17", "User18", "User19", "User20"

Share this post


Link to post
Share on other sites

Thanks Das,

I dont want to overwrite the custom user actions, I wanted to be able to create my own set of actions. It is like what both Tao Folding Map and TFAR (to name a few). I have a work around, but its hacky and not very stable

Regards,

Bull

Share this post


Link to post
Share on other sites
Thanks Das,

I dont want to overwrite the custom user actions, I wanted to be able to create my own set of actions. It is like what both Tao Folding Map and TFAR (to name a few). I have a work around, but its hacky and not very stable

Regards,

Bull

Both of those addons use the keybinding interface that CBA introduced, but it has certain limitations due to certain issues with the event handlers. Instructions on how to implement it in your addon/script can be found here.

A native way to bind controls to actions does not exist, and you can express your dissatisfaction with that here.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×