Java Code Examples for org.lwjgl.input.Keyboard#KEY_M
The following examples show how to use
org.lwjgl.input.Keyboard#KEY_M .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: KeybindManager.java From MediaMod with GNU General Public License v3.0 | 5 votes |
/** * Fired when you want to register keybinds * * @see MediaMod#preInit(FMLPreInitializationEvent) */ public void register() { // Initialize and declare keybinds INSTANCE.disableKeybind = new KeyBinding("key.disableKeybind", Keyboard.KEY_P, "key.categories.mediamod"); INSTANCE.menuKeybind = new KeyBinding("key.menuKeybind", Keyboard.KEY_M, "key.categories.mediamod"); INSTANCE.skipKeybind = new KeyBinding("key.skipKeybind", Keyboard.KEY_F, "key.categories.mediamod"); INSTANCE.pausePlayKeybind = new KeyBinding("key.pausePlayKeybind", Keyboard.KEY_N, "key.categories.mediamod"); ClientRegistry.registerKeyBinding(disableKeybind); ClientRegistry.registerKeyBinding(menuKeybind); ClientRegistry.registerKeyBinding(skipKeybind); ClientRegistry.registerKeyBinding(pausePlayKeybind); }
Example 2
Source File: MixinMinecraft.java From VanillaFix with MIT License | 5 votes |
/** @reason Implement F3 + M to draw texture map. */ @Inject(method = "processKeyF3", at = @At("HEAD"), cancellable = true) private void checkF3S(int auxKey, CallbackInfoReturnable<Boolean> cir) { if (auxKey == Keyboard.KEY_M) { drawTextureMap = !drawTextureMap; if (drawTextureMap) { debugFeedbackTranslated("vanillafix.debug.draw_texture_map.enabled"); } else { debugFeedbackTranslated("vanillafix.debug.draw_texture_map.disabled"); } cir.setReturnValue(true); cir.cancel(); } }
Example 3
Source File: KeyBindings.java From YouTubeModdingTutorial with MIT License | 4 votes |
public static void init() { wandMode = new KeyBinding("key.wandmode", KeyConflictContext.IN_GAME, Keyboard.KEY_M, "key.categories.mymod"); ClientRegistry.registerKeyBinding(wandMode); }
Example 4
Source File: ActionButtonPanel.java From tribaltrouble with GNU General Public License v2.0 | 4 votes |
public final boolean doKeyPressed(KeyboardEvent event) { switch (event.getKeyCode()) { case Keyboard.KEY_M: case Keyboard.KEY_Q: if (current_unit) return true; break; case Keyboard.KEY_A: if ((current_unit || current_armory || current_tower) && !event.isControlDown()) return true; break; case Keyboard.KEY_P: if (current_quarters) return true; if (current_unit) break; case Keyboard.KEY_G: case Keyboard.KEY_T: if (current_unit || current_armory) return true; case Keyboard.KEY_C: case Keyboard.KEY_I: case Keyboard.KEY_W: case Keyboard.KEY_ESCAPE: if (current_armory) if (current_submenu == harvest_group || current_submenu == build_group || current_submenu == army_group || current_submenu == transport_group) return true; break; case Keyboard.KEY_R: if (current_armory || current_quarters) return true; break; case Keyboard.KEY_X: if (current_tower) return true; break; default: break; } return false; }
Example 5
Source File: Test.java From LWJGL-OpenGL-Tutorials with BSD 3-Clause "New" or "Revised" License | 4 votes |
@Override public void keyPressed(int key, char c) { if(key == Keyboard.KEY_M) Mouse.setGrabbed(!Mouse.isGrabbed()); }