Java Reference
In-Depth Information
To create a two-stroke shortcut, add a shortcut as before, but click the
Enable
box above the
Second Stroke
field. Enter your first stroke in the first box, and then
mouse over to the
Second Stroke
field and enter the second key combination.
If you turn on the
Disable mnemonics in menu
option for your keymap,
the main
IDEA
menu won't be accessible via the
Alt
key, freeing up the
dozen or more key combinations used to access the menus.
TIP
12.4.6
Defining mouse shortcuts
Another alternative is the mouse shortcut. It lets you define shortcuts that include
mouse button clicks, with or without modifier keys. When a mouse click is
included in a shortcut, the action affects the item you click. For example, if you
hold down
Alt
and single-click the middle mouse button, you can view the Quick
JavaDoc for the item that you click in the editor. Although you can't assign an
action to turning the wheel on a wheel mouse (it's used for scrolling), if your
wheel is also a button,
IDEA
considers it button 2.
To assign a mouse shortcut, select the action
and click the
Add Mouse Shortcut
button to
bring up the dialog shown in figure 12.7. This
dialog works similarly to that for adding key-
board shortcuts. First select either a single-click
or a double-click shortcut. Then, hold down
any combination of modifier keys (
Alt
,
Ctrl
,
and
Shift
) you want to include, and press your
mouse buttons on the
Click Pad
area of the
dialog (where the icon of the mouse is). The
button you pressed and the resulting shortcut
definition are shown in the
Shortcut Preview
area. You can repeat the process until you're
happy with your shortcut and click
OK
. As
before, you may need to resolve a conflict with
an existing shortcut.
Figure 12.7 Mouse shortcuts add a
new dimension to shortcuts, allowing
you to perform operations with a click
rather than a keystroke.
12.4.7
Defining quick lists
Another configurable option
IDEA
offers is quick lists, which are basically pop-up
menus of
IDEA
commands that you design yourself and assign to a keystroke or