src/main/java/com/spinyowl/legui/component/misc/listener/text/CopyTextEventListener.java
public void process(KeyboardEvent event) {
    boolean pressed = event.getAction() != KeyAction.RELEASE;
    if (!pressed) {
      return;
    }

    KeyCode copyKey = Keyboard.getCopyShortcut().getKey();
    KeyCode keyCode = event.getKey().getKeyCode();
    if (event.getMods().contains(KeyMod.CONTROL)
        && (copyKey != null && keyCode == copyKey || keyCode == KEY_C)) {
      TextComponentShortcutUtil.copy((TextComponent) event.getTargetComponent());
    }
  }
/**
   * Used to handle {@link KeyEvent}.
   *
   * @param event event to handle.
   */
Used to handle  KeyEvent.
@param event event to handle.
Used to handle KeyEvent . @param event event to handle .
public void process(KeyboardEvent event) {
    boolean pressed = event.getAction() != KeyAction.RELEASE;
    if (!pressed) {
      return;
    }
    KeyCode copyKey = Keyboard.getCopyShortcut().getKey();
    KeyCode keyCode = event.getKey().getKeyCode();
    if (event.getMods().contains(KeyMod.CONTROL)
        && (copyKey != null && keyCode == copyKey || keyCode == KEY_C)) {
      TextComponentShortcutUtil.copy((TextComponent) event.getTargetComponent());
    }
  }
public void process ( KeyboardEvent event ) { boolean pressed = event . getAction ( ) != KeyAction . RELEASE ; if ( ! pressed ) { return ; } KeyCode copyKey = Keyboard . getCopyShortcut ( ) . getKey ( ) ; KeyCode keyCode = event . getKey ( ) . getKeyCode ( ) ; if ( event . getMods ( ) . contains ( KeyMod . CONTROL ) && ( copyKey != null && keyCode == copyKey || keyCode == KEY_C ) ) { TextComponentShortcutUtil . copy ( ( TextComponent ) event . getTargetComponent ( ) ) ; } }
Used to handle {@link KeyEvent}.
Used to handle { @link KeyEvent } .