001package react4j.dom.events;
002
003import javax.annotation.Nonnull;
004import jsinterop.annotations.JsOverlay;
005import jsinterop.annotations.JsPackage;
006import jsinterop.annotations.JsType;
007
008@JsType( isNative = true, namespace = JsPackage.GLOBAL, name = "Object" )
009@SuppressWarnings( "unused" )
010public class KeyboardEvent
011  extends SyntheticEvent<akasha.KeyboardEvent>
012{
013  private boolean altKey;
014  private int charCode;
015  private boolean ctrlKey;
016  private String key;
017  private int keyCode;
018  private String locale;
019  private int location;
020  private boolean metaKey;
021  private boolean repeat;
022  private boolean shiftKey;
023  private int which;
024
025  public native boolean getModifierState( @Nonnull String key );
026
027  @JsOverlay
028  public final boolean isAltKey()
029  {
030    return altKey;
031  }
032
033  @JsOverlay
034  public final int getCharCode()
035  {
036    return charCode;
037  }
038
039  @JsOverlay
040  public final boolean isCtrlKey()
041  {
042    return ctrlKey;
043  }
044
045  @JsOverlay
046  public final String getKey()
047  {
048    return key;
049  }
050
051  @JsOverlay
052  public final int getKeyCode()
053  {
054    return keyCode;
055  }
056
057  @JsOverlay
058  public final String getLocale()
059  {
060    return locale;
061  }
062
063  @JsOverlay
064  public final int getLocation()
065  {
066    return location;
067  }
068
069  @JsOverlay
070  public final boolean isMetaKey()
071  {
072    return metaKey;
073  }
074
075  @JsOverlay
076  public final boolean isRepeat()
077  {
078    return repeat;
079  }
080
081  @JsOverlay
082  public final boolean isShiftKey()
083  {
084    return shiftKey;
085  }
086
087  @JsOverlay
088  public final int getWhich()
089  {
090    return which;
091  }
092}