Consider the case of binding a macro top the keyboard. As an example take the predefined comment.lua macro found in the zScript directory. This macro adds a line comment for the current line or for all lines defined by a marked area.
To bind this macro to the F11 key do the following:
- Options, Editor Options menu
- Select the Keyboard Mapping section
- Select the Current Keymap from the list of keyboard mappings
- Hit the Edit button
- Select the Macro Scripts option from the Category drop down list
- Hit the F11 (or any other key combination) key
- Select the comment.lua macro from the List of Functions
- Hit the Assign button
- Hit the Apply button
To test the binding open a file, mark some lines of text and hit the F11 key.
To bind a keyboard function repeat the steps above but at step 5 use the Keyboard Functions category to provide a list of all available keybaord functions.