Package org.scijava.input
Class Accelerator
- java.lang.Object
-
- org.scijava.input.Accelerator
-
public class Accelerator extends Object
A keyboard shortcut, consisting of aKeyCodeplusInputModifiers.- Author:
- Curtis Rueden, Barry DeZonia
-
-
Constructor Summary
Constructors Constructor Description Accelerator(KeyCode keyCode, InputModifiers modifiers)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Acceleratorcreate(String acc)Creates an accelerator from the given string representation.booleanequals(Object o)KeyCodegetKeyCode()InputModifiersgetModifiers()inthashCode()static booleanisCtrlReplacedWithMeta()StringtoString()
-
-
-
Constructor Detail
-
Accelerator
public Accelerator(KeyCode keyCode, InputModifiers modifiers)
-
-
Method Detail
-
getKeyCode
public KeyCode getKeyCode()
-
getModifiers
public InputModifiers getModifiers()
-
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 :=For convenience:KeyCodefield (e.g., COMMA or UP)- "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.
- "INSERT"
- "control DELETE"
- "alt shift X"
- "^C"
-
isCtrlReplacedWithMeta
public static boolean isCtrlReplacedWithMeta()
-
-