I have just started trying to create a simple addon. The addon basically involves on press key events.
What I don't really understand is, how do I get the key assigned for a certain action(ex key for drawing/sheathing weapon which by default is Z).
Another question is how do I initialize on press command, for example if the key that was found(this case Z) is pressed something happens.
For an example: I wanted to try to make the character keep the sword unsheathed as long as you keep pressing Z, and after you stop pressing Z, the character will sheathe the weapon back. This is just a simple exercise so I can understand exactly how this system works.
Could anyone help me understand exactly how this works please?