public enum KeyModifier extends java.lang.Enum<KeyModifier>
定义了按键组合中可能用到的修饰键类型
用于组合按键的识别和处理,如Ctrl+C、Shift+Tab等
Enum Constant and Description |
---|
ALT
Alt替换键
对应键盘上的Alt键(Alternate键)
|
CONTROL
Ctrl控制键
对应键盘上的Ctrl键(Control键)
|
NONE
无修饰符
表示没有任何修饰键被按下
|
SHIFT
Shift上档键
对应键盘上的Shift键
|
Modifier and Type | Method and Description |
---|---|
static KeyModifier |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static KeyModifier[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final KeyModifier CONTROL
对应键盘上的Ctrl键(Control键)
public static final KeyModifier SHIFT
对应键盘上的Shift键
public static final KeyModifier ALT
对应键盘上的Alt键(Alternate键)
public static final KeyModifier NONE
表示没有任何修饰键被按下
public static KeyModifier[] values()
for (KeyModifier c : KeyModifier.values()) System.out.println(c);
public static KeyModifier valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null