Topic:
How to setup Hot Keys in IESX 10.X.
Description:
Solution:
MENU ACCELERATOR DEFINITIONS A menu accelerator is "a key stroke or a key sequence when performed in a task window would result in emulating selection of a pre-defined menu button". How does it work ? ------------------ Example : If you define an accelerator "Metad" and associate it with menu button "Display", then any time you press key 'd' along with 'Meta' key it would be equivalent to selecting "Display" button from the menu bar. On Sun workstations, the Meta key is located next to the space bar with a diamond printed on it. On SGI, the key labeled "Alt" is used as the Meta key. How to define to accelerators ? ------------------------------ Accelerators are defined in your .Xdefaults file using the following format. IESX*???_MENUBAR*menu_button_text*accelerator: modifier k where; 1.) "???_MENUBAR" is one of the following SM_MENUBAR Session Manager menubar SI_MENUBAR Section Interpretation menubar DM_MENUBAR Data Manager menubar BM_MENUBAR Basemap menubar APX_MENUBAR Autopicker menubar The abbreviations (SM, SI, DM, etc.) used above can be found in the first field of the facilities description in the IESX_FAC_FILE. e.g. The line describing Section Interpretation facility appears in IESX_FAC_FILE as: 13\SI section interpretation facility\messages:si\ 2.) "menu_button_text" is the exact duplication of the text as it appears in the menu button. e.g. Accelerator definition for "Zoom" button in SI menubar would look like this : IESX*SI_MENUBAR*Zoom*accelerator: modifier k 3.) "modifier" is an optional field that defines modifiers such as Meta, Shift, Control, etc. e.g. Above accelerator for Zoom button could be defined as : IESX*SI_MENUBAR*Zoom*accelerator: z -- uses key z or IESX*SI_MENUBAR*Zoom*accelerator: Shift z -- uses key Z or IESX*SI_MENUBAR*Zoom*accelerator: Meta z -- Uses Meta-z or IESX*SI_MENUBAR*Zoom*accelerator: Ctrl z -- Uses Ctrl-z NOTES: 1. You can define any key sequence as an Accelerator. However, using normal key strokes (lower as well as upper case) is discouraged. This is because if you have any text fields in a task window (such as password field or horizon name field) then you won't be able to use those keys. Similarly, using Control key in the accelerator definition is also discouraged because there are system level interupts that reserve usage of sequences like CTRL-c, CTRL-s, CTRL-q or CTRL-d. 2. For accelerators to work, the input focus must be in the task window. 3. If you DO NOT define the ???_MENUBAR field in your accelerator definition, it implies that the accelerator would apply to every button in ALL menubars where the menu button text matches exactly with accelerator definition. For example : IESX*Zoom*accelerator: Meta z implies that every menu button in IESX labeled 'Zoom'; regardless of which application menu it belongs to; can be invoked through a key sequence of 'Meta-z' in the appropriate task window. How to remember which key sequence to use for a menu button ? ------------------------------------------------------------- You can associate a text string with an accelerator that would appear on the menu button, next to the menu label. For this you need to use an additional resource named "acceleratorText". For example, setting the following resource definitions in .Xdefaults file IESX*SI_MENUBAR*Zoom*accelerator: Meta z IESX*SI_MENUBAR*Zoom*acceleratorText: META-z would result in using Meta-z as an accelerator and the menu button Zoom would appear as: |----------------| | Zoom META-z | |----------------| In order to be able to define unique key sequences for each application, IESX menubars are classified as SI_MENUBAR, SM_MENUBAR etc. Hence your old color resource definitions in .Xdefaults file for menubars IESX*MenuBar*background: color1 IESX*MenuBar*foreground: color2 are not valid any more. They must be replaced with explicit references to the application specific menubars. e.g. IESX*SM_MENUBAR*background: color1 IESX*SM_MENUBAR*foreground: color2 etc..... Once you change your .Xdefaults file, do not forget to inform your X server of these changes. Simply use the following command: > xrdb ~/.Xdefaults Modify the following according to the keystrokes you want associated with each accelerator and add to your .Xdefaults file: ------------------------------------------------------------------------- IESX*Zoom*accelerator: z IESX*Zoom*acceleratorText: z IESX*SurfaceSlice*accelerator: s IESX*SurfaceSlice*acceleratorText: s ! IESX*SI_MENUBAR*Vertical*accelerator: a IESX*SI_MENUBAR*Vertical*acceleratorText: a IESX*SI_MENUBAR*Borehole set*accelerator: w IESX*SI_MENUBAR*Borehole set*acceleratorText: w IESX*SI_MENUBAR*Interpretation*accelerator: i IESX*SI_MENUBAR*Interpretation*acceleratorText: i IESX*SI_MENUBAR*Roll forward*accelerator: f IESX*SI_MENUBAR*Roll forward*acceleratorText: f IESX*SI_MENUBAR*Roll backward*accelerator: r IESX*SI_MENUBAR*Roll backward*acceleratorText: r IESX*SI_MENUBAR*Preferences*accelerator: p IESX*SI_MENUBAR*Preferences*acceleratorText: p IESX*BM_MENUBAR*Manage Borehole Sets*accelerator: w IESX*BM_MENUBAR*Manage Borehole Sets*acceleratorText: w IESX*BM_MENUBAR*Manage Borehole Appearance*accelerator: a IESX*BM_MENUBAR*Manage Borehole Appearance*acceleratorText: a IESX*BM_MENUBAR*Interpretation*accelerator: i IESX*BM_MENUBAR*Interpretation*acceleratorText: i ! IESX*Break*accelerator: b IESX*Break*acceleratorText: b IESX*Contact*accelerator: c IESX*Contact*acceleratorText: c IESX*Contact-UP*accelerator: u IESX*Contact-UP*acceleratorText: u IESX*Contact-DN*accelerator: d IESX*Contact-DN*acceleratorText: d IESX*~Erase*accelerator: e IESX*~Erase*acceleratorText: e IESX*Track*accelerator: t IESX*Track*acceleratorText: t
Last Modified on: 11-SEP-00