Using Keyboard Accelerators

IDL supports the use of keyboard accelerators or shortcuts in both the IDL Workbench and in IDL widget applications. For information on IDL Workbench keyboard shortcuts, see Accelerate Code Development in the Editor. Keyboard shortcuts can also be defined for individual buttons and menu items in an IDL widget application. Defining shortcut key combinations is the responsibility of the IDL programmer who creates the widget application; if you are using a widget application and are unsure about whether keyboard shortcuts have been defined, contact the author of the widget application. For information on adding keyboard accelerators to your own widget applications, see Enhancing Widget Application Usability (User Interface Programming).

Enabling Alt Key Accelerators on Macintosh

If you are using IDL on a Macintosh and wish to use keyboard accelerators that use the Alt key, you will need to perform the following steps to make the Apple (Command) key to function as the Alt key:

  1. Create a .Xmodmap file in your home folder and add the following three lines to it:
  2. clear mod1 
    clear mod2 
    add mod1 = Meta_L 
     

    When Apple's X11 program starts, this file will automatically be read, and the Apple key will be mapped to the left meta key meta_maceti.gif, which for IDL's purposes is the Alt key. (Windows Alt key accelerators are mapped to the Macintosh Apple key, not the Option (alt) key.)

  3. Run Apple's X11 program and change its preferences. Under Input in the X11 Preferences dialog, make sure that the following two items are unchecked:
    • Follow system keyboard layout
    • Enable key equivalents under X11
    • Note
      You must relaunch Apple's X11 program for these changes to take effect.

Once you have performed these steps, keyboard shortcuts will operate in the normal Macintosh fashion — namely, pressing the Apple key in conjunction with X, C, and V will perform cut, copy and paste. The IDL Workbench's other shortcuts and any widget accelerators defined to use the Alt key will also work.