Page 1 of 1

Binding a Macro to the Keyboard

Posted: Fri Sep 03, 2004 4:57 am
by jussij
The Zeus keyboard can be re-configured to run either the built-in keyboard functions or user defined macro scripts.

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:
  1. Options, Editor Options menu
  2. Select the Keyboard Mapping section
  3. Select the Current Keymap from the list of keyboard mappings
  4. Hit the Edit button
  5. Select the Macro Scripts option from the Category drop down list
  6. Hit the F11 (or any other key combination) key
  7. Select the comment.lua macro from the List of Functions
  8. Hit the Assign button
  9. Hit the Apply button
The F11 key is now bound to the comment.lua macro.

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.