本文整理汇总了Java中org.lwjgl.input.Keyboard.KEY_RSHIFT属性的典型用法代码示例。如果您正苦于以下问题:Java Keyboard.KEY_RSHIFT属性的具体用法?Java Keyboard.KEY_RSHIFT怎么用?Java Keyboard.KEY_RSHIFT使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.lwjgl.input.Keyboard
的用法示例。
在下文中一共展示了Keyboard.KEY_RSHIFT属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: keyPress
@Override
public void keyPress(int key, char keyChar) {
if (this.extended)
this.componentList.keyPress(key, keyChar);
if (this.binding) {
if (key != Keyboard.KEY_NONE && key != Keyboard.KEY_ESCAPE && key != Keyboard.KEY_LSHIFT && key != Keyboard.KEY_GRAVE && key != Keyboard.KEY_RSHIFT) {
this.mod.setKeybind(key);
new Thread(() -> {
if (this.title == null || mod == null) return;
this.title = "Bound to " + Keyboard.getKeyName(key);
try {
Thread.sleep(500);
} catch (InterruptedException e) {
}
if (this.title == null || mod == null) return;
this.title = mod.getId();
}).start();
this.binding = false;
}
}
}
示例2: call
@Override
public void call(KeyEvent event) {
int key = Keyboard.KEY_RSHIFT;
if (event.getKey() == key) {
if (mc.currentScreen == null) {
for (KeyBinding keyBinding : mc.gameSettings.keyBindings)
if (keyBinding.getKeyCode() == key)
return;
if (!wasSetUp) {
setup(guiManager);
wasSetUp = true;
}
mc.displayGuiScreen(new GuiSerenity(guiManager));
}
}
}
示例3: fixKeysHack
/**
* A hack to fix the fact that AWT left and right control and shift keys
* have no distinction
*
* @param awtKeyCode
* the key code to check if it needs a conversion
* @return The hacked key code
*/
public static int fixKeysHack(int keyCode)
{
if (keyCode == Keyboard.KEY_LSHIFT)
return Keyboard.KEY_RSHIFT;
if (keyCode == Keyboard.KEY_LCONTROL)
return Keyboard.KEY_RCONTROL;
return keyCode;
}
示例4: ModuleClickGui
public ModuleClickGui() {
super("ClickGui", "Clickable UI", Ordering.OTHER, Keyboard.KEY_RSHIFT, 0, false);
}