congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Keyboard$KeyEvent.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
playn.core.Keyboard$KeyEvent
constructor

Best Java code snippets using playn.core.Keyboard$KeyEvent.<init> (Showing top 10 results out of 315)

origin: io.playn/playn-java-base

/** Posts a key event received from elsewhere (i.e. a native UI component). This is useful for
 * applications that are using GL in Canvas mode and sharing keyboard focus with other (non-GL)
 * components. The event will be queued and dispatched on the next frame, after GL keyboard
 * events.
 *
 * @param time the time (in millis since epoch) at which the event was generated, or 0 if N/A.
 * @param key the key that was pressed or released, or null for a char typed event
 * @param pressed whether the key was pressed or released, ignored if key is null
 * @param typedCh the character that was typed, ignored if key is not null
 * @param modFlags modifier key state flags (generated by {@link #modifierFlags})
 */
public void postKey (long time, Key key, boolean pressed, char typedCh, int modFlags) {
 kevQueue.add(key == null ?
        new Keyboard.TypedEvent(modFlags, time, typedCh) :
        new Keyboard.KeyEvent(modFlags, time, key, pressed));
}
origin: playn/playn

/** Posts a key event received from elsewhere (i.e. a native UI component). This is useful for
 * applications that are using GL in Canvas mode and sharing keyboard focus with other (non-GL)
 * components. The event will be queued and dispatched on the next frame, after GL keyboard
 * events.
 *
 * @param time the time (in millis since epoch) at which the event was generated, or 0 if N/A.
 * @param key the key that was pressed or released, or null for a char typed event
 * @param pressed whether the key was pressed or released, ignored if key is null
 * @param typedCh the character that was typed, ignored if key is not null
 * @param modFlags modifier key state flags (generated by {@link #modifierFlags})
 */
public void postKey (long time, Key key, boolean pressed, char typedCh, int modFlags) {
 kevQueue.add(key == null ?
        new Keyboard.TypedEvent(modFlags, time, typedCh) :
        new Keyboard.KeyEvent(modFlags, time, key, pressed));
}
origin: io.playn/playn-html

 @Override public void handleEvent(NativeEvent nevent) {
  Key key = keyForCode(nevent.getKeyCode());
  dispatch(new Keyboard.KeyEvent(0, plat.time(), key, false), nevent);
 }
});
origin: playn/playn

 @Override public void handleEvent(NativeEvent nevent) {
  Key key = keyForCode(nevent.getKeyCode());
  dispatch(new Keyboard.KeyEvent(0, plat.time(), key, false), nevent);
 }
});
origin: playn/playn

protected void emitKeyPress (int flags, double time, Key key, boolean down) {
 if (keyboardEnabled) {
  plat.dispatchEvent(keyboardEvents, new Keyboard.KeyEvent(flags, time, key, down));
 }
}
protected void emitKeyTyped (double time, char keyChar) {
origin: playn/playn

void onKeyDown (int keyCode, KeyEvent nativeEvent) {
 long time = nativeEvent.getEventTime();
 Keyboard.KeyEvent event = new Keyboard.KeyEvent(0, time, keyForCode(keyCode), true);
 event.setFlag(mods(nativeEvent));
 dispatch(event);
 int unicodeChar = nativeEvent.getUnicodeChar();
 if (unicodeChar != 0) dispatch(new Keyboard.TypedEvent(0, time, (char)unicodeChar));
}
origin: playn/playn

void onKeyUp (int keyCode, KeyEvent nativeEvent) {
 long time = nativeEvent.getEventTime();
 Keyboard.KeyEvent event = new Keyboard.KeyEvent(0, time, keyForCode(keyCode), false);
 event.setFlag(mods(nativeEvent));
 dispatch(event);
}
origin: io.playn/playn-core

protected void emitKeyPress (int flags, double time, Key key, boolean down) {
 if (keyboardEnabled) {
  plat.dispatchEvent(keyboardEvents, new Keyboard.KeyEvent(flags, time, key, down));
 }
}
protected void emitKeyTyped (double time, char keyChar) {
origin: playn/playn

 @Override public void handleEvent(NativeEvent nevent) {
  Key key = keyForCode(nevent.getKeyCode());
  dispatch(new Keyboard.KeyEvent(0, plat.time(), key, true), nevent);
 }
});
origin: io.playn/playn-html

 @Override public void handleEvent(NativeEvent nevent) {
  Key key = keyForCode(nevent.getKeyCode());
  dispatch(new Keyboard.KeyEvent(0, plat.time(), key, true), nevent);
 }
});
playn.coreKeyboard$KeyEvent<init>

Popular methods of Keyboard$KeyEvent

  • isShiftDown
  • setFlag

Popular in Java

  • Reactive rest calls using spring rest template
  • onRequestPermissionsResult (Fragment)
  • getApplicationContext (Context)
  • addToBackStack (FragmentTransaction)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • JFileChooser (javax.swing)
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now