@@ -0,0 +1,2057 @@
+package net.silentchaos512.lib.client.key;%0A%0Aimport org.lwjgl.input.Keyboard;%0A%0Aimport net.minecraft.client.settings.KeyBinding;%0Aimport net.minecraftforge.client.settings.IKeyConflictContext;%0Aimport net.minecraftforge.client.settings.KeyModifier;%0Aimport net.minecraftforge.fml.client.registry.ClientRegistry;%0Aimport net.minecraftforge.fml.common.eventhandler.SubscribeEvent;%0Aimport net.minecraftforge.fml.common.gameevent.InputEvent.KeyInputEvent;%0A%0A/**%0A * Base class for a key tracker. Contains some helper methods for creating keybindings and checking for modifier key%0A * presses.%0A * %0A * Recommended use is to create a static instance and register that on the MinecraftForge.EVENT_BUS during pre-init.%0A * %0A * @author SilentChaos512%0A *%0A */%0Apublic abstract class KeyTrackerSL %7B%0A%0A  final String modId;%0A%0A  public KeyTrackerSL(String modId) %7B%0A%0A    this.modId = modId;%0A  %7D%0A%0A  @SubscribeEvent%0A  public abstract void onKeyInput(KeyInputEvent event);%0A%0A  /**%0A   * Creates a new keybinding and registers it in the ClientRegistry%0A   * %0A   * @return The newly-created keybinding.%0A   */%0A  protected KeyBinding createBinding(String name, IKeyConflictContext keyConflictContext,%0A      KeyModifier keyModifier, int keyCode) %7B%0A%0A    KeyBinding binding = new KeyBinding(name, keyConflictContext, keyModifier, keyCode, modId);%0A    ClientRegistry.registerKeyBinding(binding);%0A    return binding;%0A  %7D%0A%0A  /**%0A   * @return True if either the left or right Shift key is held down.%0A   */%0A  public static boolean isShiftDown() %7B%0A%0A    return Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) %7C%7C Keyboard.isKeyDown(Keyboard.KEY_RSHIFT);%0A  %7D%0A%0A  /**%0A   * @return True if either the left or right Control (Ctrl) key is held down.%0A   */%0A  public static boolean isControlDown() %7B%0A%0A    return Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) %7C%7C Keyboard.isKeyDown(Keyboard.KEY_RCONTROL);%0A  %7D%0A%0A  /**%0A   * @return True if either the left or right Alt key is held down.%0A   */%0A  public static boolean isAltDown() %7B%0A%0A    return Keyboard.isKeyDown(Keyboard.KEY_LMENU) %7C%7C Keyboard.isKeyDown(Keyboard.KEY_RMENU);%0A  %7D%0A%7D%0A

Add KeyTrackerSL