本文整理匯總了Java中org.jnativehook.keyboard.NativeKeyEvent.VC_F6屬性的典型用法代碼示例。如果您正苦於以下問題:Java NativeKeyEvent.VC_F6屬性的具體用法?Java NativeKeyEvent.VC_F6怎麽用?Java NativeKeyEvent.VC_F6使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類org.jnativehook.keyboard.NativeKeyEvent
的用法示例。
在下文中一共展示了NativeKeyEvent.VC_F6屬性的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: nativeKeyReleased
public void nativeKeyReleased(NativeKeyEvent e) {
int code = e.getKeyCode();
if (code == NativeKeyEvent.VC_CONTROL) {
allReleased = true;
ctrl = false;
for (int keycode : F_KEYS) {
GlobalKeyConsumer.instance.dontConsumeKeyCode(keycode);
}
} else if (code == NativeKeyEvent.VC_ALT) {
if (e.getKeyLocation() == 3) { // right alt
ralt = false;
GlobalKeyConsumer.instance.dontConsumeKeyCode(NativeKeyEvent.VC_C);
} else if (e.getKeyLocation() == 2) { // left alt
}
} else if (ctrl) {
if (code == NativeKeyEvent.VC_F9) {
MediaKeys.volumeDown();
} else if (code == NativeKeyEvent.VC_F10) {
MediaKeys.volumeUp();
} else if (code == NativeKeyEvent.VC_F11) {
MediaKeys.mute();
} else if (code == NativeKeyEvent.VC_F8) {
MediaKeys.play();
} else if (code == NativeKeyEvent.VC_F7) {
MediaKeys.next();
} else if (code == NativeKeyEvent.VC_F6) {
MediaKeys.prev();
}
} else if (ralt) {
if (code == NativeKeyEvent.VC_C) {
MouseControls.moveMouseToCorner();
} else if (code == NativeKeyEvent.VC_X) {
MouseControls.moveMouseToCenter();
}
}
}