Class KeymapKey

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class KeymapKey extends ProxyInstance
Represents a hardware key that can be mapped to a keyval.
  • Constructor Details

    • KeymapKey

      public KeymapKey(MemorySegment address)
      Create a KeymapKey proxy instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • KeymapKey

      public KeymapKey(Arena arena)
      Allocate a new KeymapKey.
      Parameters:
      arena - to control the memory allocation scope
    • KeymapKey

      public KeymapKey()
      Allocate a new KeymapKey. The memory is allocated with Arena.ofAuto().
    • KeymapKey

      public KeymapKey(int keycode, int group, int level, Arena arena)
      Allocate a new KeymapKey with the fields set to the provided values.
      Parameters:
      keycode - value for the field keycode
      group - value for the field group
      level - value for the field level
      arena - to control the memory allocation scope
    • KeymapKey

      public KeymapKey(int keycode, int group, int level)
      Allocate a new KeymapKey with the fields set to the provided values. The memory is allocated with Arena.ofAuto().
      Parameters:
      keycode - value for the field keycode
      group - value for the field group
      level - value for the field level
  • Method Details

    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • readKeycode

      public int readKeycode()
      Read the value of the field keycode.
      Returns:
      The value of the field keycode
    • writeKeycode

      public void writeKeycode(int keycode)
      Write a value in the field keycode.
      Parameters:
      keycode - The new value for the field keycode
    • readGroup

      public int readGroup()
      Read the value of the field group.
      Returns:
      The value of the field group
    • writeGroup

      public void writeGroup(int group)
      Write a value in the field group.
      Parameters:
      group - The new value for the field group
    • readLevel

      public int readLevel()
      Read the value of the field level.
      Returns:
      The value of the field level
    • writeLevel

      public void writeLevel(int level)
      Write a value in the field level.
      Parameters:
      level - The new value for the field level