org.scijava.input
Class Accelerator
java.lang.Object
org.scijava.input.Accelerator
public class Accelerator
- extends Object
A keyboard shortcut, consisting of a KeyCode
plus
InputModifiers
.
- Author:
- Curtis Rueden, Barry DeZonia
Accelerator
public Accelerator(KeyCode keyCode,
InputModifiers modifiers)
getKeyCode
public KeyCode getKeyCode()
getModifiers
public InputModifiers getModifiers()
equals
public boolean equals(Object o)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
toString
public String toString()
- Overrides:
toString
in class Object
create
public static Accelerator create(String acc)
- Creates an accelerator from the given string representation. The string
must have the following syntax:
<modifiers>* <keyCode>
modifiers := alt | altGraph | control | meta | shift
keyCode := KeyCode
field (e.g., COMMA or UP)
For convenience:
- "control" may be shortened to "ctrl"
- "altGraph" may be shortened to "altGr"
- The caret character ('^') is expanded to "control " on non-Mac
platforms, and "meta " (i.e., the Mac command key) on Mac platforms.
Here are some example strings:
- "INSERT"
- "control DELETE"
- "alt shift X"
- "^C"
- See Also:
for the syntax from which
this one is derived.
,
for the complete list of special character codes.
isCtrlReplacedWithMeta
public static boolean isCtrlReplacedWithMeta()
Copyright © 2009–2015 SciJava. All rights reserved.