OverviewUIKeyBinding lets you make specific key events, such as hitting '1' act as if you were pressing on the object that the key binding was attached to (such as a spell button on your hot bar).
It can also be used to select an
input field in order to start typing (think hitting 'Enter' to start chatting).
Have you ever wished that you could easily open up the player's inventory by pressing the "I" button without having to write code? Well, you can! Just add a Key Binding script to it, and the
Key Code to be "I".
How about casting a spell from the hot bar by pressing '1', '2', '3', and so on? Add Key Binding scripts to those buttons as well with the appropriate Key Code keys.
How about activating the chat window's input when pressing 'Enter'? Add a Key Binding script to your chat window's input, set the
Key Code to be
Return and the
Action to be
Select.
You can customize this further by setting a
Modifier key option in case you wanted something like
CTRL+1 activating an ability on the secondary hot bar.
Pro-TipPlace key binding scripts on all of your hot bar and menu items. This way you will be activate them by both clicking on them as well as using the hot keys. Even the Main Menu can be brought up by triggering the Escape key binding in the same fashion.
Class Documentationhttp://tasharen.com/ngui/docs/class_u_i_key_binding.htmlIf you have a question regarding this component or would like me to clarify something, just post a reply here.