类 ScreenEvent.KeyInput

java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.client.event.ScreenEvent
net.minecraftforge.client.event.ScreenEvent.KeyInput
直接已知子类:
ScreenEvent.KeyPressed, ScreenEvent.KeyReleased
封闭类:
ScreenEvent

private abstract static class ScreenEvent.KeyInput extends ScreenEvent

Fired whenever a keyboard key is pressed or released. See the various subclasses to listen for key pressing or releasing.

另请参阅:
  • 字段详细资料

    • keyCode

      private final int keyCode
    • scanCode

      private final int scanCode
    • modifiers

      private final int modifiers
  • 构造器详细资料

    • KeyInput

      @Internal protected KeyInput(Screen screen, int keyCode, int scanCode, int modifiers)
  • 方法详细资料

    • getKeyCode

      public int getKeyCode()
      返回 the GLFW (platform-agnostic) key code。
      返回:
      the GLFW (platform-agnostic) key code
      另请参阅:
    • getScanCode

      public int getScanCode()
      返回 the platform-specific scan code。

      The scan code is unique for every key, regardless of whether it has a key code. Scan codes are platform-specific but consistent over time, so keys will have different scan codes depending on the platform but they are safe to save to disk as custom key bindings.

      返回:
      the platform-specific scan code
      另请参阅:
    • getModifiers

      public int getModifiers()
      返回 a bit field representing the active modifier keys。
      返回:
      a bit field representing the active modifier keys
      另请参阅: