Package de.lessvoid.nifty.input.keyboard

Examples of de.lessvoid.nifty.input.keyboard.KeyboardInputEvent


    } else if (isControlUp(key, keyDown)) {
      controlDown = false;
    }
    // because Nifty uses the same keyboard encoding like lwjgl does, we can directly forward
    // the keyboard event to Nifty without the need for conversion
    return new KeyboardInputEvent(key, character, keyDown, shiftDown, controlDown);
  }
View Full Code Here


    }
  }

  private void processKeyboardEvents(final NiftyInputConsumer inputEventConsumer) {
    while (Keyboard.next()) {
      KeyboardInputEvent event = keyboardEventCreator.createEvent(Keyboard.getEventKey(), Keyboard.getEventCharacter(), Keyboard.getEventKeyState());
      // due to or short-circuiting on true, the event will get forward to keyboardEventsOut if keyboardEventsOut=true
      if (!niftyHasKeyboardFocus || !inputEventConsumer.processKeyboardEvent(event))
        keyboardEventsOut.offer(event);
    }
  }
View Full Code Here

    } else if (isControlUp(key, keyDown)) {
      controlDown = false;
    }
    // because Nifty uses the same keyboard encoding like lwjgl does, we can directly forward
    // the keyboard event to Nifty without the need for conversion
    return new KeyboardInputEvent(key, character, keyDown, shiftDown, controlDown);
  }
View Full Code Here

TOP

Related Classes of de.lessvoid.nifty.input.keyboard.KeyboardInputEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.